HTTP Status Codes

Every HTTP response status code with what it means, whether a client should retry it, whether it is cacheable by default and whether it may carry a body.

Reference Web & Dev Updated Oct 3, 2026
Learn how this works
How to Use
  1. Search by number, name or meaning, or pick a class (1xx to 5xx) to narrow the list.
  2. Click a code, or type any three-digit number into the search box, to open it in the panel on the right.
  3. Read the four readouts: its class, whether a client should retry, whether it is cacheable by default and whether the response may have a body.
  4. Open Show Work to see which rule of RFC 9110 gave each answer, plus the headers that should come with the code.
  5. For a 4xx or 5xx error you are fighting right now, follow the link to its full causes-and-fixes page in the Error Reference.
Find a code
number, name or meaning
Presets
CodeNameWhen it is used
1xx — Informational
100 Continue The headers were accepted; send the request body now (answer to Expect: 100-continue).
101 Switching Protocols The connection is switching protocol, e.g. the WebSocket upgrade.
102 Processing WebDAV: still working on a long request. Dropped from the WebDAV spec in 2007 but still seen.
103 Early Hints Preload and preconnect hints sent before the final response is ready.
2xx — Success
200 OK Standard success. The body is the resource (GET) or the result of the action (POST).
201 Created A new resource was created; say where it is.
202 Accepted Queued for processing; the work has not finished (or even started).
203 Non-Authoritative Information A proxy changed the 200 response it received from the origin.
204 No Content Success with nothing to send back, common for DELETE and PUT.
205 Reset Content Success; the client should reset the form or view that sent the request.
206 Partial Content The answer to a Range request: only the bytes asked for.
207 Multi-Status WebDAV: an XML body holds a separate status for each resource.
208 Already Reported WebDAV: members of this binding were already listed earlier in the response.
226 IM Used A delta-encoded response to a GET (instance manipulations applied).
3xx — Redirection
300 Multiple Choices Several representations exist; the client should pick one.
301 Moved Permanently Moved for good; browsers cache it and search engines move the ranking. A POST may become a GET.
302 Found Temporary redirect. A POST may become a GET; prefer 307 to keep the method.
303 See Other Go and GET this other URL: the Post/Redirect/Get pattern after a form POST.
304 Not Modified Your cached copy is still valid (answer to If-None-Match or If-Modified-Since).
305 Use Proxy Deprecated for security reasons; clients ignore it.
307 Temporary Redirect Temporary redirect that keeps the method and body (unlike 302).
308 Permanent Redirect Permanent redirect that keeps the method and body (unlike 301).
4xx — Client error
400 Bad Request The request is malformed: broken JSON, a bad header, an impossible length.
401 Unauthorized No valid credentials. Must say how to authenticate.
402 Payment Required Reserved for future use; a few APIs use it for unpaid accounts.
403 Forbidden Understood, and refused. Logging in again will not help.
404 Not Found Nothing at this URL, or the server will not admit it exists.
405 Method Not Allowed The URL exists but not for this method; list the ones it accepts.
406 Not Acceptable Content negotiation failed: nothing matches the Accept headers.
407 Proxy Authentication Required Like 401, but for the proxy in between.
408 Request Timeout The client took too long to send the request; the server closed the connection.
409 Conflict Clashes with the current state, e.g. an edit based on an old version.
410 Gone Removed on purpose and not coming back (stronger than 404).
411 Length Required Send a Content-Length header.
412 Precondition Failed An If-Match or If-Unmodified-Since condition was false: someone changed it first.
413 Content Too Large The body is bigger than the server accepts (formerly Payload Too Large).
414 URI Too Long The URL is longer than the server will read, often a GET that should be a POST.
415 Unsupported Media Type The server cannot read this Content-Type or Content-Encoding.
416 Range Not Satisfiable The Range asked for lies outside the file.
417 Expectation Failed The Expect header could not be met.
418 I’m a teapot The 1998 April Fools’ coffee-pot protocol. RFC 9110 marks the code as unused.
421 Misdirected Request This server cannot answer for this host name (HTTP/2 connection reuse).
422 Unprocessable Content Parsed fine but the content is invalid, e.g. an end date before the start date.
423 Locked WebDAV: the resource is locked.
424 Failed Dependency WebDAV: failed because an earlier action it depended on failed.
425 Too Early The server will not risk replaying a request sent in TLS early data.
426 Upgrade Required Switch protocol (named in Upgrade) and try again.
428 Precondition Required This server insists on conditional requests (If-Match) to prevent lost updates.
429 Too Many Requests Rate limited. Slow down.
431 Request Header Fields Too Large One header, or all of them together, is too big: often an oversized cookie.
444 No Responsenginx nginx only: the server closed the connection without answering. Only appears in nginx logs.
451 Unavailable For Legal Reasons Blocked by a legal demand, such as a court order or government censorship.
499 Client Closed Requestnginx nginx only: the client gave up before the server answered. Only appears in nginx logs.
5xx — Server error
500 Internal Server Error Catch-all: the server hit an unexpected error.
501 Not Implemented The server does not support this method at all.
502 Bad Gateway A proxy or gateway got an invalid answer from the server behind it.
503 Service Unavailable Overloaded or down for maintenance; temporary.
504 Gateway Timeout A proxy or gateway gave up waiting for the server behind it.
505 HTTP Version Not Supported The server refuses this major version of HTTP.
506 Variant Also Negotiates Server misconfiguration in transparent content negotiation.
507 Insufficient Storage WebDAV: the server is out of space for this request.
508 Loop Detected WebDAV: the server found an infinite loop while processing.
510 Not Extended More extensions are needed. Now historic.
511 Network Authentication Required A captive portal (hotel or airport Wi-Fi) wants you to sign in first.
520 Web Server Returned an Unknown ErrorCloudflare Cloudflare: the origin sent an empty or unexpected response.
521 Web Server Is DownCloudflare Cloudflare: the origin refused the connection.
522 Connection Timed OutCloudflare Cloudflare: no TCP connection to the origin could be made.
523 Origin Is UnreachableCloudflare Cloudflare: no route to the origin (often a DNS problem).
524 A Timeout OccurredCloudflare Cloudflare: connected, but the origin took more than 100 seconds to answer.
525 SSL Handshake FailedCloudflare Cloudflare: the TLS handshake with the origin failed.
526 Invalid SSL CertificateCloudflare Cloudflare: the origin’s certificate could not be validated.
Selected code
Pick a code to see its class rules.
Class
—
Retry-able
—
Cacheable by default
—
Body allowed
—

