Dev
HTTP Status Code Explainer
Picking the right HTTP status code is one of those API design decisions that looks trivial but trips up developers regularly — is a missing resource a 404 or a 400? Is an expired session a 401 or a 403? This explainer pulls a status code from a curated set and gives you its exact meaning, the scenario it belongs in, and a concrete example of returning it. The status class filter lets you focus on a specific family. Choose "2xx success" to study how 200, 201, and 204 differ in practice. Switch to "4xx client error" to nail down the 401/403 boundary or understand when 429 applies. The "any" default mixes all classes for a broader review session. Each explanation is three parts: what the code signals, when to return it, and a concrete situation illustrating the rule. Generating a few codes before designing an API endpoint keeps the semantics sharp and cuts down on the review comments about misused codes.
How to use
- Choose your options above
- Click Generate
- Copy your result
Detailed instructions
- Choose a status class, or leave it on any.
- Click Generate to get a code with a full explanation.
- Read the meaning, when to use it, and the example.
- Generate again to learn more codes or pick the right one.
Use Cases
- •Choosing the right status code for an API response
- •Learning what each status code means in depth
- •Quiz and revision practice for web development
- •Settling a debate about which code to return
- •Documentation that explains status meanings accurately
Tips
- →Use the most specific accurate code — 201 for creation, not just 200.
- →Remember 401 is about authentication and 403 is about authorisation.
- →Return 429 with a Retry-After header when rate-limiting clients.
- →Reserve 5xx for genuine server faults, not client mistakes.
FAQ
what is the difference between 401 and 403
401 Unauthorized means authentication is missing or failed — the server does not know who you are. 403 Forbidden means you are authenticated but not allowed to access this resource. In short, 401 is about identity and 403 is about authorisation.
when should i return 201 instead of 200
Return 201 Created when a request successfully creates a new resource, typically including the new resource's location. Use 200 OK for a successful request that does not create something new, such as a GET or an update that returns the result.
how many codes does this tool cover
The tool covers 13 codes across all four classes: three 2xx (200, 201, 204), two 3xx (301, 304), five 4xx (400, 401, 403, 404, 429), and three 5xx (500, 502, 503). Use the class filter to focus on one family or leave it on any for a mixed session.
what does 429 mean
429 Too Many Requests signals that a client has exceeded a rate limit. APIs return it to protect against abuse or overload, usually with a Retry-After header telling the client when it may try again. Handling it gracefully is important for any API client.
You might also like
Popular tools from other categories that share themes with this one.
Try these next
More free tools from other corners of the catalog, picked by shared themes.