HTTP Status Code Reference
Search the full list of HTTP status codes — from 100 Continue to 511 Network Authentication Required — with concise explanations.
1xx Informational
2xx Success
3xx Redirection
4xx Client Error
5xx Server Error
HTTP status code anatomy
HTTP status codes are three-digit numbers returned by a server in response to every request. The first digit identifies the class of response: 1xx is informational, 2xx is success, 3xx is redirection, 4xx is client error (the request was malformed or unauthorised), and 5xx is server error (the server failed to fulfil a valid request). The remaining two digits identify the specific condition.
The codes are defined by RFC 9110 (the current HTTP semantics specification, replacing RFC 7231) and a handful of supplementary RFCs. Every well-behaved server should return the most specific code that applies — for example 422 Unprocessable Entity is more useful than a generic 400 when the request body is syntactically valid but semantically wrong.
Use the search box to filter by numeric code, name, or category. The reference covers all standard codes plus the most commonly seen unofficial codes (418 I'm a teapot, 451 Unavailable For Legal Reasons, Cloudflare's 5xx range).
Use cases
- Look up what 422 means before designing a validation API.
- Decide between 401 Unauthorized and 403 Forbidden when writing an authentication middleware.
- Confirm that the response your CDN is returning matches the documented code.
- Train a new engineer on the difference between 301 and 308 redirects.
- Quickly explain a Cloudflare 525 to a non-technical stakeholder.
Best practices
- Return 401 for missing or invalid credentials and 403 for authenticated-but-unauthorised users — they are not interchangeable.
- Prefer 308 over 301 when redirecting non-GET methods so the request method is preserved.
- Use 503 with a Retry-After header for planned maintenance windows.
- Never return 200 with an error body — clients will treat the response as success and ignore the embedded error.
- Match Cache-Control to the status: 4xx and 5xx responses should usually be marked no-store.