BackendBench
Coffee
Free tool

HTTP status codes

Every common status code in plain English. Search by number or name, or filter by class.

100 Continue ยท Informational

The server received the request headers; the client should send the body.

101 Switching Protocols ยท Informational

The server is switching protocols as requested, for example to WebSocket.

102 Processing ยท Informational

The server is still processing the request (WebDAV).

103 Early Hints ยท Informational

Lets the browser start preloading resources while the server prepares the response.

200 OK ยท Success

The request succeeded.

201 Created ยท Success

The request succeeded and a new resource was created, usually after a POST.

202 Accepted ยท Success

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

203 Non-Authoritative Information ยท Success

The response came from a proxy and may differ from the origin server.

204 No Content ยท Success

The request succeeded and there is nothing to return. Common for DELETE and PUT.

205 Reset Content ยท Success

Tells the client to reset the document view, for example clear a form.

206 Partial Content ยท Success

Only part of the resource is returned, in response to a Range request.

301 Moved Permanently ยท Redirection

The resource has a new permanent URL. Search engines transfer ranking to it.

302 Found ยท Redirection

Temporary redirect. The client should keep using the original URL in future.

303 See Other ยท Redirection

Redirects to another URL, which should be fetched with GET.

304 Not Modified ยท Redirection

The cached version is still valid, so no body is sent.

307 Temporary Redirect ยท Redirection

Temporary redirect that keeps the same HTTP method.

308 Permanent Redirect ยท Redirection

Permanent redirect that keeps the same HTTP method.

400 Bad Request ยท Client error

The server cannot process the request because of a client error, such as malformed JSON.

401 Unauthorized ยท Client error

Authentication is required or has failed. Despite the name, it means unauthenticated.

402 Payment Required ยท Client error

Reserved for future use; some APIs use it for billing limits.

403 Forbidden ยท Client error

The server understood the request but refuses it. The identity is known, but not allowed.

404 Not Found ยท Client error

The resource does not exist at this URL.

405 Method Not Allowed ยท Client error

The HTTP method is not supported for this resource. The Allow header lists valid ones.

406 Not Acceptable ยท Client error

The server cannot produce a response matching the Accept headers.

408 Request Timeout ยท Client error

The server timed out waiting for the request.

409 Conflict ยท Client error

The request conflicts with the current state, for example a duplicate or an edit conflict.

410 Gone ยท Client error

The resource used to exist and was deliberately removed, permanently.

411 Length Required ยท Client error

The request needs a Content-Length header.

412 Precondition Failed ยท Client error

A condition in the request headers, such as If-Match, was not met.

413 Payload Too Large ยท Client error

The request body is larger than the server allows.

414 URI Too Long ยท Client error

The URL is longer than the server will process.

415 Unsupported Media Type ยท Client error

The Content-Type of the request body is not supported.

418 I'm a teapot ยท Client error

An April Fools joke from RFC 2324. Some servers use it to reject bots.

422 Unprocessable Content ยท Client error

The request is well-formed but fails validation. Common for APIs.

423 Locked ยท Client error

The resource is locked (WebDAV).

425 Too Early ยท Client error

The server will not process a request that might be replayed.

426 Upgrade Required ยท Client error

The client must switch to a different protocol.

428 Precondition Required ยท Client error

The server requires the request to be conditional.

429 Too Many Requests ยท Client error

Rate limit exceeded. Look for a Retry-After header.

431 Request Header Fields Too Large ยท Client error

The request headers are too large.

451 Unavailable For Legal Reasons ยท Client error

The resource is blocked for legal reasons.

500 Internal Server Error ยท Server error

A generic server error. Something went wrong that the server cannot describe more precisely.

501 Not Implemented ยท Server error

The server does not support the functionality required for this request.

502 Bad Gateway ยท Server error

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

503 Service Unavailable ยท Server error

The server is temporarily unable to handle the request, for example overloaded or down for maintenance.

504 Gateway Timeout ยท Server error

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

505 HTTP Version Not Supported ยท Server error

The HTTP version in the request is not supported.

507 Insufficient Storage ยท Server error

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

511 Network Authentication Required ยท Server error

The client must authenticate to gain network access, as on a captive portal.

Status codes by class

  • 1xx informational: the request is in progress.
  • 2xx success: it worked.
  • 3xx redirection: look somewhere else.
  • 4xx client error: the request is the problem.
  • 5xx server error: the server is the problem.

Picking the precise code makes APIs easier to debug and lets clients react correctly: retry on 503, re-authenticate on 401, fix the input on 422.

Frequently asked questions

What is the difference between 401 and 403?

401 Unauthorized really means unauthenticated: the server does not know who you are. 403 Forbidden means it knows who you are and you are not allowed.

When should an API return 400, 422 or 409?

400 for a request that cannot be parsed, 422 for well-formed data that fails validation, and 409 for a conflict with the current state such as a duplicate.

What is the difference between 301 and 302?

301 is a permanent redirect (search engines move ranking to the new URL). 302 is temporary. 307 and 308 are the same as 302 and 301 but never change the HTTP method.

What do 502, 503 and 504 mean?

502: a proxy got a bad answer from the app behind it. 503: the service is temporarily unavailable or overloaded. 504: the proxy waited too long for the app.

More tools you might need