HTTP Status Codes Cheat Sheet
Complete reference of HTTP response status codes. Organized by category with descriptions and common use cases.
1xx — Informational
The server has received the request and is continuing the process.
| Code | Name | Description |
|---|---|---|
| 100 | Continue | Server received request headers; client should send body. Used with Expect: 100-continue. |
| 101 | Switching Protocols | Server is switching protocols as requested (e.g., upgrading to WebSocket). |
| 102 | Processing | Server is processing the request but no response yet (WebDAV). |
| 103 | Early Hints | Server sends preliminary headers to let browser preload resources. |
2xx — Success
The request was successfully received, understood, and accepted.
| Code | Name | Description |
|---|---|---|
| 200 | OK | Standard success response. Body contains the result. GET request returns data; POST action completed. |
| 201 | Created | Resource successfully created. POST /users creates a new user; response includes Location header. |
| 202 | Accepted | Request accepted for processing but not completed yet. Background job queued; async processing. |
| 203 | Non-Authoritative Info | Response from a transforming proxy, not the origin server. |
| 204 | No Content | Success but no body in response. DELETE request; PUT that doesn't return updated resource. |
| 205 | Reset Content | Success; client should reset the document view (e.g., clear form). |
| 206 | Partial Content | Server delivering part of the resource due to Range header. Video streaming; file download resume. |
| 207 | Multi-Status | Multiple status codes for multiple operations (WebDAV). |
3xx — Redirection
Further action is needed to complete the request.
| Code | Name | Description |
|---|---|---|
| 300 | Multiple Choices | Multiple options for the resource (rare). |
| 301 | Moved Permanently | Resource permanently moved to new URL. Browsers cache this. Domain migration; HTTP to HTTPS redirect. |
| 302 | Found | Resource temporarily at a different URL. Temporary maintenance redirect. |
| 303 | See Other | Redirect to another resource using GET. After POST form submission, redirect to success page. |
| 304 | Not Modified | Cached version is still valid; no body sent. Browser cache validation with If-Modified-Since / ETag. |
| 307 | Temporary Redirect | Like 302 but method and body must not change. API version redirect preserving POST method. |
| 308 | Permanent Redirect | Like 301 but method and body must not change. |
Tip: Use
301 for permanent URL changes (SEO-friendly). Use 307/308 when you need to preserve the HTTP method (important for POST/PUT redirects).
4xx — Client Error
The request contains bad syntax or cannot be fulfilled.
| Code | Name | Description |
|---|---|---|
| 400 | Bad Request | Server cannot process due to malformed request. Invalid JSON body; missing required fields. |
| 401 | Unauthorized | Authentication required or failed. Missing or invalid JWT token; expired session. |
| 402 | Payment Required | Reserved for future use. Some APIs use for quota limits. |
| 403 | Forbidden | Server understood but refuses to authorize. User authenticated but lacks permissions. |
| 404 | Not Found | Resource does not exist at this URL. Wrong URL; deleted resource. |
| 405 | Method Not Allowed | HTTP method not supported for this endpoint. POST to a read-only endpoint. |
| 406 | Not Acceptable | Server can't produce a response matching Accept headers. |
| 407 | Proxy Auth Required | Must authenticate with the proxy first. |
| 408 | Request Timeout | Server timed out waiting for the request. |
| 409 | Conflict | Request conflicts with current state of the resource. Duplicate entry; edit conflict; version mismatch. |
| 410 | Gone | Resource permanently deleted (no forwarding). Intentionally removed API endpoint. |
| 411 | Length Required | Missing Content-Length header. |
| 412 | Precondition Failed | Precondition in headers evaluated to false. If-Match / If-Unmodified-Since conditions. |
| 413 | Payload Too Large | Request body exceeds server limits. File upload too big. |
| 414 | URI Too Long | URL exceeds server limits. |
| 415 | Unsupported Media Type | Content-Type not supported. Sending XML to a JSON-only endpoint. |
| 416 | Range Not Satisfiable | Range header specifies range outside file size. |
| 418 | I'm a Teapot | April Fools' joke (RFC 2324). Not expected in production. |
| 422 | Unprocessable Entity | Request is well-formed but semantically invalid. Validation errors (valid JSON but invalid data). |
| 429 | Too Many Requests | Rate limit exceeded. API throttling; includes Retry-After header. |
| 451 | Unavailable for Legal | Blocked for legal reasons (censorship, court order). |
401 vs 403:
401 means "who are you?" (not authenticated). 403 means "I know who you are, but you can't do this" (not authorized).
5xx — Server Error
The server failed to fulfill a valid request.
| Code | Name | Description |
|---|---|---|
| 500 | Internal Server Error | Generic server error. Something unexpected went wrong. Unhandled exception; bug in server code. |
| 501 | Not Implemented | Server doesn't support the request method. |
| 502 | Bad Gateway | Server acting as gateway got invalid response from upstream. Reverse proxy (Nginx) can't reach the app server. |
| 503 | Service Unavailable | Server is temporarily unable to handle requests. Server overloaded; maintenance mode. |
| 504 | Gateway Timeout | Gateway didn't get a response from upstream in time. Upstream server too slow or down. |
| 505 | HTTP Version Not Supported | Server doesn't support the HTTP version used. |
| 507 | Insufficient Storage | Server cannot store the representation (WebDAV). |
| 508 | Loop Detected | Server detected infinite loop processing the request. |
| 511 | Network Auth Required | Client must authenticate to access the network (captive portal). |
Quick Lookup — Most Used
| Code | When to Use |
|---|---|
200 | GET success, general success |
201 | POST created a new resource |
204 | DELETE success, no body needed |
301 | Permanent URL change |
304 | Resource not modified (use cache) |
400 | Bad request (malformed input) |
401 | Not authenticated |
403 | Authenticated but not authorized |
404 | Resource not found |
409 | Conflict (duplicate, version mismatch) |
422 | Validation error (valid format, invalid data) |
429 | Rate limit exceeded |
500 | Unexpected server error |
502 | Bad gateway (upstream down) |
503 | Service unavailable (maintenance/overload) |