HTTP Status Codes Cheatsheet
A quick-reference guide for standard Hypertext Transfer Protocol (HTTP) response status codes, categorized by class ranges from informational requests to server crashes.
## Class Range Summary
| Class | Type | General Description |
| :---: | :--- | :--- |
| **1xx** | Informational | Request received, continuing process |
| **2xx** | Success | The action was successfully received, understood, and accepted |
| **3xx** | Redirection | Further action must be taken in order to complete the request |
| **4xx** | Client Error | The request contains bad syntax or cannot be fulfilled by the client |
| **5xx** | Server Error | The server failed to fulfill an apparently valid request |
---
## 1xx Informational
The request has been received, and the server is continuing the process.
- **`100 Continue`**: The server has received the request headers, and the client should proceed to send the request body.
- **`101 Switching Protocols`**: The requester has asked the server to switch protocols (e.g. switching from HTTP/1.1 to WebSockets).
- **`102 Processing`**: The server has received and is processing the request, but no response is available yet.
---
## 2xx Success
The action requested by the client was successfully received, understood, and accepted.
- **`200 OK`**: Standard success response. The actual response depends on the request method (GET, POST, PUT, DELETE, etc.).
- **`201 Created`**: The request has been fulfilled, and a new resource has been successfully created.
- **`202 Accepted`**: The request has been accepted for processing, but the processing has not been completed yet (useful for asynchronous operations).
- **`204 No Content`**: The server successfully processed the request, but is not returning any content (commonly used for DELETE or PUT requests).
- **`206 Partial Content`**: The server is delivering only part of the resource due to a range header sent by the client (used for segmented file downloads/streams).
---
## 3xx Redirection
The client must take additional action to complete the request.
- **`301 Moved Permanently`**: This and all future requests should be directed to the given URI (permanent redirection, SEO-friendly).
- **`302 Found`**: The resource resides temporarily under a different URI (temporary redirection, should not be cached).
- **`304 Not Modified`**: The resource has not been modified since the version specified by the cache headers. The client can load its cached copy (saves bandwidth).
- **`307 Temporary Redirect`**: The request should be repeated with another URI; however, future requests should still use the original URI.
- **`308 Permanent Redirect`**: The request and all future requests should be repeated using another URI. Similar to `301`, but does not allow changing the request method (e.g. POST to GET).
---
## 4xx Client Errors
The request contains bad syntax or cannot be fulfilled by the client.
- **`400 Bad Request`**: The server cannot process the request due to a client-side error (e.g., malformed request syntax, invalid size, size bounds overflow).
- **`401 Unauthorized`**: Semantically means *unauthenticated*. The user must log in or provide valid credentials to obtain the requested response.
- **`403 Forbidden`**: The client is authenticated but does not have access permissions for the resource (e.g., a standard user trying to access admin files).
- **`404 Not Found`**: The requested resource could not be found on the server.
- **`405 Method Not Allowed`**: The request method is known but has been disabled for this resource (e.g., trying to POST to a read-only endpoint).
- **`406 Not Acceptable`**: The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.
- **`408 Request Timeout`**: The server timed out waiting for the client to complete the request.
- **`409 Conflict`**: The request could not be completed due to a conflict with the current state of the resource (e.g., database unique constraint failures, duplicate registrations).
- **`415 Unsupported Media Type`**: The request entity has a media type which the server or resource does not support (e.g., uploading an SVG to an endpoint expecting JPEG).
- **`422 Unprocessable Entity`**: The request was well-formed but has semantic errors or failed backend validations (e.g., fields missing in a JSON payload).
- **`429 Too Many Requests`**: The user has sent too many requests in a given amount of time (rate limiting threshold exceeded).
---
## 5xx Server Errors
The server failed to fulfill an apparently valid request.
- **`500 Internal Server Error`**: A generic error message, given when an unexpected condition was encountered on the server (e.g. uncaught backend crashes).
- **`501 Not Implemented`**: The server either does not recognize the request method, or lacks the ability to fulfill the request.
- **`502 Bad Gateway`**: The server, while acting as a gateway or proxy, received an invalid response from the upstream server.
- **`503 Service Unavailable`**: The server is temporarily down, commonly due to maintenance or handling high-volume traffic overloads.
- **`504 Gateway Timeout`**: The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server.
- **`505 HTTP Version Not Supported`**: The server does not support the HTTP protocol version used in the request.
```
---