toolqik

64 · API & Webhooks

HTTP Status Code Lookup

Every HTTP status code explained, with common causes and fixes.

Runs in your browser
CodeNameMeaningTypical cause / what to do
100ContinueThe server received the request headers; the client should send the body.Sent when the client used Expect: 100-continue before uploading a large body.
101Switching ProtocolsThe server is switching to the protocol the client asked for in the Upgrade header.Normal when opening a WebSocket connection.
102ProcessingWebDAV: the server has accepted the request but hasn’t finished.Deprecated; rarely seen today.
103Early HintsPreliminary headers, usually Link preloads, sent before the final response.Lets browsers start loading CSS and fonts while the server is still working.
200OKThe request succeeded.The standard success response for GET, and for POST or PUT that return a body.
201CreatedA new resource was created.Return it from POST; include a Location header pointing at the new resource.
202AcceptedThe request was accepted for processing, but isn’t finished.Use for queued or asynchronous jobs; give the client a way to check the status.
203Non-Authoritative InformationThe returned metadata comes from a copy, not the origin server.Seen with some transforming proxies.
204No ContentSuccess, with no response body.Common for DELETE and for PUT or PATCH that return nothing. Don’t send a body.
205Reset ContentSuccess; the client should reset the form or view that sent the request.Rarely used.
206Partial ContentOnly part of the resource is returned, as asked by a Range header.Used for resumable downloads and video seeking.
207Multi-StatusWebDAV: the body contains separate statuses for several resources.Used by WebDAV and some batch APIs.
208Already ReportedWebDAV: members of a binding were already listed earlier.Rare.
226IM UsedThe response is the result of instance manipulations (delta encoding).Rare.
300Multiple ChoicesThere are several possible representations; the client should choose.Rarely used in practice.
301Moved PermanentlyThe resource has a new permanent URL, given in Location.Search engines move ranking to the new URL. Browsers may change POST to GET; use 308 to keep the method.
302FoundThe resource is temporarily at another URL, given in Location.Browsers usually follow with GET. Use 307 to keep the method.
303See OtherGet the result from another URL with GET.Use after a form POST to redirect to a result page (Post/Redirect/Get).
304Not ModifiedThe cached copy is still valid; no body is sent.Response to a conditional request with If-None-Match or If-Modified-Since.
307Temporary RedirectTemporarily at another URL; repeat the request there with the same method and body.The method-preserving version of 302.
308Permanent RedirectPermanently at another URL; repeat the request with the same method and body.The method-preserving version of 301.
400Bad RequestThe server can’t process the request because it’s malformed.Invalid JSON, missing required fields, or bad parameters. Return details of what’s wrong.
401UnauthorizedAuthentication is required or failed.Missing, expired or invalid credentials. Send a WWW-Authenticate header. (It really means “unauthenticated”.)
402Payment RequiredReserved for payment; some APIs use it when a plan limit or bill is unpaid.Check your billing or plan.
403ForbiddenThe server understood who you are but refuses the request.The user lacks permission. Logging in again won’t help, unlike 401.
404Not FoundNo resource exists at this URL.Wrong path or ID, or a deleted resource. Also used to hide resources from unauthorised users.
405Method Not AllowedThe URL exists but doesn’t support this HTTP method.For example, POST to a read-only endpoint. Include an Allow header listing valid methods.
406Not AcceptableNo representation matches the Accept headers.The client asked for a format the server can’t produce.
407Proxy Authentication RequiredLike 401, but for a proxy between client and server.Configure proxy credentials.
408Request TimeoutThe server gave up waiting for the client to finish sending the request.Slow or stalled uploads. Safe to retry.
409ConflictThe request conflicts with the current state of the resource.Duplicate unique values, edit conflicts, or invalid state transitions.
410GoneThe resource existed but was permanently removed.Tells clients and search engines to stop asking.
411Length RequiredThe server requires a Content-Length header.Send the body length, or use chunked encoding if allowed.
412Precondition FailedA condition in the request headers, such as If-Match, was false.Used for optimistic concurrency: someone else changed the resource first.
413Content Too LargeThe request body is larger than the server accepts.Upload limits in the app, nginx (client_max_body_size) or a load balancer.
414URI Too LongThe URL is longer than the server accepts.Move large parameters from the query string into a POST body.
415Unsupported Media TypeThe server doesn’t accept the request body’s format.Usually a missing or wrong Content-Type, such as sending JSON without application/json.
416Range Not SatisfiableThe requested byte range is outside the resource.The client asked for bytes beyond the end of the file.
417Expectation FailedThe server can’t meet the Expect header.Rare; usually about Expect: 100-continue.
418I'm a teapotAn April Fools’ joke from RFC 2324; the server refuses to brew coffee.Some APIs use it for blocked or joke requests.
421Misdirected RequestThe request reached a server that can’t answer for that host.Seen with HTTP/2 connection reuse across hostnames that share a certificate.
422Unprocessable ContentThe body is well-formed but has semantic errors.Validation failures: the JSON parses, but values are invalid. Popular in REST APIs.
423LockedWebDAV: the resource is locked.Wait for the lock to be released.
424Failed DependencyWebDAV: failed because a previous request failed.Rare.
425Too EarlyThe server won’t risk processing a request that might be replayed.Related to TLS 1.3 early data (0-RTT).
426Upgrade RequiredThe client must switch to another protocol, named in the Upgrade header.For example, a newer TLS or HTTP version.
428Precondition RequiredThe server requires a conditional request, such as If-Match.Prevents lost updates; fetch the ETag first.
429Too Many RequestsThe client sent too many requests in a given time (rate limiting).Slow down and retry after the Retry-After header; use exponential backoff.
431Request Header Fields Too LargeThe headers, or one header, are too large.Often oversized cookies. Clear cookies or reduce header size.
451Unavailable For Legal ReasonsThe resource can’t be provided for legal reasons, such as a court order.Named after Fahrenheit 451.
500Internal Server ErrorAn unexpected error happened on the server.A bug or unhandled exception. Check the server logs; never expose stack traces to clients.
501Not ImplementedThe server doesn’t support the functionality required.Usually an unrecognised HTTP method.
502Bad GatewayA gateway or proxy got an invalid response from the upstream server.The app behind nginx, a load balancer or a CDN crashed, refused the connection or sent garbage.
503Service UnavailableThe server is temporarily unable to handle the request.Overload or maintenance. Send Retry-After. Free hosting tiers return it while waking up.
504Gateway TimeoutA gateway or proxy didn’t get a response from upstream in time.The app is too slow or hung. Check slow queries and upstream timeouts.
505HTTP Version Not SupportedThe server doesn’t support the HTTP version used.Rare.
506Variant Also NegotiatesA content-negotiation configuration error on the server.Rare.
507Insufficient StorageWebDAV: the server can’t store what’s needed to complete the request.Out of disk space or quota.
508Loop DetectedWebDAV: the server found an infinite loop while processing.Rare.
510Not ExtendedFurther extensions are required to fulfil the request.Obsolete.
511Network Authentication RequiredThe client must sign in to the network, like Wi-Fi captive portals.Open a browser to complete the portal login.

