Developer Reference
HTTP Status Codes Reference
HTTP status codes reference: complete list of 1xx, 2xx, 3xx, 4xx, and 5xx response codes for web developers. Free and searchable.
HTTP status codes are three-digit responses your browser and APIs send back to indicate the outcome of a request. Understanding these codes is essential for debugging web applications, interpreting API behaviour, and writing resilient client code. This reference covers all official status codes across all classes.
1xx — Informational
| Code | Name | Meaning |
|---|---|---|
100 | Continue | Client should continue with the request body. |
101 | Switching Protocols | Server is switching protocols as requested (e.g. to WebSocket). |
102 | Processing | Server has received the request but no response is available yet (WebDAV). |
103 | Early Hints | Preload hints sent before the final response. |
2xx — Success
| Code | Name | Meaning |
|---|---|---|
200 | OK | Standard success response. |
201 | Created | Request succeeded and a new resource was created. |
202 | Accepted | Request accepted for processing, not yet completed. |
204 | No Content | Success, but there is no body to return. |
206 | Partial Content | Server is delivering part of the resource (range request). |
3xx — Redirection
| Code | Name | Meaning |
|---|---|---|
301 | Moved Permanently | Resource has permanently moved to a new URL. |
302 | Found | Resource temporarily under a different URL. |
303 | See Other | Get the resource from another URL with GET. |
304 | Not Modified | Cached version is still valid; no body sent. |
307 | Temporary Redirect | Temporary redirect that preserves the HTTP method. |
308 | Permanent Redirect | Permanent redirect that preserves the HTTP method. |
4xx — Client Errors
| Code | Name | Meaning |
|---|---|---|
400 | Bad Request | Malformed request syntax or invalid framing. |
401 | Unauthorized | Authentication required or failed. |
403 | Forbidden | Authenticated but not allowed to access. |
404 | Not Found | Resource does not exist at this URL. |
405 | Method Not Allowed | HTTP method not supported for this resource. |
408 | Request Timeout | Server timed out waiting for the request. |
409 | Conflict | Request conflicts with the current server state. |
410 | Gone | Resource permanently removed with no forwarding. |
415 | Unsupported Media Type | Payload format is not supported. |
418 | I'm a teapot | April Fools joke code (RFC 2324); occasionally used. |
422 | Unprocessable Entity | Request understood but semantically invalid. |
429 | Too Many Requests | Rate limit exceeded. |
5xx — Server Errors
| Code | Name | Meaning |
|---|---|---|
500 | Internal Server Error | Generic server-side failure. |
501 | Not Implemented | Server does not support the functionality. |
502 | Bad Gateway | Invalid response from an upstream server. |
503 | Service Unavailable | Server overloaded or down for maintenance. |
504 | Gateway Timeout | Upstream server did not respond in time. |
507 | Insufficient Storage | Server cannot store the representation (WebDAV). |
How this reference is used
- Debugging API integration when your client receives unexpected response codes
- Understanding server error logs and determining whether to retry a failed request
- Implementing proper error handling in applications based on response code classes
- Designing API error responses that follow HTTP standards and are predictable to consumers
Frequently asked questions
What is the difference between 4xx and 5xx status codes?
4xx codes indicate a client-side error (invalid request, missing auth, resource not found), meaning the client should not retry without changes. 5xx codes indicate server-side errors, suggesting the server failed to fulfil a valid request and the client may retry later.
When should I use 301 vs 302 redirects?
Use 301 (Moved Permanently) for permanent URL changes and SEO migrations, as search engines and browsers will cache the redirect. Use 302 (Found) for temporary redirects that may change, ensuring clients re-check the original URL later.
Why do some APIs return 200 with an error message instead of 4xx or 5xx?
Some older APIs return 200 to avoid triggering error handlers, placing error details in the response body instead. This is a poor practice; modern REST APIs should use appropriate status codes to signal failures, enabling proper error handling on clients.