400 vs 422: Bad Request vs Unprocessable Content

400 means the request couldn’t be parsed or is structurally invalid. 422 means it parsed fine but the data fails validation rules.

400

HTTP 400 Bad Request

The server could not understand the request because its syntax, headers or body are malformed or invalid.

Causes & fixes →
422

HTTP 422 Unprocessable Content

The request is well-formed, but the data fails validation (e.g. invalid email, missing required field).

Causes & fixes →
400422
SyntaxBroken (invalid JSON, bad headers)Valid
Semantics—Invalid (bad email, missing field, rule violation)
Used byMost servers for any client errorLaravel, Rails, FastAPI for validation
Response bodyOften a generic messageUsually field-by-field errors

Rule of thumb

Can the server read your request at all? If not, 400. If it can but doesn’t like the values, 422.