Worked Example

An API answers 503 with Retry-After: 120. The first digit is 5, so it is a server error: the request may have been fine. 503 is the one 5xx code defined as temporary, and the header says how long to wait, so the client should wait 120 seconds and send it again. 503 is not in the heuristically cacheable list, so no cache keeps it without explicit headers, and a 503 may carry a body (a maintenance page, for example). Readouts: 5xx server error · retry after Retry-After · not cacheable by default · body allowed.

A page answers 404. 4xx means the request itself is the problem, so sending it again unchanged gets the same 404. But 404 is on RFC 9110’s heuristically cacheable list (200, 203, 204, 206, 300, 301, 308, 404, 405, 410, 414, 501), so a CDN may go on serving the 404 for a while after you publish the page. Readouts: 4xx client error · no retry · cacheable by default · body allowed.

The common mistake: answering a logged-in user who opens an admin page with 401. 401 means “no valid credentials” and must come with a WWW-Authenticate header, so browsers and API clients prompt for a login that cannot help. The user is authenticated and simply not allowed: that is 403 Forbidden. The same kind of slip happens with redirects: moving a POST endpoint with 301 lets clients repeat it as a GET, so the body is lost; 308 keeps the method.

Show Work

Pick a code above to see which rule decides each readout.

Class Rules

The first digit
1 info · 2 ok · 3 go elsewhere · 4 your fault · 5 my fault
Codes run from 100 to 599; anything else is invalid
Unknown codes
xyz → x00
An unrecognised code is handled like the x00 of its class, and must never be cached
No body, ever
1xx · 204 · 205 · 304
Plus any response to HEAD (RFC 9110 §6.4.1, §15.3.6)
Cacheable by default
200 203 204 206 300 301 308 404 405 410 414 501
Heuristically cacheable; every other code needs explicit Cache-Control or Expires
Redirect method
307 308 keep · 303 → GET · 301 302 may
Only 307 and 308 must repeat a POST as a POST
Safe to retry blindly
GET HEAD OPTIONS PUT DELETE
Idempotent methods; a POST or PATCH may run twice
Retry-After
120  or  Fri, 31 Dec 1999 23:59:59 GMT
Seconds or an HTTP date; sent with 429, 503 and some 3xx
Redirect limit
20 hops
The Fetch standard gives a network error after 20 redirects

Where the Numbers Came From

The first version of HTTP, now called HTTP/0.9, had no status codes at all: the server sent the document or closed the connection. Three-digit codes arrived with the early HTTP drafts of 1992 and were written down in HTTP/1.0 (RFC 1945, May 1996), using the same first-digit-is-the-class scheme that FTP and SMTP replies already used. HTTP/1.1 (RFC 2068 in 1997, then RFC 2616 in 1999) added 100 Continue, 303 See Other and 307 Temporary Redirect.

