Developer

Encoders, converters & dev utilities

12 tools
Developer · United States

HTTP Status Codes Reference

Every HTTP status code (1xx–5xx) — meaning, when to use & how to handle. Accurate, instant and free — for United States.

Filter 25 codes by number, name, or meaning — matches instantly as you type.

1xx Informational2 codes
100

Continue

RFC 9110 §15.2.1

Interim response — the server received the request headers and the client should proceed to send the request body. Sent in reply to an Expect: 100-continue header.

When to use
Used automatically by clients that send a large body with Expect: 100-continue to check the server will accept it before uploading.
101

Switching Protocols

RFC 9110 §15.2.2

The server agrees to switch protocols as requested in the Upgrade header (e.g. upgrading an HTTP/1.1 connection to a WebSocket).

When to use
Returned during a WebSocket handshake or other protocol upgrade in response to an Upgrade request header.
2xx Success3 codes
200

OK

RFC 9110 §15.3.1

The request succeeded. The meaning of the payload depends on the method (e.g. the representation for GET, the result of the action for POST).

When to use
The default success response for a request that completed and returns a body.
201

Created

RFC 9110 §15.3.2

The request succeeded and one or more new resources were created. The URI of the new resource is typically returned in the Location header.

When to use
Return from a POST/PUT that creates a resource; include a Location header pointing to the new resource.
204

No Content

RFC 9110 §15.3.5

The request succeeded but there is no representation to return in the body. Response headers may still carry useful metadata.

When to use
Return from a successful DELETE or an update where you deliberately send no body; the client should not change its view.
3xx Redirection5 codes
301

Moved Permanently

RFC 9110 §15.4.2

The resource has permanently moved to the URL in the Location header. Search engines transfer ranking/link equity to the new URL, and the redirect is cacheable by default.

When to use
Use for a permanent URL change you want indexed and cached — the canonical way to move a page for SEO.
How to handle
Update bookmarks, links, and canonical references to the new URL from the Location header.
302

Found

RFC 9110 §15.4.3

The resource is temporarily at a different URL (Location header). It is temporary, so clients should keep using the original URL. Historically many browsers changed the method to GET on the redirect, which is why 307 exists.

When to use
Use for a temporary redirect where method-rewriting to GET is acceptable; prefer 307 when the method and body must be preserved.
304

Not Modified

RFC 9110 §15.4.5

The cached copy is still fresh — used for conditional requests (If-None-Match / If-Modified-Since). No body is sent; the client should reuse its cached representation.

When to use
Return to a conditional GET when the resource has not changed, to save bandwidth via caching.
307

Temporary Redirect

RFC 9110 §15.4.8

Temporary redirect that preserves the original HTTP method and body — unlike historical 302, the client must not change POST to GET when following it.

When to use
Use for a temporary redirect of a POST/PUT where the method and body must be preserved.
308

Permanent Redirect

RFC 9110 §15.4.9

Permanent redirect that preserves the HTTP method and body (the method-preserving counterpart of 301). Cacheable by default.

When to use
Use for a permanent move where the method and body must be preserved (e.g. a POST endpoint that moved).
How to handle
Update links and clients to the new URL from the Location header.
4xx Client Error11 codes
400

Bad Request

RFC 9110 §15.5.1

The server cannot process the request because it is malformed — bad syntax, invalid framing, or otherwise something the client got wrong.

When to use
Return when the request itself is invalid at a structural level and the client must change it before retrying.
How to handle
Check request syntax, headers, and payload structure; fix the malformed part and resend.
401

Unauthorized

RFC 9110 §15.5.2

Unauthenticated — the request lacks valid credentials (the name is misleading; it means authentication is missing or wrong, not authorization). Typically paired with a WWW-Authenticate header describing how to authenticate.

When to use
Return when the client must authenticate (or re-authenticate) to proceed; contrast with 403, where valid credentials still are not permitted.
How to handle
Send valid credentials (e.g. a correct Authorization header / token) as indicated by the WWW-Authenticate header.
403

Forbidden

RFC 9110 §15.5.4

Authenticated (or authentication is irrelevant) but the request is not allowed — the client is identified yet lacks permission. Re-authenticating will not help.

When to use
Return when the caller is known but not permitted; contrast with 401, where the fix is to provide credentials.
How to handle
Request the required permissions/role, or access a resource you are allowed to; re-sending credentials will not change the outcome.
404

Not Found

RFC 9110 §15.5.5

The server has no representation for the target resource and does not disclose whether it ever existed. May be used to hide the existence of a resource from unauthorized clients.

When to use
Return when the requested URL does not map to any resource.
How to handle
Verify the URL/path is correct and the resource exists; check for typos or a moved resource.
405

Method Not Allowed

RFC 9110 §15.5.6

The HTTP method is not supported for this resource. The response must include an Allow header listing the methods that are supported.

