Skip to content
Utilerio

HTTP Status Codes: The Complete Reference

Every common HTTP status code from 100 to 511, grouped by class, with a plain-language explanation of what each one means and when a server should send it.

· 8 min read

Every HTTP response starts with a three-digit status code that tells the client, in one number, what happened: did the request work, was something redirected, did the client make a mistake, did the server fail? The first digit sets the class:

ClassMeaning
1xxInformational — the request is still being processed
2xxSuccess — the request worked
3xxRedirection — the client needs to look elsewhere
4xxClient error — the request itself was the problem
5xxServer error — the server failed to fulfil a valid request

The rest of this article is a lookup table for every code you're likely to run into, plus the distinctions that actually trip people up in practice.

1xx — Informational

CodeNameWhat it means
100ContinueThe initial part of the request has been received; the client should continue with the body.
101Switching ProtocolsThe server agrees to switch protocols, as requested by an Upgrade header (e.g. to WebSocket).
103Early HintsLets the client start preloading resources while the server is still preparing the final response.

2xx — Success

CodeNameWhat it means
200OKThe request succeeded. The precise meaning depends on the method: GET returns a resource, POST returns the result of an action.
201CreatedThe request succeeded and a new resource was created, usually in response to a POST or PUT.
202AcceptedThe request was accepted for processing, but that processing isn't finished yet.
204No ContentThe request succeeded but there's no body to return — common after a successful DELETE.
206Partial ContentOnly part of the resource is being returned, in response to a Range header — used for resumable downloads and video streaming.

3xx — Redirection

CodeNameWhat it means
300Multiple ChoicesThe request has more than one possible response; the client (or user) must pick one.
301Moved PermanentlyThe resource has permanently moved to a new URL, given in the Location header. Search engines transfer ranking to the new URL.
302FoundThe resource temporarily lives at a different URL. Unlike 301, this should not be cached as permanent.
303See OtherThe response can be found at another URL using a GET, regardless of the original method — the classic post-redirect-get pattern.
304Not ModifiedThe cached version the client already has is still valid; no body is sent.
307Temporary RedirectLike 302, but guarantees the method and body are repeated exactly on the new request.
308Permanent RedirectLike 301, but guarantees the method and body are repeated exactly on the new request.

4xx — Client Error

CodeNameWhat it means
400Bad RequestThe server can't process the request due to a client error — malformed syntax, invalid JSON, bad parameters.
401UnauthorizedAuthentication is required or has failed. Despite the name, this is about who you are, not what you're allowed to do.
402Payment RequiredReserved for future use; some APIs repurpose it for billing or quota-exceeded errors.
403ForbiddenThe server understood the request but refuses to authorize it — re-authenticating won't help.
404Not FoundThe server can't find the requested resource. The most recognizable status code on the web.
405Method Not AllowedThe resource exists but doesn't support the HTTP method used (e.g. DELETE on a read-only endpoint).
406Not AcceptableThe server has no representation matching what the Accept headers requested.
408Request TimeoutThe server timed out waiting for the request; the client may simply retry.
409ConflictThe request conflicts with the current state of the resource — a common response to concurrent edits.
410GoneThe resource used to exist but has been permanently removed, with no forwarding address.
411Length RequiredThe server refuses the request because Content-Length wasn't specified.
412Precondition FailedA condition in a header such as If-Match or If-Unmodified-Since wasn't met.
413Payload Too LargeThe request body exceeds a limit the server is willing to accept.
414URI Too LongThe requested URL is longer than the server is willing to interpret.
415Unsupported Media TypeThe request body's format isn't supported, usually a wrong Content-Type header.
416Range Not SatisfiableThe Range header requests a byte range the resource doesn't have.
417Expectation FailedThe server can't meet the requirements of the Expect request header.
418I'm a TeapotAn April Fools' joke from RFC 2324 — some servers use it deliberately as an Easter egg.
422Unprocessable ContentThe request is well-formed but semantically invalid — the classic response to failed validation rules.
425Too EarlyThe server is unwilling to risk processing a request that might be replayed.
429Too Many RequestsThe client has sent too many requests in a given time — rate limiting. A Retry-After header often follows.
431Request Header Fields Too LargeThe request's header fields are too large for the server to process.
451Unavailable For Legal ReasonsThe resource is withheld due to a legal demand, such as a government-mandated content block.

5xx — Server Error

CodeNameWhat it means
500Internal Server ErrorA generic catch-all: something went wrong on the server and no more specific code applies.
501Not ImplementedThe server doesn't support the functionality required to fulfil the request.
502Bad GatewayActing as a gateway or proxy, the server got an invalid response from the upstream server.
503Service UnavailableThe server is temporarily unable to handle the request — overloaded or down for maintenance.
504Gateway TimeoutActing as a gateway, the server didn't get a timely response from the upstream server.
505HTTP Version Not SupportedThe server doesn't support the HTTP protocol version used in the request.
507Insufficient StorageThe server can't store the representation needed to complete the request (WebDAV).
511Network Authentication RequiredThe client needs to authenticate to gain network access — typical of captive portals on public Wi-Fi.

The distinctions that actually matter

401 vs 403. 401 means you haven't proven who you are yet — no or invalid credentials. 403 means the server knows exactly who you are and has decided you're not allowed. Logging in again fixes a 401; it does nothing for a 403.

404 vs 403 vs 400. If your API returns 404 for a request you think should work, check for a typo in the path, a trailing-slash mismatch, or a route that isn't registered — not a permissions problem, which would be 403. If the URL is right but a parameter is malformed, that's 400, not 404.

Which redirect to use. 301 for a permanent move that search engines should follow and re-index under the new URL. 302 or 307 for a temporary one. 303 specifically to turn a POST into a GET on the next request — the pattern behind post-redirect-get, which stops a form resubmission on refresh.

409 vs 422. 409 is about a conflict with the resource's current state — someone else edited the same row first. 422 is about the request being invalid on its own terms — a required field is missing, a value fails a validation rule — independent of anything else happening concurrently.

Looking a status code up while you work

If you're inspecting a URL that's returning an unexpected redirect chain or want to break a request apart into its components before you go hunting for the failing status code, the URL Parser splits any URL into its protocol, host, path and query parameters. If the code you're chasing came from a regular expression a router or middleware used to match (or fail to match) a route, the Regex Tester lets you check that pattern against real paths before you go digging through server logs.