What do the status code ranges mean?
The first digit alone tells you who's responsible before you even read the rest of the code — a habit worth building if you're debugging a failed request.
- 1xx — Informational: request received, still processing
- 2xx — Success: the request worked as expected
- 3xx — Redirection: further action needed to complete the request
- 4xx — Client error: something is wrong with the request itself
- 5xx — Server error: the server failed to fulfill a valid request
Frequently confused codes
401 means the request lacks valid authentication credentials; 403 means the credentials are fine but access is forbidden. 301 is a permanent redirect that search engines pass ranking to; 302 is temporary and shouldn't be treated as permanent. 502 means an upstream server sent an invalid response; 503 means the server is temporarily unable to handle the request (often due to overload or maintenance); 504 means an upstream server never responded in time at all — three different failures that all look the same from a user's screen.
Codes you'll actually run into
Most of the 63 codes on this page are rare in practice. In real debugging, a small handful account for almost everything: 200 and 404 day to day, 401/403 the moment auth is involved, 429 once you're calling any rate-limited API, and 500/502/503/504 whenever something breaks server-side. Knowing that first digit narrows a mystery response down to "my request" vs. "their server" before you've even opened the network tab.
A common anti-pattern worth knowing
Some APIs return 200 OK on every response, even failures, and bury the actual error inside the JSON body instead. It technically works, but it breaks anything that relies on the status code itself — caching layers, monitoring, retry logic, and browser devtools all read the header, not your response schema. If you're designing an API, matching the status code to what actually happened saves every consumer from having to special-case your endpoint.
Want the fuller explanation, with the 400/401/403 trio and 500/502/503 trio each broken down side by side? Read HTTP Status Codes Explained.