400 Bad Request
This is an educational reference page about HTTP 400 Bad Request. The page itself is served as 200 OK so it can be indexed as HTTP documentation.
The server cannot or will not process the request due to an apparent client error (e.g., malformed request syntax, size too large, invalid request message framing, or deceptive request routing).
What it means
HTTP 400 means the server could not understand the request because the request syntax, framing, routing, or payload was invalid.
Common causes
- Malformed JSON, form data, query strings, or request headers.
- Missing required fields, unsupported values, or invalid request body shape.
- A proxy, browser, or client library sent a request the origin cannot parse.
How to fix it
- Validate the request body and Content-Type before sending it.
- Check server logs for parser errors and rejected parameters.
- Return a specific validation error in the response body so clients can correct the request.
Example response
HTTP/1.1 400 Bad Request
Content-Type: application/json
{"error":"Invalid JSON body"}
Developer notes
Use 400 for a generally invalid request. Use 422 when the syntax is valid but the server cannot process the instructions.