HTTP Status Codes Reference
Every common HTTP status code with its name and meaning, grouped by class, with the codes you meet most often and when to choose each one.
By the tools4free.dev team · Last reviewed 4 December 2026
How to read this reference
Every HTTP response starts with a three-digit status code. The first digit gives the class, and the class alone tells you the broad outcome: 1xx is informational, 2xx is success, 3xx is redirection, 4xx is a client error and 5xx is a server error. The other two digits identify the specific result. A client that does not recognise a code must treat it like the first code of its class, so an unknown 499 is handled as a 400.
The tables below are grouped by class. Each row gives the code, the standard name and a short note on when it appears and what to do about it. The names follow the current HTTP semantics standard, RFC 9110, and the registry kept by IANA. A few codes come from other RFCs, such as the extra client-error codes in RFC 6585 or the WebDAV codes in RFC 4918, and those rows say so. We list the codes you are most likely to meet and leave out rarely used ones. The IANA registry is the complete list.
When you debug, read the code first, then the response body, then the headers. A Location header explains a redirect, Retry-After explains a 429 or 503, and WWW-Authenticate explains a 401. To take a URL apart, try the URL parser, and to read a JSON error body use the JSON formatter.
The ten codes you will meet most
| Code | Name | What it means |
|---|---|---|
200 | OK | The request worked. For GET the body holds the resource; for POST it holds the result. |
201 | Created | A new resource was made. The Location header should give its URL. |
204 | No Content | Success with no body. Common for DELETE and for PUT or PATCH when nothing needs returning. |
301 | Moved Permanently | The resource has a new permanent URL. Search engines transfer ranking to it. |
302 | Found | A temporary redirect. Keep using the original URL in future. |
304 | Not Modified | Your cached copy is still valid. No body is sent. |
400 | Bad Request | The server cannot process the request because of a client error, such as malformed syntax or invalid data. |
401 | Unauthorized | Authentication is missing or invalid. Despite the name, it means "not authenticated". |
403 | Forbidden | The server understood the request but refuses it. Logging in again will not help if you lack permission. |
404 | Not Found | No resource at this URL, or the server chooses not to say it exists. |
1xx: informational
Interim responses. The final response follows on the same connection. You rarely see them in a browser.
| Code | Name | What it means |
|---|---|---|
100 | Continue | The server has received the headers and the client may send the body. Used with the Expect: 100-continue header for large uploads. |
101 | Switching Protocols | The server agrees to change protocol, for example to WebSocket after an Upgrade request. |
103 | Early Hints | (RFC 8297) Lets the server send Link headers early so the browser can start loading resources before the final response. |
2xx: success
The request was received, understood and accepted.
| Code | Name | What it means |
|---|---|---|
200 | OK | Standard success. The meaning of the body depends on the method. |
201 | Created | The request created one or more resources. Typical result of a POST that adds a record. |
202 | Accepted | The request was accepted for processing, but the work is not finished. Used for queued or asynchronous jobs. |
203 | Non-Authoritative Information | Success, but a proxy changed the content from the origin server's 200 response. |
204 | No Content | Success and there is nothing to send back. The browser stays on the current page. |
205 | Reset Content | Success, and the client should reset the view that sent the request, such as clearing a form. |
206 | Partial Content | Only part of the resource is returned, as asked by a Range header. Used for resumable downloads and video seeking. |
207 | Multi-Status | (RFC 4918, WebDAV) The body holds several separate status codes for different parts of the request. |
3xx: redirection
The client must take further action, usually by requesting another URL from the Location header. The main choice is between a permanent and a temporary move, and whether the method must be preserved.
| Code | Name | What it means |
|---|---|---|
300 | Multiple Choices | Several representations are available. Rarely used in practice. |
301 | Moved Permanently | Permanent move. Clients may change a POST to a GET on the new URL, which is why 308 exists. |
302 | Found | Temporary move. Historically clients changed POST to GET; 307 was defined to keep the method. |
303 | See Other | Redirect to another resource with GET, typically after a POST. Used to avoid resubmitting a form on refresh. |
304 | Not Modified | Answer to a conditional request (If-None-Match or If-Modified-Since). The cached copy can be reused. |
307 | Temporary Redirect | Temporary move, and the client must repeat the same method and body. |
308 | Permanent Redirect | Permanent move, and the client must repeat the same method and body. |
| Need | Method preserved? | Use |
|---|---|---|
| Permanent, GET pages | Not important | 301 |
| Permanent, API or form endpoint | Yes | 308 |
| Temporary, GET pages | Not important | 302 |
| Temporary, API or form endpoint | Yes | 307 |
| After a successful POST, show a result page | Switch to GET | 303 |
4xx: client errors
The request has a problem on the client side. Repeating it unchanged will normally give the same answer.
| Code | Name | What it means |
|---|---|---|
400 | Bad Request | Malformed syntax, invalid framing or a body that fails validation. APIs often use it for invalid input. |
401 | Unauthorized | No valid credentials. The response should include a WWW-Authenticate header saying how to authenticate. |
402 | Payment Required | Reserved for future use by the standard. Some services use it for billing problems. |
403 | Forbidden | Credentials may be valid, but access is not allowed. |
404 | Not Found | The server found nothing at this URL. Also used to hide a resource from unauthorised users. |
405 | Method Not Allowed | The method is not supported for this URL. The Allow header lists those that are. |
406 | Not Acceptable | The server cannot produce a representation matching the Accept headers. |
407 | Proxy Authentication Required | Like 401, but the client must first authenticate with the proxy. |
408 | Request Timeout | The server gave up waiting for the client to finish sending the request. |
409 | Conflict | The request conflicts with the current state of the resource, such as an edit conflict or a duplicate. |
410 | Gone | The resource was here and is permanently removed. Stronger than 404. |
411 | Length Required | The server needs a Content-Length header. |
412 | Precondition Failed | A condition in the request headers, such as If-Match, evaluated to false. |
413 | Content Too Large | The request body is larger than the server will accept. Earlier called Payload Too Large. |
414 | URI Too Long | The URL is longer than the server will process. |
415 | Unsupported Media Type | The server does not accept the Content-Type of the body. |
416 | Range Not Satisfiable | The requested byte range lies outside the resource. |
417 | Expectation Failed | The server cannot meet the Expect request header. |
421 | Misdirected Request | The request was sent to a server that cannot give an answer for that host and scheme. |
422 | Unprocessable Content | The syntax is correct, but the content is semantically invalid. Popular for validation errors in APIs. |
426 | Upgrade Required | The client must switch to another protocol, named in the Upgrade header. |
428 | Precondition Required | (RFC 6585) The server requires the request to be conditional, to prevent lost updates. |
429 | Too Many Requests | (RFC 6585) Rate limit reached. A Retry-After header may say when to try again. |
431 | Request Header Fields Too Large | (RFC 6585) A single header or all headers together are too large. |
451 | Unavailable For Legal Reasons | (RFC 7725) Access is denied for a legal reason, such as a court order. |
The code 418, "I'm a teapot", comes from the April Fools' joke RFC 2324. HTTP semantics reserve it, and servers should not use it for real errors.
401 or 403?
Use 401 when the client has not proved who it is, or its credentials are wrong or expired: logging in could change the result. Use 403 when the server knows who the client is and the answer is still no. Use 404 instead of 403 when you do not want to reveal that a resource exists.
5xx: server errors
The server failed to handle a request that appears to be valid. These are the server owner's problem, and a retry may succeed.
| Code | Name | What it means |
|---|---|---|
500 | Internal Server Error | A generic failure: an unhandled exception or a configuration mistake. Check the server logs. |
501 | Not Implemented | The server does not support the method or feature that the request needs. |
502 | Bad Gateway | A gateway or proxy received an invalid response from the server behind it. |
503 | Service Unavailable | The server is overloaded or down for maintenance. A Retry-After header may say when to return. |
504 | Gateway Timeout | A gateway or proxy did not get a timely response from the upstream server. |
505 | HTTP Version Not Supported | The server does not support the HTTP version used in the request. |
507 | Insufficient Storage | (RFC 4918, WebDAV) The server cannot store what the request needs. |
511 | Network Authentication Required | (RFC 6585) The client must authenticate to gain network access, as with a captive portal. |
| Symptom | Likely code | First thing to check |
|---|---|---|
| Proxy cannot reach the app at all | 502 | Is the application process running and listening on the right port? |
| App is up but too slow to answer the proxy | 504 | Slow queries, long upstream calls or proxy timeout settings |
| Site is down for planned work or overloaded | 503 | Deployment state, capacity and the Retry-After header |
| Crash in application code | 500 | Error logs and stack traces |
Common mistakes
- Returning 200 with an error in the body. Monitoring, caches and clients rely on the status code. Use a real 4xx or 5xx.
- Using 404 for every failure. Separate "not found" from "not allowed" and from "invalid input".
- Using 302 where you mean permanent. A temporary redirect does not pass search ranking to the new address.
- Using 500 for client mistakes. A bad request is a 4xx. Reserve 5xx for server faults.
- Ignoring Retry-After. On 429 and 503, retrying instantly can make the situation worse.