HTTP 400 Bad Request — What It Means
What HTTP status code 400 Bad Request means, when servers return it, and how to handle it correctly.
Published September 23, 2026
HTTP 400 Bad Request means the server cannot process the request because it is malformed or invalid: bad syntax, missing fields or wrong types.
What it means
The client must change the request; retrying the same one will fail again.
Common causes: Invalid JSON body; Missing required parameters; Wrong content type or malformed URL.
On the wire
POST /users HTTP/1.1
HTTP/1.1 400 Bad Request
Content-Type: application/json
{ invalid json
Practical examples
Test it from the shell
curl -i https://example.com/path # look for HTTP 400Handling 400 in code or config
res.status(400).json({ error: 'Invalid JSON' })How to fix it
Validate the body and parameters; Return a clear error message; Use 422 for semantic validation errors.
1. Reproduce: curl -i <url>
2. Confirm the status is 400
3. Apply the fix above and re-testCommon mistakes
- Validate the body and parameters
- Return a clear error message
- Ignoring the response headers that explain the details.
Key takeaways
- 400 means Bad Request.
- HTTP 400 Bad Request means the server cannot process the request because it is malformed or invalid: bad syntax, missing fields or wrong types.
- Read the response headers and logs for the exact cause.
FAQ
400 vs 422?
400 is malformed syntax; 422 is well-formed but semantically invalid.
Is 400 a client or server error?
It is a client error status code, in the 4xx class.