Developer Tools

HTTP 422 Unprocessable Entity

4xx Client Error. The request is well-formed but contains semantic errors the server can't process.

Runs in your browser. Your files and text never leave your device - nothing is uploaded.

4xx Client Error

What it means

The request is well-formed but contains semantic errors the server can't process.

PropertyDetail
Status class4xx Client Error
Defined inRFC 9110, Section 15.5.21 — RFC 9110 calls it 422 Unprocessable Content. It was first defined for WebDAV as 422 Unprocessable Entity in RFC 4918, and RFC 9110 adopted it for all of HTTP in 2022.
Cacheable by defaultOnly with explicit caching headers: a cache stores it when the response carries Cache-Control (max-age, s-maxage or public) or Expires.
Who needs to actThe client, which has to correct the flagged fields.

What does HTTP 422 Unprocessable Entity mean?

HTTP 422 means the server understood the request's format and could parse it, but could not process the instructions it contained, typically because a value failed validation. An email field without an @ in otherwise valid JSON is the classic case. RFC 9110 names it Unprocessable Content; its original WebDAV name is Unprocessable Entity.

How 422 Unprocessable Entity works

The definition rules out two neighbours. The content type is understood, so 415 does not fit, and the syntax is correct, so 400 does not fit either. What is left is semantic: the instructions in the body cannot be carried out. Modern frameworks rely on the code heavily. Laravel returns 422 with a list of errors per field when validation fails, FastAPI returns 422 when a request does not match its declared types, and Rails answers 422 when a form arrives with an invalid CSRF authenticity token. In every case the response body is where the useful information is.

Example 422 request and response

POST /api/signup HTTP/1.1
Host: example.com
Content-Type: application/json

{"email": "ana.example.com", "password": "123"}

HTTP/1.1 422 Unprocessable Content
Content-Type: application/json

{"errors": {"email": ["must be a valid email"], "password": ["is too short"]}}

The JSON parses correctly, but two fields fail validation, and the body names each one.

What causes a 422 Unprocessable Entity

  • A field that fails a rule: an invalid email, a password that is too short, a date in the past.
  • A request body that does not match the API's schema or data types.
  • Business rules broken by otherwise valid data, such as ordering more items than are in stock.
  • In Rails applications, an expired or missing CSRF authenticity token on a form submission.

How to fix a 422 Unprocessable Entity

If you sent the request

  • Read the error list in the body and fix each flagged field.
  • Check data types as well as values; a number sent as a string can fail schema validation.
  • For a Rails form, reload the page to get a fresh CSRF token and make sure cookies are enabled.

If you build the API

  • Return field-level errors in a consistent format, such as RFC 9457 problem details.
  • Use 400 for syntax errors and 422 for validation errors, and document the split.

Related status codes

Tools that help

Frequently asked questions

Sources

Other 4xx Client Error codes

Reviewed by Raja Jahangir · Last reviewed: October 7, 2026