HTTP Status Code Reference
A complete, searchable reference of HTTP status codes with their plain-English meaning and when each is used. Filter by code or keyword, and check the category of any status number instantly.
The codes are best understood alongside the HTTP Header Checker, which shows them in a live response, and the Htaccess Redirect Generator, which sets them. To find the URLs currently returning errors, the Broken Link Checker List is the tool.
How to use the HTTP Status Codes
- 1 Browse by class, or search for a code.
- 2 Read the plain-English meaning and when the code is appropriate to return.
- 3 Check the section on which codes are safe to retry, which matters when building a client.
- 4 Note the codes that have been deprecated or repurposed.
Choosing the right code
The codes most often chosen badly are in the four hundreds. Returning 200 with an error in the body defeats every client and monitoring tool that relies on the status, and returning 500 for a client mistake makes a service look broken when it is being misused.
The second common problem is overloading a code. A 404 returned for both a missing resource and an authorisation failure leaks information about which resources exist. Distinguishing them where that matters is a deliberate choice rather than an oversight.
- 200 is success, 201 is created, 204 is no content.
- 301 is permanent and cached; 302 and 307 are temporary.
- 401 is unauthenticated, 403 is unauthorised, 404 is not found.
- 5xx is the server's fault and signals a bug or outage.
The five classes
1xx responses are informational, 2xx mean success, 3xx are redirects, 4xx are client errors, and 5xx are server errors. Knowing the class tells you whether the problem is on the client or the server.
Frequently asked questions
What do the five classes mean?
The first digit indicates the class. One is informational, two is success, three is a redirect, four is a client error and five is a server error. That structure is the useful part — a client can decide how to respond by class without knowing the specific code.
Which codes are safe to retry automatically?
Only those where the request did not take effect, or had no side effect. The method matters as much as the code: a GET is idempotent and safe to repeat, whereas a POST that created a resource is not. For a server error after a POST, retrying risks creating a duplicate unless the API supports an idempotency key.
What is the difference between 401 and 403?
401 means the request has no valid authentication, so the client should authenticate and try again. 403 means the request is authenticated but not permitted, so retrying with the same credentials will not help. Returning 401 for a permission problem causes clients to loop, re-authenticating repeatedly against something no credential can fix.
Related Developer Tools
You might also need
Tools from other categories that people pair with the HTTP Status Codes: