HTTP Status Code Reference & API Advisor
Look up any HTTP status code and pick the right one for your API
Search
Find any registered status code by number, class, phrase, header or keyword.
Type a code, a class such as 4xx, a reason phrase, a header or a keyword.
Guidance follows the IANA registry and the RFCs; your API style guide or framework may set stricter rules.
Status codes
63 of 63 codes
Details
200OK
Retry guidance
Do not retry unchanged
Caching
Cacheable by default
Caches may store it and estimate freshness when no Cache-Control or Expires header is sent.
Relevant headers
- Content-Type
- ETag
- Cache-Control
Alternatives
Compare with
Defined in: RFC 9110
Related Tools
What is the HTTP Status Code Reference & API Advisor?
A searchable reference of every status code in the IANA HTTP Status Code Registry, combined with an advisor that recommends which code an API should return. Each code shows its class, a plain description, typical uses, mistakes to avoid, retry and caching guidance, relevant headers, alternatives and the defining RFC.
Lookup, Advisor and Compare
Lookup searches by code (422), class (4xx), reason phrase, header (Retry-After) or keyword. Advisor maps what happened, such as a failed validation or an exhausted rate limit, to one recommended code with the reason and alternatives. Compare puts commonly confused codes side by side, such as 400 and 422 or 502, 503 and 504, with a decision rule.
Retry and caching guidance
Retry guidance says whether a client should repeat the same request, whether Retry-After applies and whether to back off. Automatic retries are only safe for idempotent methods or when the server removes duplicates. Caching follows RFC 9110: only some codes are cacheable by default; others need explicit Cache-Control or Expires.
Limits
Reason phrases and RFC numbers follow the IANA registry; temporary registrations and vendor-specific codes such as 499 or 520 are not listed. The advisor is a fixed decision table, not a policy engine, so your API style guide may choose differently. Everything runs in your browser.
Frequently asked questions
- Should a validation error return 400 or 422?
- Return 400 when the server cannot parse the request, for example invalid JSON or a missing required parameter. Return 422 Unprocessable Content when the body is well formed but its values fail validation or business rules, and include details for each field.
- What is the difference between 401 and 403?
- 401 Unauthorized means valid credentials are missing or expired; the response must include WWW-Authenticate and the client should authenticate and try again. 403 Forbidden means the caller is known but not allowed, so authenticating again will not help.
- Which status codes should a client retry?
- 429, 503 and 408 are usually retryable, and 502, 504 and 500 sometimes. Respect Retry-After when it is present, back off exponentially with jitter, and retry automatically only idempotent methods or requests the server de-duplicates.
