Use the searchable table for a quick lookup, then open the page for the codes you actually return. Each page covers when to use the code, what a typical response looks like, the usual causes, and the neighboring codes it is often confused with.
HTTP Status Codes
An HTTP status code is a contract. The number tells clients, proxies, crawlers and humans what happened, and whether retrying is reasonable. Returning 200 with an error body breaks that contract; returning 500 for a validation failure hides the actual cause.
What people use these for
- Pick the right code for a failed login, a forbidden action or a rate limit.
- Decide whether a redirect should be permanent and cacheable.
- Debug a gateway error by distinguishing 502, 503 and 504.
- Check whether a successful DELETE should return 200 or 204.
Guides and reference
15 pagesAll Status Codes
A searchable list of HTTP status codes with meanings, categories and links to detailed pages. Filter by code, name or category.
HTTP 200
HTTP 200 OK means the request succeeded and the response body contains the result. See when to return it, example responses and common mistakes.
HTTP 201
HTTP 201 Created confirms a new resource was created. Learn when to use it instead of 200, and why the Location header matters.
HTTP 204
HTTP 204 means the request succeeded and there is no body to return. Learn where it fits, why it must not include a body, and how clients handle it.
HTTP 301
301 is a permanent redirect; 302 is temporary. Learn how browsers and search engines treat each, when methods change, and how caching makes mistakes expensive.
HTTP 302
HTTP 302 Found redirects a request temporarily. Learn how it differs from 301 and 307, how caches treat it, and when to use it.
HTTP 304
HTTP 304 tells the client its cached copy is still valid. Learn ETag and Last-Modified validation, and why 304 must not include a body.
HTTP 400
HTTP 400 means the server could not parse or accept the request. Learn the usual causes: malformed JSON, missing headers, invalid query parameters.
HTTP 401
401 means authentication is missing or invalid; 403 means authenticated but not allowed. Learn to choose correctly and avoid leaking information.
HTTP 403
HTTP 403 means the server knows who you are but refuses access. See common causes: roles, ownership checks, WAF rules and filesystem permissions.
HTTP 404
HTTP 404 means the server cannot find the resource. Learn the common causes: wrong URL, deleted record, routing order, and deployment path issues.
HTTP 405
HTTP 405 means the URL exists but the HTTP method is not supported. Learn how it differs from 404 and 501, and how the Allow header helps clients.
HTTP 429
HTTP 429 means a rate limit was exceeded. Learn how to read Retry-After, implement backoff, and avoid retry storms.
HTTP 500
HTTP 500 is a generic server failure. Learn where to look: application logs, stack traces, upstream timeouts and configuration errors.
HTTP 502
502 means an upstream returned an invalid response; 503 means the service is unavailable; 504 means the upstream timed out. Learn to tell them apart.
The class tells you who should act
2xx means success, 3xx means the client should look elsewhere, 4xx means the request is the problem, and 5xx means the server failed. That is the first decision. The second is precision: 400 versus 422, 401 versus 403, 409 versus 423. A precise code lets clients handle the case without parsing a prose error message.
Retry semantics live in the details
429 and 503 are usually retryable; 400 and 404 are not. `Retry-After` turns a vague “try later” into a concrete instruction. For 5xx responses, retries should be bounded and idempotent; retrying a non-idempotent POST can duplicate the side effect. Status codes are only useful if the client reads them.
Frequently asked questions
What is the difference between 401 and 403?
401 means authentication is missing or invalid; the client should authenticate. 403 means the server knows who you are but refuses the action. Retrying 403 without changing permissions will not help.
Is 301 always better than 302?
301 is cacheable and tells crawlers the move is permanent. Use it only when the old URL will never come back; otherwise 302 or 307 avoids sticky browser caches.
Should errors use 200?
No. A 200 with `{ "error": "..." }` breaks monitoring, caching and client libraries. Use the status code that matches the outcome and put details in the body.