Decode Every HTTP Status Code From 1xx to 5xx
Every web request ends with a three-digit status code, and that number tells you whether the request succeeded, was redirected, or failed and why. A 404 means the resource is missing, a 301 means it moved permanently, and a 500 means the server itself broke. When an API misbehaves, a checkout flow dies, or a redirect loops forever, the status code is the first clue. This HTTP status code reference makes that clue readable: search any code and get its official name, its class, and plain-language guidance on what to check next. It is the tool to keep open while debugging anything that talks over HTTP.
How to Look Up a Status Code
- Find the status code in your browser's developer tools, an API client, or your server logs.
- Type the three-digit code into the search box, or browse the full list grouped by class.
- Read the official name and the class — informational, success, redirect, client error, or server error.
- Check the common causes listed for that code against your own situation.
- Look at the response body; most errors include a message that narrows down the cause.
- Fix the underlying issue, re-run the request, and confirm the code returns to 200.
Real Example: The Five Classes at a Glance
A single request lifecycle can produce codes from every class. Knowing which class you are in tells you immediately who is responsible — the client, the network, or the server.
| Class | Range | Meaning | Example |
|---|---|---|---|
| Informational | 1xx | Request received, still processing | 101 Switching Protocols |
| Success | 2xx | Request understood and handled | 200 OK |
| Redirection | 3xx | Further action needed to complete | 301 Moved Permanently |
| Client error | 4xx | Request is wrong or forbidden | 404 Not Found |
| Server error | 5xx | Server failed to fulfill a valid request | 503 Service Unavailable |
Tips for Debugging Status Codes
- Read the body — the status code names the category, but the response body usually carries the exact reason.
- Check timing — a fast 500 is often an application bug; a slow one points to timeouts or exhausted resources.
- Watch for loops — repeated 3xx codes mean a redirect chain is circling; trace it with a redirect checker.
- Respect 429 — rate-limit responses mean slow down, not retry harder, unless a Retry-After header says otherwise.
When to Use This Tool
- API debugging — interpret unexpected responses from third-party services.
- SEO audits — find broken links and bad redirects that hurt rankings.
- Incident response — classify an outage quickly by the codes in your logs.
- Learning — build a mental model of the HTTP contract as you build web software.
Frequently Asked Questions
What is the difference between a 404 and a 410?
A 404 means the resource is not found and may exist elsewhere. A 410 Gone means the resource existed and was deliberately removed, which tells clients and search engines not to expect it back.
What is the difference between 301 and 302?
A 301 is a permanent redirect that browsers and search engines cache, while a 302 is temporary. Use 301 for moved pages you want to keep ranking and 302 for short-lived moves.
What is the difference between 401 and 403?
A 401 Unauthorized means you are not authenticated — you have not proven who you are. A 403 Forbidden means you are authenticated but not allowed to access the resource.
What is the difference between 500, 502, and 503?
A 500 is a generic server error inside the application. A 502 Bad Gateway means an upstream server sent an invalid response. A 503 means the server is temporarily unavailable, often during maintenance or overload.
Is 418 a real status code?
Yes — 418 I'm a Teapot is an April Fools joke from the Hyper Text Coffee Pot Control Protocol. It is valid to send, but you will rarely see it outside of easter eggs and testing.
What should I do when I get a 429 Too Many Requests?
Stop retrying immediately, read the Retry-After header if present, and wait that long before trying again. If none is given, back off with increasing delays.
Why does a 204 No Content have an empty body?
By design. A 204 tells the client the request succeeded and there is nothing to render, which saves bandwidth for operations like saving a preference or deleting a record.
Can a status code alone tell me the cause of an error?
No. The code narrows the problem to a class — client, server, or network — but the response body, server logs, and request details are required to find the root cause.