HTTP status codes — the complete reference
Every HTTP status code with what it means, what actually causes it and how to fix it — searchable, with a page per code and the RFC reference.
- Runs in your browser
- Nothing you enter is sent
- Free, no account
Showing 70 entries.
| Code | Name | What it means |
|---|---|---|
| 100 | Continue | The server has received the request headers and the client should go ahead and send the body. |
| 101 | Switching Protocols | The server is switching to the protocol the client asked for in `Upgrade`. |
| 102 | Processing | A WebDAV interim response telling the client the server is still working so it does not time out. |
| 103 | Early Hints | Preliminary headers — usually `Link: rel=preload` — sent before the real response so the browser can start fetching assets. |
| 200 | OK | The request succeeded and the body contains the result. |
| 201 | Created | The request succeeded and created one or more new resources. |
| 202 | Accepted | The request was accepted for processing, but the processing has not finished. |
| 203 | Non-Authoritative Information | The request succeeded, but a transforming proxy modified the response the origin sent. |
| 204 | No Content | The request succeeded and deliberately has no body. |
| 205 | Reset Content | The request succeeded and the client should reset the document view — clear the form. |
| 206 | Partial Content | The server is returning only the byte range the client asked for. |
| 207 | Multi-Status | A WebDAV response whose XML body carries a separate status for each sub-request. |
| 208 | Already Reported | Inside a WebDAV 207 body, marks a resource whose members were already enumerated in an earlier part of the response. |
| 226 | IM Used | The server applied one or more instance manipulations (such as a delta encoding) to the current representation. |
| 300 | Multiple Choices | The request has more than one possible response and the client must pick. |
| 301 | Moved Permanently | The resource has a new permanent URL, given in `Location`. |
| 302 | Found | The resource is temporarily at a different URL. Keep using the original URL. |
| 303 | See Other | The result of the request is at another URL, which the client should fetch with GET. |
| 304 | Not Modified | The cached copy the client already holds is still fresh, so no body is sent. |
| 305 | Use Proxy | Deprecated. The resource must be accessed through the proxy named in `Location`. |
| 307 | Temporary Redirect | Same as 302, but the method and body must not be changed when following the redirect. |
| 308 | Permanent Redirect | Same as 301, but the method and body must not be changed. |
| 400 | Bad Request | The server refuses to process the request because it is malformed. |
| 401 | Unauthorized | The request lacks valid authentication credentials. Despite the name, it means "unauthenticated". |
| 402 | Payment Required | Reserved for future use; in practice, a payment or quota wall. |
| 403 | Forbidden | The server understood the request and is refusing it. Authenticating again will not help. |
| 404 | Not Found | The server has no representation for this URL and will not say whether it ever did. |
| 405 | Method Not Allowed | The URL exists, but not for the HTTP method you used. |
| 406 | Not Acceptable | The server cannot produce a response matching the `Accept` headers the client sent. |
| 407 | Proxy Authentication Required | Like 401, but the credentials are needed by a proxy rather than the origin server. |
| 408 | Request Timeout | The client took too long to send the complete request, so the server gave up. |
| 409 | Conflict | The request conflicts with the current state of the resource. |
| 410 | Gone | The resource used to exist here and has been permanently removed. |
| 411 | Length Required | The server refuses the request without a `Content-Length` header. |
| 412 | Precondition Failed | A conditional header such as `If-Match` or `If-Unmodified-Since` did not hold. |
| 413 | Content Too Large | The request body is bigger than the server is willing to process. |
| 414 | URI Too Long | The request target is longer than the server will accept. |
| 415 | Unsupported Media Type | The body format named in `Content-Type` is one the endpoint does not accept. |
| 416 | Range Not Satisfiable | The byte range asked for lies outside the size of the resource. |
| 417 | Expectation Failed | The server cannot meet the requirement in the `Expect` header. |
| 418 | I'm a teapot | An April Fools joke from 1998 that became a permanent fixture. The teapot refuses to brew coffee. |
| 421 | Misdirected Request | The request was sent to a server that cannot produce a response for this authority. |
| 422 | Unprocessable Content | The syntax is fine and the content type is understood, but the data itself fails validation. |
| 423 | Locked | The WebDAV resource is locked. |
| 424 | Failed Dependency | The request failed because a previous request it depended on failed. |
| 425 | Too Early | The server will not risk processing a request sent in TLS early data, because it could be replayed. |
| 426 | Upgrade Required | The server refuses this protocol version and names an alternative in `Upgrade`. |
| 428 | Precondition Required | The server requires the request to be conditional, to prevent the lost-update problem. |
| 429 | Too Many Requests | The client has sent too many requests in a given amount of time — rate limited. |
| 431 | Request Header Fields Too Large | The header block, or one individual header, is too big. |
| 451 | Unavailable For Legal Reasons | Access is denied because of a legal demand — a court order, a takedown, a geoblock. |
| 499non-standard | Client Closed Request | Non-standard nginx code: the client disconnected before the server replied. |
| 500 | Internal Server Error | The server hit an unhandled condition. It is a catch-all, not a diagnosis. |
| 501 | Not Implemented | The server does not support the functionality required to fulfil the request. |
| 502 | Bad Gateway | A proxy or gateway got an invalid response — or no response — from the server behind it. |
| 503 | Service Unavailable | The server is temporarily unable to handle the request — overloaded or down for maintenance. |
| 504 | Gateway Timeout | A proxy waited for an upstream response and gave up. |
| 505 | HTTP Version Not Supported | The server refuses the major HTTP version used in the request. |
| 506 | Variant Also Negotiates | A content-negotiation misconfiguration: a variant is itself set up to negotiate. |
| 507 | Insufficient Storage | The server cannot store the representation needed to complete the request. |
| 508 | Loop Detected | The server detected an infinite loop while processing the request. |
| 510 | Not Extended | Further extensions to the request are required for the server to fulfil it. |
| 511 | Network Authentication Required | The client must authenticate to gain network access — a captive portal. |
| 520non-standard | Web Server Returned an Unknown Error | Cloudflare-specific: the origin returned something Cloudflare could not interpret. |
| 521non-standard | Web Server Is Down | Cloudflare-specific: the origin refused the connection. |
| 522non-standard | Connection Timed Out | Cloudflare-specific: the TCP handshake with the origin never completed. |
| 523non-standard | Origin Is Unreachable | Cloudflare-specific: no route to the origin at all. |
| 524non-standard | A Timeout Occurred | Cloudflare-specific: the connection succeeded but the origin did not respond within 100 seconds. |
| 525non-standard | SSL Handshake Failed | Cloudflare-specific: the TLS handshake with the origin failed. |
| 526non-standard | Invalid SSL Certificate | Cloudflare-specific: the origin certificate could not be validated under Full (strict) mode. |
Your lookup never leaves this tab — check it yourself—
Starting the network probe…
The counter above wraps fetch, XMLHttpRequest and navigator.sendBeacon in this tab and counts every call. It does not block anything — it just reports.
Two ways to verify independently
- Turn off Wi-Fi or enable airplane mode, then use the tool. It keeps working, because the page is already fully loaded.
- Open your browser devtools, switch to the Network tab, clear it, and run the tool. No new row appears.
Why this matters
In 2025 researchers found that popular online formatters had retained tens of thousands of user-submitted snippets — JSONFormatter.org and CodeBeautify together exposed roughly 80,000 saved documents, many containing live cloud credentials, private keys and internal database connection strings, because “format this” quietly meant “upload this”. A separate incident exposed roughly 3.5 million user PDFs on a document-conversion service. The only structural fix is not sending the data in the first place: this site is served under a Content-Security-Policy whose connect-src contains no third-party origin, so a request off this device cannot be made even by accident.
1xx Informational
The request was received and the process is continuing. A client will normally never surface these to a user; they are handshake traffic.
2xx Success
The request was received, understood and accepted. The differences between them are about what the body contains and what the client should do with its current view.
3xx Redirection
Further action is needed to complete the request. The critical distinctions are permanent vs temporary (which affects SEO and browser caching) and whether the method may change.
4xx Client Error
The request was malformed, unauthorised or asked for something that is not there. Retrying the identical request will normally fail identically.
- 400 Bad Request
- 401 Unauthorized
- 402 Payment Required
- 403 Forbidden
- 404 Not Found
- 405 Method Not Allowed
- 406 Not Acceptable
- 407 Proxy Authentication Required
- 408 Request Timeout
- 409 Conflict
- 410 Gone
- 411 Length Required
- 412 Precondition Failed
- 413 Content Too Large
- 414 URI Too Long
- 415 Unsupported Media Type
- 416 Range Not Satisfiable
- 417 Expectation Failed
- 418 I'm a teapot
- 421 Misdirected Request
- 422 Unprocessable Content
- 423 Locked
- 424 Failed Dependency
- 425 Too Early
- 426 Upgrade Required
- 428 Precondition Required
- 429 Too Many Requests
- 431 Request Header Fields Too Large
- 451 Unavailable For Legal Reasons
- 499 Client Closed Request
5xx Server Error
The server knows it failed. The request may have been perfectly valid, so an automated client should usually back off and retry the idempotent ones.
- 500 Internal Server Error
- 501 Not Implemented
- 502 Bad Gateway
- 503 Service Unavailable
- 504 Gateway Timeout
- 505 HTTP Version Not Supported
- 506 Variant Also Negotiates
- 507 Insufficient Storage
- 508 Loop Detected
- 510 Not Extended
- 511 Network Authentication Required
- 520 Web Server Returned an Unknown Error
- 521 Web Server Is Down
- 522 Connection Timed Out
- 523 Origin Is Unreachable
- 524 A Timeout Occurred
- 525 SSL Handshake Failed
- 526 Invalid SSL Certificate
How to read a status code you have never seen
The first digit is the whole answer to “whose problem is this?”. Everything after it is detail.
- 1xx — handshake traffic. A client library handles these; you will rarely see one in an application log.
- 2xx — it worked. The differences are about what the body contains and whether the client should change its view.
- 3xx — go somewhere else. The two things that matter are permanent versus temporary, and whether the method is allowed to change.
- 4xx — the request was wrong. Sending the identical request again will fail identically, so an automatic retry is pointless (with two exceptions: 408 and 429, which are about timing).
- 5xx — the server failed. The request may have been perfectly valid, so retrying an idempotent request with exponential backoff is the right behaviour.
The distinctions that cause real bugs
| Pair | The difference | Getting it wrong causes |
|---|---|---|
| 401 vs 403 | “Who are you?” versus “I know, and no” | A token-refresh loop that can never succeed |
| 400 vs 422 | Unparseable versus parsed-but-invalid | Clients cannot tell a bug from a user-input error |
| 301 vs 302 | Permanent versus temporary | A mistaken 301 is cached by browsers for a very long time |
| 302 vs 307 | Method may change versus must not | A POST silently becomes a GET and the body vanishes |
| 301 vs 308 | Same, for permanent redirects | Same |
| 404 vs 410 | Not here versus deliberately gone | Search engines keep re-crawling a 404 for months |
| 500 vs 503 | Unhandled failure versus temporarily unavailable | Planned maintenance gets pages de-indexed |
| 502 vs 504 | Bad upstream response versus upstream too slow | You debug the wrong layer |
Retry policy in one paragraph
Retry 408, 429, 500, 502, 503 and 504 — but only for idempotent requests (GET, HEAD, PUT, DELETE),
or POSTs that carry an idempotency key. Honour Retry-After exactly when it is present.
Otherwise back off exponentially with jitter, because synchronised retries from many clients turn a
brief blip into a sustained outage. Cap the number of attempts, and never retry a 4xx other than
those two.
Choosing status codes for your own API
- Never return 200 with an error in the body. Every generic client, retry policy, cache and monitor keys off the status line.
- Return 201 with a
Locationheader when you create something. - Return 204 with no body for a successful delete, and remember that a 204 must not have a body at all.
- Put machine-readable detail in the body — RFC 9457’s
application/problem+jsonis a good default — and keep the status code coarse. - Include
Retry-Afteron every 429 and 503. It is the one header clients genuinely act on.
Sources
The definitions here follow RFC 9110 (HTTP Semantics) and the extension RFCs cited on each code’s page, cross-checked against the IANA HTTP Status Code Registry. The causes and fixes are practitioner notes rather than part of any specification, and vendor-specific codes are marked as such so nothing here implies they are standard.
Questions
What do the five classes mean?
1xx is informational handshake traffic. 2xx means the request succeeded. 3xx means you need to go somewhere else. 4xx means the request was wrong — retrying it unchanged will fail again. 5xx means the server failed and the request may have been fine, so an idempotent request is worth retrying with backoff.
Which codes are not part of HTTP?
Several of the most-searched ones. 499 is nginx's "client closed request", and 520 through 526 are Cloudflare's. They are marked "non-standard" here, because sending them from your own application will confuse every generic client.
When should an API return 400 versus 422?
400 when the request itself is malformed — unparseable JSON, a bad header, an invalid percent-encoding. 422 when the syntax is fine but the data fails validation. The distinction matters because a 400 is a client bug and a 422 is usually a user-input problem you can show in a form.
Is 401 or 403 the right choice?
401 means "I do not know who you are" and must include a `WWW-Authenticate` header. 403 means "I know who you are and you still may not". Sending 401 for an authorisation failure sends clients into a token-refresh loop that can never succeed.
Where does this data come from?
The RFCs themselves — RFC 9110 for the core semantics plus the extension RFCs cited on each code — and the IANA HTTP Status Code Registry. The causes and fixes are practitioner notes, not part of any specification.