Skip to content

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.

HTTP status codes with their meaning
CodeNameWhat it means
100ContinueThe server has received the request headers and the client should go ahead and send the body.
101Switching ProtocolsThe server is switching to the protocol the client asked for in `Upgrade`.
102ProcessingA WebDAV interim response telling the client the server is still working so it does not time out.
103Early HintsPreliminary headers — usually `Link: rel=preload` — sent before the real response so the browser can start fetching assets.
200OKThe request succeeded and the body contains the result.
201CreatedThe request succeeded and created one or more new resources.
202AcceptedThe request was accepted for processing, but the processing has not finished.
203Non-Authoritative InformationThe request succeeded, but a transforming proxy modified the response the origin sent.
204No ContentThe request succeeded and deliberately has no body.
205Reset ContentThe request succeeded and the client should reset the document view — clear the form.
206Partial ContentThe server is returning only the byte range the client asked for.
207Multi-StatusA WebDAV response whose XML body carries a separate status for each sub-request.
208Already ReportedInside a WebDAV 207 body, marks a resource whose members were already enumerated in an earlier part of the response.
226IM UsedThe server applied one or more instance manipulations (such as a delta encoding) to the current representation.
300Multiple ChoicesThe request has more than one possible response and the client must pick.
301Moved PermanentlyThe resource has a new permanent URL, given in `Location`.
302FoundThe resource is temporarily at a different URL. Keep using the original URL.
303See OtherThe result of the request is at another URL, which the client should fetch with GET.
304Not ModifiedThe cached copy the client already holds is still fresh, so no body is sent.
305Use ProxyDeprecated. The resource must be accessed through the proxy named in `Location`.
307Temporary RedirectSame as 302, but the method and body must not be changed when following the redirect.
308Permanent RedirectSame as 301, but the method and body must not be changed.
400Bad RequestThe server refuses to process the request because it is malformed.
401UnauthorizedThe request lacks valid authentication credentials. Despite the name, it means "unauthenticated".
402Payment RequiredReserved for future use; in practice, a payment or quota wall.
403ForbiddenThe server understood the request and is refusing it. Authenticating again will not help.
404Not FoundThe server has no representation for this URL and will not say whether it ever did.
405Method Not AllowedThe URL exists, but not for the HTTP method you used.
406Not AcceptableThe server cannot produce a response matching the `Accept` headers the client sent.
407Proxy Authentication RequiredLike 401, but the credentials are needed by a proxy rather than the origin server.
408Request TimeoutThe client took too long to send the complete request, so the server gave up.
409ConflictThe request conflicts with the current state of the resource.
410GoneThe resource used to exist here and has been permanently removed.
411Length RequiredThe server refuses the request without a `Content-Length` header.
412Precondition FailedA conditional header such as `If-Match` or `If-Unmodified-Since` did not hold.
413Content Too LargeThe request body is bigger than the server is willing to process.
414URI Too LongThe request target is longer than the server will accept.
415Unsupported Media TypeThe body format named in `Content-Type` is one the endpoint does not accept.
416Range Not SatisfiableThe byte range asked for lies outside the size of the resource.
417Expectation FailedThe server cannot meet the requirement in the `Expect` header.
418I'm a teapotAn April Fools joke from 1998 that became a permanent fixture. The teapot refuses to brew coffee.
421Misdirected RequestThe request was sent to a server that cannot produce a response for this authority.
422Unprocessable ContentThe syntax is fine and the content type is understood, but the data itself fails validation.
423LockedThe WebDAV resource is locked.
424Failed DependencyThe request failed because a previous request it depended on failed.
425Too EarlyThe server will not risk processing a request sent in TLS early data, because it could be replayed.
426Upgrade RequiredThe server refuses this protocol version and names an alternative in `Upgrade`.
428Precondition RequiredThe server requires the request to be conditional, to prevent the lost-update problem.
429Too Many RequestsThe client has sent too many requests in a given amount of time — rate limited.
431Request Header Fields Too LargeThe header block, or one individual header, is too big.
451Unavailable For Legal ReasonsAccess is denied because of a legal demand — a court order, a takedown, a geoblock.
499non-standardClient Closed RequestNon-standard nginx code: the client disconnected before the server replied.
500Internal Server ErrorThe server hit an unhandled condition. It is a catch-all, not a diagnosis.
501Not ImplementedThe server does not support the functionality required to fulfil the request.
502Bad GatewayA proxy or gateway got an invalid response — or no response — from the server behind it.
503Service UnavailableThe server is temporarily unable to handle the request — overloaded or down for maintenance.
504Gateway TimeoutA proxy waited for an upstream response and gave up.
505HTTP Version Not SupportedThe server refuses the major HTTP version used in the request.
506Variant Also NegotiatesA content-negotiation misconfiguration: a variant is itself set up to negotiate.
507Insufficient StorageThe server cannot store the representation needed to complete the request.
508Loop DetectedThe server detected an infinite loop while processing the request.
510Not ExtendedFurther extensions to the request are required for the server to fulfil it.
511Network Authentication RequiredThe client must authenticate to gain network access — a captive portal.
520non-standardWeb Server Returned an Unknown ErrorCloudflare-specific: the origin returned something Cloudflare could not interpret.
521non-standardWeb Server Is DownCloudflare-specific: the origin refused the connection.
522non-standardConnection Timed OutCloudflare-specific: the TCP handshake with the origin never completed.
523non-standardOrigin Is UnreachableCloudflare-specific: no route to the origin at all.
524non-standardA Timeout OccurredCloudflare-specific: the connection succeeded but the origin did not respond within 100 seconds.
525non-standardSSL Handshake FailedCloudflare-specific: the TLS handshake with the origin failed.
526non-standardInvalid SSL CertificateCloudflare-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

  1. Turn off Wi-Fi or enable airplane mode, then use the tool. It keeps working, because the page is already fully loaded.
  2. 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.

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.

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

PairThe differenceGetting it wrong causes
401 vs 403“Who are you?” versus “I know, and no”A token-refresh loop that can never succeed
400 vs 422Unparseable versus parsed-but-invalidClients cannot tell a bug from a user-input error
301 vs 302Permanent versus temporaryA mistaken 301 is cached by browsers for a very long time
302 vs 307Method may change versus must notA POST silently becomes a GET and the body vanishes
301 vs 308Same, for permanent redirectsSame
404 vs 410Not here versus deliberately goneSearch engines keep re-crawling a 404 for months
500 vs 503Unhandled failure versus temporarily unavailablePlanned maintenance gets pages de-indexed
502 vs 504Bad upstream response versus upstream too slowYou 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

  1. Never return 200 with an error in the body. Every generic client, retry policy, cache and monitor keys off the status line.
  2. Return 201 with a Location header when you create something.
  3. Return 204 with no body for a successful delete, and remember that a 204 must not have a body at all.
  4. Put machine-readable detail in the body — RFC 9457’s application/problem+json is a good default — and keep the status code coarse.
  5. Include Retry-After on 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.