What it means
The server cannot process the request because it is malformed: invalid syntax, bad framing or values it cannot parse.
Common causes
- Invalid JSON or a wrong Content-Type
- Missing or malformed query parameters
- Oversized or corrupted cookies
How to fix it
As a client or visitor
Read the error body for details, validate the payload (a JSON formatter helps), check Content-Type, and clear cookies for the site if a browser shows 400.
As the site or API owner
Return a clear error message naming the bad field, ideally as application/problem+json. Use 422 for well-formed input that fails validation.
Example response
HTTP/1.1
HTTP/1.1 400 Bad Request
Date: Tue, 07 Oct 2025 09:30:00 GMT
Server: nginx
Content-Type: application/problem+json
{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "Request body is not valid JSON: unexpected token at line 3."
} Specification
FAQ
› Why does clearing cookies fix a 400?
Huge or corrupted cookies can make the request header invalid or too large; servers often answer that with 400.
› 400 vs 422?
400 means the request could not be parsed. 422 means it was parsed but the values are invalid.