Dev
HTTP Status Code Explainer
Used by developers, writers, and creators worldwide.
An HTTP status code explainer tells you what a code means and, just as importantly, when you should return it, so your API speaks the protocol correctly. Pick a code and it returns the standard name, the class it belongs to — success, redirection, client error, or server error — and a plain-English note on the situation it describes and the headers that go with it, like Location for a 201 or Retry-After for a 429. Backend developers use it to choose the right status for an endpoint, settle a debate about 401 versus 403, or learn the codes during onboarding. It runs in your browser and generates instantly. Returning the correct status matters because clients, caches, and monitoring tools all react to the code, not the body. Use it to keep your API predictable and to give consumers the precise signal they need to handle each response.
Read the complete guide — 5 min read
Loading usage…
Free forever — no account required
How to use
- Choose your options above
- Click Generate
- Copy your result
Detailed instructions
- Pick the HTTP status code.
- Click Generate to see its meaning and class.
- Read when to use it and which headers pair with it.
- Apply the right code in your endpoint.
Use Cases
- •Choosing the right status code for an endpoint
- •Settling whether to return 401 or 403
- •Learning the status code families during onboarding
- •Documenting the responses an API can return
- •Debugging why a client mishandles a response
Tips
- →Return 201 with a Location header when you create a resource.
- →Pair 429 with Retry-After so clients back off correctly.
- →Never leak internal detail in a 500 response body.
- →Document every status an endpoint can return.
FAQ
what is the difference between 401 and 403
A 401 means you are not authenticated — supply valid credentials and retry. A 403 means you are authenticated but not allowed to access the resource, so retrying with the same credentials will not help.
when should I use 422 instead of 400
Use 400 when the request is malformed at the syntax level, and 422 when the syntax is valid but the data fails your validation rules. Many APIs return 422 with field-level error details.
why does the status class matter
Clients, proxies, and monitoring tools branch on the first digit. A 2xx is cached and treated as success, a 4xx blames the client, and a 5xx triggers retries and alerts, so the class drives automatic behaviour.
You might also like
Popular tools from other categories that share themes with this one.