The list has grown slowly since: 429 and 511 in RFC 6585 (2012), 308 Permanent Redirect in 2014 (RFC 7238, then RFC 7538), 451 Unavailable For Legal Reasons in RFC 7725 (2016) — named after Ray Bradbury’s Fahrenheit 451 — 103 Early Hints in RFC 8297 (2017) and 425 Too Early in RFC 8470 (2018). RFC 9110 (June 2022) is the current definition of HTTP semantics for every version from 1.1 to 3. It renamed 413 to Content Too Large, adopted 422 from WebDAV as Unprocessable Content, and reserved 418, the “I’m a teapot” code from the April Fools’ RFC 2324 of 1998, as unused so nobody can give it a real meaning.

About This Tool

This reference lists the standard HTTP status codes from 100 to 511, plus the unofficial ones you will meet in real logs: nginx’s 444 and 499 and Cloudflare’s 520–526. Each entry says when the code is used, which specification defines it and which headers should travel with it.

Instead of leaving the rules to memory, it works them out for the code you pick: the class from the first digit, whether a body is allowed, whether a cache may store it without being told, and whether a client should send the request again. Show Work names the rule behind each answer. Type a code that is not in the list, such as 299, and it shows how a client is required to treat it. Everything runs in your browser.

For 4xx and 5xx errors that have a page in the Error Reference, the panel links to its list of causes and fixes. It is written for API designers choosing a code, developers writing retry logic, and anyone reading a server log.

Related tools: Explain This Error, HTTP(S) Check, and .htaccess Generator.

Frequently Asked Questions

When should I use 401 and when 403?

401 Unauthorized means the request has no valid credentials: the server must send a WWW-Authenticate header saying how to log in, and the client may try again with credentials. 403 Forbidden means the server knows who you are, or does not care, and still refuses. A wrong password is 401; a logged-in user opening an admin page is 403.

What is the difference between 301, 302, 307 and 308?

301 and 308 are permanent, so browsers and search engines remember them; 302 and 307 are temporary. The second difference is the method: on a 301 or 302, browsers turn a POST into a GET, while 307 and 308 must repeat the same method and body. Use 308 to move an API endpoint that receives POSTs, and 303 to send a browser to a results page after a form POST.

Should a validation error be 400 or 422?

400 Bad Request is for a request the server cannot parse: broken JSON, a missing Content-Length, a malformed header. 422 Unprocessable Content is for a request that parsed fine but makes no sense, such as an end date before the start date. RFC 9110 (2022) moved 422 from WebDAV into core HTTP, so both are standard today.

Which status codes are safe to retry?

408, 429, 502, 503 and 504 are the usual ones. With 429 and 503, wait for the Retry-After header (seconds, or an HTTP date) before trying again. With 500, 502 and 504 the request may already have run, so retry only idempotent methods (GET, HEAD, PUT, DELETE) automatically and back off between attempts: 1 s, 2 s, 4 s. A 400, 404 or 422 will fail the same way until the request changes.

Can a 404 be cached?

Yes. RFC 9110 lists 200, 203, 204, 206, 300, 301, 308, 404, 405, 410, 414 and 501 as heuristically cacheable, so a browser or CDN may keep a 404 for a while even without a Cache-Control header. Send Cache-Control: no-store or a short max-age on 404 pages that may soon exist. A response with an unrecognised code must never be cached.

How do I use the HTTP Status Codes?

Just type your numbers. The answer shows up right away — there is no button to press. Change anything and it updates by itself.

Do I need to install or sign up for anything?

Not at all — it runs in the browser with nothing to install and no account. After it loads once, it even works without an internet connection.

Is my information private?

Yes. Everything happens in your browser. Nothing you type is sent to a server or saved anywhere.

Common Use Cases

Designing REST API responses

Pick the right code for each endpoint: a POST that creates returns 201 with a Location header, a DELETE returns 204, and a conditional PUT whose ETag no longer matches returns 412.

Debugging third-party API failures

Look up an unexpected 502, 504 or Cloudflare 524 to see which part of the chain failed: the proxy, the upstream server, or the time limit between them.

Writing client retry logic

Retry 408, 429, 502, 503 and 504 with backoff; honour Retry-After on 429 and 503; never loop on a 400, 403 or 404.

Auditing security responses

Check that failed logins return 401 with WWW-Authenticate and that permission failures return 403, not 404 or 200 with an error message.

Server log analysis

Decode the status column of nginx or Apache logs: a spike of 499s means clients gave up waiting, a storm of 429s means a rate limit is biting.

Last updated: