Every HTTP response includes a three-digit status code that tells the client what happened. This cheat sheet lists the codes you'll meet most often, grouped by class, with a short explanation of each.
Whether you're building a REST API, debugging a request, or configuring redirects, use this page as a quick reference for what each status code means and when to return it.
1xx — Informational
| Code | Meaning & when it's used |
|---|
100 Continue | The server received the request headers and the client should send the body. |
101 Switching Protocols | The server is switching protocols as requested (e.g. to WebSocket). |
103 Early Hints | Used to preload resources while the server prepares the response. |
2xx — Success
| Code | Meaning & when it's used |
|---|
200 OK | The request succeeded. The standard response for a successful GET. |
201 Created | The request succeeded and a new resource was created (after POST/PUT). |
202 Accepted | The request was accepted for processing but is not yet complete. |
204 No Content | The request succeeded but there is no content to return. |
206 Partial Content | The server is delivering part of the resource (used for range requests). |
3xx — Redirection
| Code | Meaning & when it's used |
|---|
301 Moved Permanently | The resource has permanently moved to a new URL. Update your links. |
302 Found | The resource is temporarily at a different URL. |
303 See Other | Redirect to another URL using GET (often after a POST). |
304 Not Modified | The cached version is still valid; no need to re-download. |
307 Temporary Redirect | Like 302 but the request method must not change. |
308 Permanent Redirect | Like 301 but the request method must not change. |
4xx — Client Errors
| Code | Meaning & when it's used |
|---|
400 Bad Request | The server could not understand the request (malformed syntax). |
401 Unauthorized | Authentication is required and has failed or not been provided. |
403 Forbidden | The server understood the request but refuses to authorize it. |
404 Not Found | The requested resource does not exist on the server. |
405 Method Not Allowed | The HTTP method is not supported for this resource. |
409 Conflict | The request conflicts with the current state of the resource. |
410 Gone | The resource is permanently gone and will not return. |
422 Unprocessable Entity | The request was well-formed but failed validation. |
429 Too Many Requests | The client sent too many requests (rate limiting). |
5xx — Server Errors
| Code | Meaning & when it's used |
|---|
500 Internal Server Error | A generic error — something went wrong on the server. |
501 Not Implemented | The server does not support the functionality required. |
502 Bad Gateway | An upstream server returned an invalid response. |
503 Service Unavailable | The server is overloaded or down for maintenance. |
504 Gateway Timeout | An upstream server did not respond in time. |
507 Insufficient Storage | The server cannot store the representation to complete the request. |
HTTP Status Codes Cheat Sheet FAQs
What do the HTTP status code classes mean?
1xx are informational, 2xx mean success, 3xx mean redirection, 4xx are client errors (the request was wrong), and 5xx are server errors (the server failed).
What is the difference between 401 and 403?
401 Unauthorized means you are not authenticated — log in first. 403 Forbidden means you are authenticated but not allowed to access the resource.
When should I use 301 vs 302?
Use 301 Moved Permanently when a URL has changed for good (search engines update their index). Use 302 Found for a temporary redirect where the original URL will return.
What does 429 Too Many Requests mean?
The client has sent too many requests in a given time and is being rate-limited. The response often includes a Retry-After header telling you when to try again.
Is 200 the only success code?
No. 2xx codes include 201 Created (after a POST), 202 Accepted, and 204 No Content, among others — each signals success in a slightly different way.