UtilDojo

Popular

Menu

HTTP Status Codes List — Meaning and When to Use Each

  • This tool runs entirely in your browser. Nothing you enter or upload is sent to a server.

Official documentation:RFC 9110 §15 (the standard)IANA status code registryMDN reference

1xx · Informational

The request was received and the process continues.

  • 100

    Continue

    The first part of the request was received; the client should send the rest.

    When: Sent after an Expect: 100-continue header so a large upload only starts if the server will accept it.

  • 101

    Switching Protocols

    The server agrees to switch to the protocol the client asked for.

    When: The reply to a WebSocket (or HTTP/2 cleartext) Upgrade request.

  • 102

    Processing

    The server has accepted the request but has no response yet (WebDAV).

    When: Keeps a long WebDAV operation from timing out. Rarely seen today.

  • 103

    Early Hints

    Preliminary headers, sent before the final response.

    When: Lets the browser start preloading CSS, JS or fonts (Link headers) while the server is still building the page.

2xx · Success

The request was received, understood and accepted.

  • 200

    OK

    Common

    The request succeeded.

    When: The default success: GET returns the resource, POST returns the result of the action.

  • 201

    Created

    Common

    The request succeeded and a new resource was created.

    When: Reply to a POST or PUT that created something; include a Location header pointing at it.

  • 202

    Accepted

    The request was accepted for processing, but is not finished.

    When: For queued or asynchronous work. Return a status URL the client can poll.

  • 203

    Non-Authoritative Information

    Success, but the content was modified by a proxy.

    When: A transforming proxy changed the origin's 200 response.

  • 204

    No Content

    Common

    Success, with no body to return.

    When: DELETE and PUT/PATCH that need no response body. Never send a body with it.

  • 205

    Reset Content

    Success; the client should reset the view that sent the request.

    When: Clear a form after it was submitted.

  • 206

    Partial Content

    Only the byte range the client asked for is returned.

    When: Reply to a Range request: resumable downloads, video seeking.

  • 207

    Multi-Status

    Several independent results in one XML body (WebDAV).

    When: Batch operations where each item can succeed or fail separately.

  • 208

    Already Reported

    Members of a WebDAV binding were already listed earlier in the response.

    When: Avoids repeating the same members in a WebDAV listing.

  • 226

    IM Used

    The response is the result of instance manipulations (delta encoding).

    When: Rare; used with A-IM request headers.

3xx · Redirection

The client must take further action, usually following a new URL.

  • 300

    Multiple Choices

    There are several possible responses; the client should choose.

    When: Rarely used; there is no standard way to present the choices.

  • 301

    Moved Permanently

    Common

    The resource has a new permanent URL.

    When: Site moves, HTTP to HTTPS, canonical URLs. Search engines transfer ranking to the new URL. Clients may change POST to GET.

  • 302

    Found

    Common

    The resource is temporarily at another URL.

    When: Temporary redirects such as after login. Prefer 303 or 307 when the method matters.

  • 303

    See Other

    The result is at another URL, which must be fetched with GET.

    When: Redirect after a POST (the Post/Redirect/Get pattern) so a refresh does not resubmit.

  • 304

    Not Modified

    Common

    The cached copy is still valid; no body is sent.

    When: Reply to a conditional request (If-None-Match / If-Modified-Since) to save bandwidth.

  • 305

    Use Proxy

    The resource must be accessed through a proxy (deprecated).

    When: Removed from the spec for security reasons; do not use.

  • 307

    Temporary Redirect

    Common

    Temporary redirect that keeps the method and body.

    When: Like 302, but a POST stays a POST. Used by HSTS and API gateways.

  • 308

    Permanent Redirect

    Common

    Permanent redirect that keeps the method and body.

    When: Like 301, but a POST stays a POST. Use it for permanent API moves.

4xx · Client error

