HTTP status codes
Search for a status code by number or name to see what it means and when it is used.
This free HTTP status code reference works offline once loaded. All inputs and calculations run locally on your device without server uploads; details on browser processing and storage are set out in the privacy policy.
The five classes
| Range | Class | Meaning |
|---|---|---|
| 1xx | Information | The request was received and is continuing |
| 2xx | Success | The request worked |
| 3xx | Redirect | The client must go somewhere else |
| 4xx | Client error | The request has a problem |
| 5xx | Server error | The server failed to handle a valid request |
The codes that matter most for websites
- 301 vs 302: use 301 for a page that has moved for good, so search engines pass its ranking to the new address; 302 only for temporary moves.
- 404 vs 410: 410 tells search engines a page is gone on purpose, and it drops out of results faster.
- 503 with a Retry-After header is the right response during maintenance; search engines will come back later instead of dropping pages.
- 500 errors on many pages can hurt your search ranking and ad serving, so fix them quickly.
Worked example: Choosing the exact HTTP status code for a REST API endpoint
When designing or testing a REST API (for example POST /api/v1/orders), picking the wrong status code breaks client retry logic and HTTP caching. Here is how five closely related codes differ in practice:
201 Createdvs200 OKvs204 No Content: Return201 Created(with aLocation: /api/v1/orders/9042header) when aPOSTcreates a new resource; return200 OKwhen aGETorPATCHreturns a response body; return204 No Contentwhen aDELETEsucceeds and sends an empty body.400 Bad Requestvs422 Unprocessable Content: Return400when the JSON syntax itself is malformed ({"qty": }); return422when the JSON parses cleanly ({"qty": -5}) but fails business validation rules.401 Unauthorizedvs403 Forbidden: Return401when the request is missing a valid login token (unauthenticated); return403when the token is valid (you know who the user is) but that user lacks permission to access an admin route.
Limits and what this tool cannot do
- Reference lookup only (does not probe live URLs): This tool looks up RFC 9110 / IANA status code definitions locally—it does not send HTTP requests to check whether a remote website is up or down.
- Non-standard vendor codes (
499,520–527): Standard IANA codes are covered here; reverse-proxy vendor codes such as Nginx499 Client Closed Requestor proxy522 Connection Timed Out/524 A Timeout Occurredare proxy-specific extensions outside RFC 9110.
Questions
What is the difference between 401 and 403?
401 means you are not logged in, or your login failed. 403 means the server knows who you are and still refuses.
What does 502 Bad Gateway mean?
A proxy or load balancer, such as Nginx, could not get a valid answer from the server behind it. The server is often down or overloaded.
What does 429 mean?
Too many requests: you have hit a rate limit. Wait before trying again.
Why does 301 vs 308 (and 302 vs 307) matter for POST requests?
Historically, browsers seeing a 301 Moved Permanently or 302 Found redirect after a POST form submission silently changed the redirected request method to GET, losing the POST body. 307 Temporary Redirect and 308 Permanent Redirect forbid changing the HTTP method, guaranteeing a POST stays a POST.
Which status codes should trigger an automatic retry in an API client?
Only retry on 429 Too Many Requests (respecting the Retry-After header), 502 Bad Gateway, 503 Service Unavailable, and 504 Gateway Timeout—and only automatisch for idempotent methods (GET, HEAD, PUT, DELETE) or requests carrying an Idempotency-Key header.
What is HTTP 418 I'm a teapot?
Defined on April Fools' Day 1998 in RFC 2324 (Hyper Text Coffee Pot Control Protocol), 418 I'm a teapot indicates the server refuses to brew coffee because it is permanently a teapot. It is reserved in RFC 9110 so it is never reassigned.