HTTP Status Code Reference
HTTP status code reference with searchable definitions and practical use cases for 1xx informational, 2xx success, 3xx redirection, 4xx client error, and 5xx server error.
Total
48
1xx
4
2xx
5
3xx
7
4xx
22
5xx
10
| Code | Title | Class | Description | Typical use |
|---|---|---|---|---|
| 1xx Informational · 100~103 | ||||
| 100 | Continue | 1xx Informational | Request headers received, continue sending body. | Large upload handshakes |
| 101 | Switching Protocols | 1xx Informational | Server is switching protocols as requested. | WebSocket upgrade |
| 102 | Processing | 1xx Informational | Server accepted but is still processing. | Long-running WebDAV operations |
| 103 | Early Hints | 1xx Informational | Preliminary response with link hints. | Preload assets early |
| 2xx Success · 200~206 | ||||
| 200 | OK | 2xx Success | Request succeeded. | Standard API or page response |
| 201 | Created | 2xx Success | Resource created successfully. | POST create endpoints |
| 202 | Accepted | 2xx Success | Accepted for async processing. | Queue-based workflows |
| 204 | No Content | 2xx Success | Success with no response body. | DELETE or idempotent updates |
| 206 | Partial Content | 2xx Success | Partial range response. | Media streaming and resume download |
| 3xx Redirection · 300~308 | ||||
| 300 | Multiple Choices | 3xx Redirection | Multiple representations available. | Variant negotiation |
| 301 | Moved Permanently | 3xx Redirection | Permanent redirect to new URL. | Canonical URL migration |
| 302 | Found | 3xx Redirection | Temporary redirect. | Short-lived relocation |
| 303 | See Other | 3xx Redirection | Redirect to retrieval endpoint. | Post/Redirect/Get pattern |
| 304 | Not Modified | 3xx Redirection | Cached version is still valid. | Conditional requests with ETag |
| 307 | Temporary Redirect | 3xx Redirection | Temporary redirect preserving method. | Safe temporary reroute |
| 308 | Permanent Redirect | 3xx Redirection | Permanent redirect preserving method. | Strict migration of APIs |
| 4xx Client Error · 400~451 | ||||
| 400 | Bad Request | 4xx Client Error | Invalid request syntax or payload. | Schema validation failures |
| 401 | Unauthorized | 4xx Client Error | Authentication required or invalid. | Missing/invalid token |
| 403 | Forbidden | 4xx Client Error | Authenticated but not allowed. | Role or policy denial |
| 404 | Not Found | 4xx Client Error | Resource not found. | Unknown route or identifier |
| 405 | Method Not Allowed | 4xx Client Error | HTTP method not supported. | Wrong verb on endpoint |
| 406 | Not Acceptable | 4xx Client Error | No acceptable representation available. | Content negotiation mismatch |
| 408 | Request Timeout | 4xx Client Error | Client took too long. | Idle client connection |
| 409 | Conflict | 4xx Client Error | Request conflicts with current state. | Versioning or duplicate conflict |
| 410 | Gone | 4xx Client Error | Resource permanently removed. | Intentional endpoint retirement |
| 412 | Precondition Failed | 4xx Client Error | Conditional header precondition failed. | If-Match mismatch |
| 413 | Payload Too Large | 4xx Client Error | Request body exceeds limit. | Upload size enforcement |
| 414 | URI Too Long | 4xx Client Error | Request URI is too long. | Oversized query string |
| 415 | Unsupported Media Type | 4xx Client Error | Content type not supported. | Invalid upload media type |
| 418 | I'm a teapot | 4xx Client Error | RFC joke code, rarely used in prod. | Debug/easter egg responses |
| 421 | Misdirected Request | 4xx Client Error | Request sent to wrong server. | HTTP/2 authority mismatch |
| 422 | Unprocessable Content | 4xx Client Error | Well-formed but semantic errors. | Business rule validation errors |
| 425 | Too Early | 4xx Client Error | Server unwilling to risk replay. | Early data replay protection |
| 426 | Upgrade Required | 4xx Client Error | Client must switch protocol. | Require TLS or newer protocol |
| 428 | Precondition Required | 4xx Client Error | Server requires conditional request. | Lost-update prevention |
| 429 | Too Many Requests | 4xx Client Error | Rate limit exceeded. | Throttle abusive traffic |
| 431 | Request Header Fields Too Large | 4xx Client Error | Headers exceed acceptable size. | Oversized cookies/headers |
| 451 | Unavailable For Legal Reasons | 4xx Client Error | Blocked by legal requirement. | Compliance takedown restrictions |
| 5xx Server Error · 500~511 | ||||
| 500 | Internal Server Error | 5xx Server Error | Unexpected server-side failure. | Unhandled exceptions |
| 501 | Not Implemented | 5xx Server Error | Feature not implemented. | Unsupported endpoint capability |
| 502 | Bad Gateway | 5xx Server Error | Invalid response from upstream. | Proxy or gateway upstream errors |
| 503 | Service Unavailable | 5xx Server Error | Service temporarily unavailable. | Maintenance or overload |
| 504 | Gateway Timeout | 5xx Server Error | Upstream timed out. | Dependency timeout propagation |
| 505 | HTTP Version Not Supported | 5xx Server Error | HTTP version not supported. | Legacy protocol rejection |
| 507 | Insufficient Storage | 5xx Server Error | Server cannot store representation. | Storage quota exhaustion |
| 508 | Loop Detected | 5xx Server Error | Infinite loop detected during processing. | Recursive WebDAV operations |
| 510 | Not Extended | 5xx Server Error | Further extensions required. | Extension policy requirements |
| 511 | Network Authentication Required | 5xx Server Error | Network authentication required. | Captive portal environments |
What is HTTP?
HTTP (Hypertext Transfer Protocol) is the request-response protocol used by browsers, mobile apps, and APIs to communicate with web servers.
A client sends a request (method, URL, headers, body), and the server returns a response (status code, headers, body). The status code is the first signal that tells clients whether the request succeeded, failed, or should be redirected.
In production systems, correct status codes improve caching, retry logic, monitoring, SEO behavior, and developer debugging speed.
How to read HTTP status code classes
1xx · Informational
Request received, processing continues.
2xx · Success
Request completed successfully.
3xx · Redirection
Client should perform another request to a different URL.
4xx · Client Error
Request is invalid or unauthorized from client side.
5xx · Server Error
Server failed to process a valid request.
Response examples by code
200 OK (JSON API)
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "user_123",
"name": "Alex",
"email": "[email protected]"
}404 Not Found
HTTP/1.1 404 Not Found
Content-Type: application/json
{
"error": "RESOURCE_NOT_FOUND",
"message": "User does not exist."
}429 Too Many Requests
HTTP/1.1 429 Too Many Requests
Retry-After: 60
Content-Type: application/json
{
"error": "RATE_LIMITED",
"message": "Try again after 60 seconds."
}Common implementation mistakes
Returning 200 for every API response hides failures from clients. Use semantically correct status codes so retries, alerts, and analytics behave correctly.
Confusing 401 and 403 is another common issue. Use 401 for authentication failures and 403 for authorization denial after identity is known.
Use 429 for rate limiting and include backoff hints where possible. Avoid masking upstream gateway failures (502/504) as generic 500 errors.