When to use
Return when the URL exists but the method (e.g. DELETE on a read-only resource) is not allowed.
How to handle
Use one of the methods listed in the response Allow header.
409

Conflict

RFC 9110 §15.5.10

The request conflicts with the current state of the resource — e.g. an edit against a stale version, or a duplicate that violates a uniqueness constraint.

When to use
Return for optimistic-concurrency conflicts or state conflicts the client can resolve and retry.
How to handle
Fetch the current state, reconcile the conflict, and resubmit.
410

Gone

RFC 9110 §15.5.11

The resource was intentionally and permanently removed and no forwarding address exists. Stronger than 404 — it asserts the resource is gone for good, and search engines should de-index it.

When to use
Return when a resource has been deliberately removed permanently and you want caches/crawlers to stop requesting it.
418

I'm a teapot

UnofficialRFC 2324

The server refuses to brew coffee because it is, permanently, a teapot. An April Fools' joke from the Hyper Text Coffee Pot Control Protocol — not a real HTTP status, kept alive as an Easter egg.

When to use
Not for production use; occasionally returned as a playful placeholder or to reject unwanted requests humorously.
422

Unprocessable Content

RFC 9110 §15.5.21

The request was well-formed (syntax is valid) but is semantically invalid — the server understood it but cannot process the contained instructions. RFC 9110 renamed this from 'Unprocessable Entity'.

When to use
Return for REST/JSON validation errors — e.g. a syntactically valid body that fails business/field validation.
How to handle
Fix the invalid field values described in the error body and resubmit.
429

Too Many Requests

RFC 6585 §4

The client has sent too many requests in a given time (rate limiting). The response may include a Retry-After header telling the client when to try again.

When to use
Return when a client exceeds a rate limit or quota.
How to handle
Slow down and respect the Retry-After header before retrying; add backoff to the client.
451

Unavailable For Legal Reasons

RFC 7725

The resource is unavailable because of a legal demand — e.g. a court order or government censorship. The number references Ray Bradbury's Fahrenheit 451.

When to use
Return when access is denied for legal reasons; the response should explain the legal demand where possible.
5xx Server Error4 codes
500

Internal Server Error

RFC 9110 §15.6.1

A generic catch-all — the server hit an unexpected condition (usually an unhandled exception) that prevented it from fulfilling the request. Not the client's fault.

When to use
Return when server-side code fails unexpectedly and no more specific 5xx applies.
How to handle
Inspect server logs/stack traces to find and fix the underlying exception; the client can retry once fixed.
502

Bad Gateway

RFC 9110 §15.6.3

A server acting as a gateway or proxy received an invalid response from the upstream server it tried to reach.

When to use
Returned by proxies/load balancers when the upstream (origin/app) sends a malformed or no response.
How to handle
Check the health of the upstream service and the proxy configuration; ensure the origin is running and reachable.
503

Service Unavailable

RFC 9110 §15.6.4

The server is temporarily unable to handle the request — usually overloaded or down for maintenance. This is transient; a Retry-After header may indicate when to try again.

When to use
Return during maintenance or overload; set a Retry-After header so clients back off appropriately.
How to handle
Wait and respect the Retry-After header; scale capacity or finish maintenance to resolve on the server side.
504

Gateway Timeout

RFC 9110 §15.6.5

A server acting as a gateway or proxy did not get a timely response from the upstream server it needed to reach.

When to use
Returned by proxies/load balancers when the upstream does not respond within the allowed time.
How to handle
Investigate why the upstream is slow (load, deadlocks, downstream dependency); raise timeouts only after fixing the root cause.

Debugging 401 / 403 on an API?

A 401 Unauthorized means the request lacks valid credentials, while 403 Forbiddenmeans you are authenticated but not permitted — re-sending a token won't help. If a bearer token is involved, inspect its claims and expiry with the JWT Decoder & Verifier to see whether it is expired, malformed, or missing a scope.

Static reference — nothing is tracked

This page is a static reference compiled from the IANA HTTP Status Code Registry and RFC 9110. The search runs entirely in your browser — no lookups are sent anywhere and nothing is logged.
Categories

The five classes of HTTP status code

Every HTTP response carries a three-digit status code whose first digit sets its class. Learn the five classes and you can reason about any code you have never seen before.

1xx — Informational

Request received, continuing

Interim responses such as 100 Continue and 101 Switching Protocols. Rarely seen directly.

2xx — Success

Received, understood, accepted

200 OK, 201 Created, 204 No Content — the request worked.

3xx — Redirection

Further action needed

301, 302, 307, 308 — follow the Location header to the new URL.

4xx — Client Error

The caller got it wrong

400, 401, 403, 404, 429 — fix the request before retrying.

5xx — Server Error

The server failed

500, 502, 503, 504 — a valid request the server could not fulfil.