About this tool

Every HTTP response starts with a three-digit status code, and the first digit tells you the category: 1xx informational, 2xx success, 3xx redirection, 4xx client error and 5xx server error. This reference covers every standard code from RFC 9110 and related specifications, with what it means, when servers send it and what to do about it. Link directly to a code, for example /http-status-codes/#429.

The codes you’ll see most

  • 200 / 201 / 204: success, created, success with no body.
  • 301 / 308 vs 302 / 307: permanent vs temporary redirects; 307 and 308 keep the method and body.
  • 304: your cached copy is still good.
  • 400 / 422: the request is malformed, or valid in form but not in content.
  • 401 vs 403: not authenticated (log in) vs not allowed (logging in won’t help).
  • 404 / 410: not found, or gone for good.
  • 429: rate limited; wait for Retry-After.
  • 500 / 502 / 503 / 504: app error, bad upstream response, unavailable, upstream timeout.

Choosing codes for your API

Be consistent and specific: 201 with a Location header for creation, 204 for deletes, 400 or 422 with a useful error body for invalid input, 409 for conflicts, and 429 with Retry-After for rate limits. Never return 200 with an error message in the body; clients and monitoring rely on the status code.

FAQ

What is the difference between 401 and 403?

401 Unauthorized means the request isn’t authenticated (missing or invalid credentials). 403 Forbidden means the server knows who you are but you don’t have permission.

What causes a 502 Bad Gateway?

A proxy, load balancer or CDN couldn’t get a valid response from the application behind it, usually because the app crashed, is restarting or refused the connection.

What does 429 Too Many Requests mean?

You hit a rate limit. Wait for the time in the Retry-After header, and use exponential backoff in clients.

Should I use 400 or 422 for validation errors?

Both are used. 400 is for malformed requests; many APIs use 422 when the JSON is valid but the values fail validation.

What is the difference between 301 and 308?

Both are permanent redirects, but 308 guarantees the method and body are kept, while clients may change a 301 POST into a GET.

esc
↑↓ navigate↵ open