HTTP status · 4xx — client error

400 Bad Request

400 Bad Request means the server cannot process the request because the client sent something malformed.

Key facts

Class4xx — client error
StandardRFC 9110 §15.5.1
Cacheable by defaultNo
Typical causesMalformed JSON, bad encoding, invalid header
Fix sideClient or caller

What 400 means

The server received a request it cannot parse or that violates the protocol: broken JSON, an invalid Content-Length, a header with illegal characters, or a URL that cannot be decoded. The problem is on the request side, so retrying the same request unchanged will fail the same way.

Common causes and fixes

Frequently asked questions

Is 400 the client's fault?

It means the request is malformed from the server's point of view. That is usually the caller's bug, but a proxy or an outdated client can also produce it.

What is the difference between 400 and 422?

400 says the request could not be parsed. 422 says it parsed correctly but failed semantic validation, such as a missing required field.

New tools, straight to your inbox

One short email when we add tools worth using. No spam, unsubscribe anytime.