The request is wrong or cannot be fulfilled as sent.

  • 400

    Bad Request

    Common

    The server cannot process the request because it is malformed.

    When: Invalid JSON, missing parameters, failed validation. Say what was wrong in the body.

  • 401

    Unauthorized

    Common

    Authentication is required or has failed.

    When: No or invalid credentials/token. Send a WWW-Authenticate header. (It means unauthenticated, not forbidden.)

  • 402

    Payment Required

    Reserved for digital payment systems.

    When: Some APIs use it for exhausted quotas or unpaid plans.

  • 403

    Forbidden

    Common

    The server understood the request but refuses to allow it.

    When: The user is logged in but lacks permission. Re-authenticating will not help.

  • 404

    Not Found

    Common

    The resource does not exist at this URL.

    When: Unknown path or id. Also used to hide that a protected resource exists.

  • 405

    Method Not Allowed

    Common

    The URL exists but not for this HTTP method.

    When: For example POST to a read-only endpoint. Send an Allow header listing valid methods.

  • 406

    Not Acceptable

    The server cannot produce a response matching the Accept headers.

    When: Content negotiation failed (type, language, encoding).

  • 407

    Proxy Authentication Required

    The client must authenticate with the proxy first.

    When: Like 401, but for a proxy; send Proxy-Authenticate.

  • 408

    Request Timeout

    The server gave up waiting for the request.

    When: The client was too slow sending the request; it may retry.

  • 409

    Conflict

    Common

    The request conflicts with the current state of the resource.

    When: Edit conflicts, duplicate unique values, version mismatch.

  • 410

    Gone

    The resource used to exist and was removed on purpose.

    When: Stronger than 404: tells crawlers to drop the URL for good.

  • 411

    Length Required

    The server requires a Content-Length header.

    When: The request had a body without a declared length.

  • 412

    Precondition Failed

    A condition in the request headers was false.

    When: If-Match / If-Unmodified-Since failed: the resource changed since the client read it.

  • 413

    Content Too Large

    The request body is larger than the server allows.

    When: File upload over the limit. Formerly "Payload Too Large".

  • 414

    URI Too Long

    The URL is longer than the server will accept.

    When: Usually a runaway query string; move the data to a POST body.

  • 415

    Unsupported Media Type

    Common

    The body format is not supported.

    When: Wrong Content-Type, for example form data sent to a JSON-only endpoint.

  • 416

    Range Not Satisfiable

    The requested byte range is outside the resource.

    When: Bad Range header; reply includes the real size in Content-Range.

  • 417

    Expectation Failed

    The server cannot meet the Expect header.

    When: Typically an Expect: 100-continue the server will not honour.

  • 418

    I'm a teapot

    An April Fools' joke code from RFC 2324: the server refuses to brew coffee because it is a teapot.

    When: Not for real use, though some services use it to block bots.

  • 421

    Misdirected Request

    The request was sent to a server that cannot produce a response for it.

    When: HTTP/2 connection reuse hit the wrong host.

  • 422

    Unprocessable Content

    Common

    The request is well-formed but its content is semantically invalid.

    When: Validation errors on valid JSON: an email field that is not an email.

  • 423

    Locked

    The resource is locked (WebDAV).

    When: Another user holds a lock on it.

  • 424

    Failed Dependency

    The request failed because an earlier request failed (WebDAV).

    When: Part of a multi-step operation did not succeed.

  • 425

    Too Early

    The server will not risk processing a request that might be replayed.

    When: TLS 1.3 early-data requests.

  • 426

    Upgrade Required

    The client must switch to a different protocol.

    When: Reply with an Upgrade header, e.g. to TLS or a newer HTTP version.

  • 428

    Precondition Required

    The server requires the request to be conditional.

    When: Forces If-Match to prevent lost updates.

  • 429

    Too Many Requests

    Common

    The client has sent too many requests in a given time (rate limiting).

    When: Send a Retry-After header. Clients should back off before retrying.

  • 431

    Request Header Fields Too Large

    The headers, or one header, are too large.

    When: Often huge cookies; clear them or raise the server limit.

  • 451

    Unavailable For Legal Reasons

    The resource is blocked for legal reasons.

    When: Court orders, takedowns, geoblocking. The number is a nod to Fahrenheit 451.

  • 499

    Client Closed Request

    nginx

    The client closed the connection before the server answered.

    When: Seen in nginx logs when users cancel or time out; not sent to anyone.