The one-line rule of thumb
1xx
informational
2xx
success
3xx
redirect
4xx
your fault
5xx
server fault
Decoded

The pairs everyone confuses

401 vs 403

Auth vs permission

  • 401 — unauthenticated; send valid credentials
  • 403 — authenticated but not permitted
  • Re-sending a token fixes 401, never 403

301 vs 302 vs 307/308

Permanent, temporary, method-safe

  • 301 permanent (SEO), may rewrite to GET
  • 302 temporary, may rewrite to GET
  • 307/308 preserve the method & body

400 vs 422

Malformed vs invalid

  • 400 — won't even parse (bad syntax)
  • 422 — parses fine but fails validation
  • Most JSON APIs use 422 for field errors

429 + Retry-After

Rate limiting

  • 429 — too many requests
  • Respect Retry-After before retrying
  • Add exponential backoff with jitter

401 / 403 with a bearer token?

If auth failures involve a JWT, decode it with the JWT Decoder & Verifier to check the expiry (exp), audience, and scopes — an expired or wrong-audience token is a common cause of a stubborn 401.
FAQ

Frequently asked questions

The first digit sets the class. 1xx (Informational) means the request was received and the process is continuing — rarely seen directly. 2xx (Success) means the request was received, understood, and accepted (200 OK, 201 Created, 204 No Content). 3xx (Redirection) means further action is needed, usually following a Location header (301, 302, 307, 308). 4xx (Client Error) means the request was faulty — bad syntax, missing auth, or a resource that is not there (400, 401, 403, 404, 429). 5xx (Server Error) means the server failed to fulfil a valid request (500, 502, 503, 504). As a rule of thumb: 4xx is the caller’s fault, 5xx is the server’s fault.

401 Unauthorized actually means "unauthenticated": the request lacks valid credentials, so the server does not know who you are. It is usually accompanied by a WWW-Authenticate header, and the fix is to send correct credentials (e.g. a valid token). 403 Forbidden means the server knows who you are (or does not care) but you are not allowed to do this — re-sending credentials will not help; you need different permissions or a different resource. In short: 401 = "log in", 403 = "you are logged in but you still can’t".

They split on two axes: permanent vs temporary, and whether the HTTP method is preserved. 301 Moved Permanently is a permanent move and is the SEO-friendly choice (search engines transfer ranking to the new URL), but historically it could rewrite the method to GET. 302 Found is a temporary redirect that browsers historically also rewrote to GET. 307 Temporary Redirect and 308 Permanent Redirect are the modern, method-preserving versions: 307 is temporary and 308 is permanent, and both keep the original method and body (so a POST stays a POST). Use 301/308 for permanent moves (308 if you must preserve a POST) and 302/307 for temporary ones (307 to preserve the method).

429 means you have been rate-limited — you sent too many requests in a given window. A well-behaved server includes a Retry-After header, either as a number of seconds (e.g. Retry-After: 30) or an HTTP date. The correct client behaviour is to stop, wait until the Retry-After moment before retrying, and add exponential backoff with jitter so many clients do not all retry at once. Never tight-loop on a 429; that only deepens the throttling.

400 Bad Request means the request is malformed at a structural level — bad syntax, invalid framing, or JSON that will not even parse. 422 Unprocessable Content means the request was syntactically valid (it parsed fine) but is semantically wrong — for example a well-formed JSON body whose fields fail business or validation rules (a missing required field, an out-of-range value). Many REST/JSON APIs return 422 for field-validation errors and reserve 400 for genuinely unparseable input. RFC 9110 renamed 422 from "Unprocessable Entity" to "Unprocessable Content".

All three are 5xx server errors often seen behind a proxy or load balancer. 502 Bad Gateway means the gateway reached the upstream server but got an invalid or malformed response. 503 Service Unavailable means the server itself is temporarily unable to handle the request — usually overloaded or in maintenance — and it is transient, often with a Retry-After header. 504 Gateway Timeout means the gateway reached the upstream but did not get a response in time. Roughly: 502 = bad upstream reply, 503 = server overloaded/down, 504 = upstream too slow.

Sources

Standards & references

Method: each status code, its meaning, when to use it, and how to handle it are compiled from the IANA HTTP Status Code Registry and RFC 9110 (with RFC 6585 for 429 and RFC 7725 for 451), cross-checked against MDN. Codes marked “Unofficial” (e.g. 418) are not standardised and should not be used in production. This is a reference guide, not a substitute for the RFCs.

How we calculate this

Reviewed by Reckonist Editorial · Last reviewed 4 July 2026. Figures follow the methods and sources set out in our editorial standards.

This is a reference guide to HTTP status codes compiled from the IANA registry and RFC 9110. Behaviour can vary between servers, proxies, and older clients; always consult the relevant RFC for authoritative semantics.

Keep going

Same-category tools follow this colour; a cross-category link keeps its own.