HTTP status codes
Search every common HTTP response code by number or name, with what it means and what usually causes it.
| 100 | Continue The server got the request headers; the client should send the body. |
| 101 | Switching Protocols The server agrees to switch protocol, e.g. to WebSocket. |
| 103 | Early Hints Preload hints sent before the final response. |
| 200 | OK The request succeeded. |
| 201 | Created A new resource was created, usually after POST. The Location header points to it. |
| 202 | Accepted Accepted for processing, which hasn’t finished yet. |
| 204 | No Content Success with no response body, common for DELETE and PUT. |
| 206 | Partial Content Part of the resource, in response to a Range header (video seeking, resumed downloads). |
| 301 | Moved Permanently The URL has moved for good. Search engines transfer ranking to the new URL. |
| 302 | Found Temporary redirect. Browsers may change POST to GET. |
| 303 | See Other Redirect to another URL with GET, typically after a form POST. |
| 304 | Not Modified The cached copy is still valid (after If-None-Match or If-Modified-Since). |
| 307 | Temporary Redirect Temporary redirect that keeps the method and body. |
| 308 | Permanent Redirect Permanent redirect that keeps the method and body. |
| 400 | Bad Request The request is malformed — bad syntax, invalid JSON or missing parameters. |
| 401 | Unauthorized Authentication is missing or invalid. Despite the name, it means unauthenticated. |
| 402 | Payment Required Reserved; some APIs use it for billing problems. |
| 403 | Forbidden Authenticated (or not) but not allowed to access this resource. |
| 404 | Not Found Nothing exists at this URL, or the server won’t reveal that it does. |
| 405 | Method Not Allowed The URL exists but doesn’t accept this method (e.g. POST). See the Allow header. |
| 406 | Not Acceptable The server can’t produce a format matching the Accept headers. |
| 408 | Request Timeout The client took too long to send the request. |
| 409 | Conflict The request conflicts with the current state, e.g. an edit conflict or duplicate. |
| 410 | Gone The resource was deliberately removed and won’t come back. |
| 411 | Length Required The server needs a Content-Length header. |
| 412 | Precondition Failed An If-Match or similar condition wasn’t met. |
| 413 | Content Too Large The request body is larger than the server allows (file upload limits). |
| 414 | URI Too Long The URL is too long, often from a huge query string. |
| 415 | Unsupported Media Type The body’s Content-Type isn’t supported. |
| 416 | Range Not Satisfiable The requested byte range is outside the file. |
| 418 | I’m a teapot An April Fools’ joke from RFC 2324, kept for fun. |
| 422 | Unprocessable Content Well-formed but semantically invalid, e.g. validation errors. |
| 425 | Too Early The server won’t risk processing a request that might be replayed. |
| 426 | Upgrade Required The client must switch to another protocol, such as TLS. |
| 428 | Precondition Required The server requires a conditional request to avoid lost updates. |
| 429 | Too Many Requests Rate limited. Check the Retry-After header before trying again. |
| 431 | Request Header Fields Too Large Headers (often cookies) are too big. |
| 451 | Unavailable For Legal Reasons Blocked for legal reasons, such as a court order. |
| 500 | Internal Server Error A generic server-side failure — check the server logs. |
| 501 | Not Implemented The server doesn’t support the functionality required. |
| 502 | Bad Gateway A proxy or gateway got an invalid response from the upstream server. |
| 503 | Service Unavailable Overloaded or down for maintenance. Often temporary; may include Retry-After. |
| 504 | Gateway Timeout A proxy or gateway didn’t get a response from upstream in time. |
| 505 | HTTP Version Not Supported The server doesn’t support the HTTP version used. |
| 507 | Insufficient Storage The server can’t store what’s needed to complete the request (WebDAV). |
| 511 | Network Authentication Required You need to log in to the network, e.g. a hotel Wi-Fi portal. |
No code matches.
Runs entirely in your browser. Nothing you enter is sent to a server.
The five classes
- 1xx informational — the request is in progress.
- 2xx success.
- 3xx redirection — the client needs to go somewhere else.
- 4xx client errors — fix the request.
- 5xx server errors — the server failed on a valid request.
Redirects and SEO
Use 301 (or 308) when a page has moved for good, so search engines move its ranking to the new address. Use 302 or 307 only for temporary moves. Returning 200 for a missing page (“soft 404”) confuses search engines; return a real 404 or 410.
Debugging an API response? Pretty-print the body with the JSON formatter and decode tokens with the JWT decoder.
Frequently asked questions
What’s the difference between 401 and 403?
401 means you aren’t authenticated (log in or send a valid token). 403 means the server knows who you are but you aren’t allowed.
What causes a 502 Bad Gateway?
A proxy, load balancer or CDN couldn’t get a valid response from the server behind it — often because that server crashed, restarted or timed out.
Should I use 301 or 308?
Both are permanent. 308 guarantees the method and body are kept (important for POST APIs); 301 is fine for normal pages.