5xx · Server error

The server failed to fulfil a valid request.

  • 500

    Internal Server Error

    Common

    An unexpected error on the server.

    When: The generic "something broke": an unhandled exception. Check the server logs.

  • 501

    Not Implemented

    The server does not support the requested feature or method.

    When: An unknown method or unbuilt endpoint.

  • 502

    Bad Gateway

    Common

    A gateway or proxy got an invalid response from the upstream server.

    When: The app behind nginx/a load balancer crashed or returned garbage.

  • 503

    Service Unavailable

    Common

    The server is temporarily unable to handle the request.

    When: Maintenance or overload. Send Retry-After; search engines treat it as temporary.

  • 504

    Gateway Timeout

    Common

    A gateway or proxy did not get a timely response from the upstream.

    When: The backend was too slow; raise timeouts or speed up the endpoint.

  • 505

    HTTP Version Not Supported

    The server does not support the HTTP version used.

    When: Very rare.

  • 506

    Variant Also Negotiates

    Content negotiation is misconfigured and loops.

    When: A server configuration error.

  • 507

    Insufficient Storage

    The server cannot store what is needed to complete the request (WebDAV).

    When: Disk quota or space exhausted.

  • 508

    Loop Detected

    The server detected an infinite loop while processing (WebDAV).

    When: Circular bindings.

  • 510

    Not Extended

    Further extensions to the request are required.

    When: Obsolete.

  • 511

    Network Authentication Required

    The client must authenticate to gain network access.

    When: Captive portals on public Wi-Fi.

  • 520

    Web Server Returned an Unknown Error

    Cloudflare

    The origin server returned something Cloudflare could not interpret.

    When: Check origin crashes, empty responses or oversized headers.

  • 521

    Web Server Is Down

    Cloudflare

    The origin server refused the connection.

    When: The origin is offline or blocking Cloudflare's IPs.

  • 522

    Connection Timed Out

    Cloudflare

    Cloudflare could not complete a TCP connection to the origin.

    When: Origin overloaded or firewalled.

  • 523

    Origin Is Unreachable

    Cloudflare

    Cloudflare cannot reach the origin server.

    When: DNS record points to the wrong or dead IP.

  • 524

    A Timeout Occurred

    Cloudflare

    Connected to the origin, but it did not reply in time (about 100 s).

    When: A very slow request; make it asynchronous.

  • 525

    SSL Handshake Failed

    Cloudflare

    Cloudflare could not negotiate TLS with the origin.

    When: Origin TLS config or cipher mismatch.

  • 526

    Invalid SSL Certificate

    Cloudflare

    The origin's TLS certificate is not valid.

    When: Expired, self-signed or wrong host while SSL mode is Full (strict).

About this tool

Every standard HTTP status code from 100 to 511, grouped into informational (1xx), success (2xx), redirection (3xx), client error (4xx) and server error (5xx). Each entry gives a one-line meaning and when a server should send it or what a client should do.

Search by number (404, or 40 for the whole 40x range), by name, or by what you are trying to do — try "rate limit", "redirect" or "timeout". Filter by class, or tick Common only to see the dozen-or-so codes you will meet in everyday API and web work.

A few widely seen non-standard codes are included and labelled by vendor: nginx 499 and the Cloudflare 52x errors.

Frequently asked questions

What is the difference between 401 and 403?

401 means the request is not authenticated: credentials are missing or invalid. 403 means the server knows who you are and still refuses; logging in again will not help.

What is the difference between 301 and 302?

301 is a permanent redirect — search engines move ranking to the new URL. 302 is temporary, so the old URL stays indexed. 308 and 307 are the same pair but keep the request method, so a POST stays a POST.

Should I return 400 or 422 for validation errors?

400 suits malformed requests, such as invalid JSON. 422 suits well-formed requests whose content fails validation, such as an invalid email address. Many APIs use 400 for both; pick one and be consistent.

What do 502, 503 and 504 mean?

502: the gateway got a bad response from the app behind it. 503: the service is unavailable, usually overloaded or in maintenance. 504: the gateway timed out waiting for the app.

Related tools