HTTP Status Codes
What the server is really telling you. Search any code or scan the full list, grouped by class from informational through server error.
| Code | Name | Meaning |
|---|---|---|
| 100 | Continue | The client should continue with its request. |
| 101 | Switching Protocols | The server is switching protocols per the Upgrade header. |
| 102 | Processing | The server has accepted the request but has not completed it. |
| 103 | Early Hints | Used to return preload headers before the final response. |
| Code | Name | Meaning |
|---|---|---|
| 200 | OK | The request succeeded. The meaning depends on the method. |
| 201 | Created | The request succeeded and a new resource was created. |
| 202 | Accepted | The request was accepted but not yet acted upon. |
| 204 | No Content | The request succeeded with no body to return. |
| 206 | Partial Content | The server delivered part of the resource due to a range header. |
| Code | Name | Meaning |
|---|---|---|
| 301 | Moved Permanently | The resource has a new permanent URL. |
| 302 | Found | The resource is temporarily at a different URL. |
| 304 | Not Modified | The cached response is still valid; use it. |
| 307 | Temporary Redirect | Like 302 but the method must not change. |
| 308 | Permanent Redirect | Like 301 but the method must not change. |
| Code | Name | Meaning |
|---|---|---|
| 400 | Bad Request | The server cannot process the malformed request. |
| 401 | Unauthorized | Authentication is required and has failed or is missing. |
| 403 | Forbidden | The server understood but refuses to authorize the request. |
| 404 | Not Found | The server cannot find the requested resource. |
| 405 | Method Not Allowed | The method is not supported for this resource. |
| 409 | Conflict | The request conflicts with the current state of the server. |
| 410 | Gone | The resource is permanently gone with no forwarding address. |
| 418 | I'm a teapot | An April Fools joke defined by RFC 2324; returned by teapots. |
| 422 | Unprocessable Content | The request was well formed but semantically invalid. |
| 429 | Too Many Requests | The user has sent too many requests in a given time. |
| Code | Name | Meaning |
|---|---|---|
| 500 | Internal Server Error | A generic error; the server hit an unexpected condition. |
| 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. |
How to read HTTP status codes
Every HTTP response carries a three digit status code that summarizes the outcome of the request. The codes are defined by RFC 9110 and registered with the Internet Assigned Numbers Authority, so their meanings are stable across every server and client on the web. The first digit is the most important part, because it groups codes into five classes that answer one question: did it work, and if not, whose fault is it.
A 2xx response means the request succeeded. A 3xx response asks the client to look somewhere else, usually a new URL. A 4xx response says the request itself was wrong, whether the syntax was malformed, the resource was missing, or the caller lacked permission. A 5xx response admits the server failed to handle a request that may have been perfectly valid. When you debug an API, reading the class first tells you which side of the connection to investigate.
Codes worth memorizing
- 200 OK and 201 Created for successful reads and writes.
- 301 for permanent moves, 304 Not Modified to use the cache.
- 400, 401, 403, and 404 for the everyday client errors.
- 429 when you are rate limited, and 500, 502, 503, 504 for server and gateway failures.
Frequently asked questions
FAQWhat do the HTTP status code classes mean?
The first digit sets the class. 1xx is informational, 2xx means success, 3xx is redirection, 4xx is a client error such as a bad request, and 5xx is a server error. Knowing the class alone tells you whether the problem is on your side or the server's.
What is the difference between 401 and 403?
A 401 Unauthorized means you are not authenticated, so the server does not know who you are and you should log in. A 403 Forbidden means the server knows who you are but you are not allowed to access the resource, so logging in again will not help.
When should I use 301 versus 302?
Use 301 Moved Permanently when a URL has changed for good, because clients and search engines will update their links and cache the redirect. Use 302 Found, or better 307, for a temporary move where the original URL will return.
What does a 429 status code mean?
429 Too Many Requests means you have been rate limited. The response often includes a Retry-After header telling you how long to wait. Back off, slow your request rate, and retry after the suggested delay.