HTTP Status Codes
Every HTTP status code with what it means and when to use it.
About this tool
Look up any HTTP status code by number or name. Each one has a plain description and a note on when to return it, which helps when designing an API or reading a failing request.
How to use it
- Type a status code, like 404, or a word, like redirect or rate limit.
- Filter by class: 1xx informational, 2xx success, 3xx redirects, 4xx client errors, 5xx server errors.
- Read what each code means and when to return it.
Questions
- What is the difference between 401 and 403?
- 401 means the client is not authenticated, for example the token is missing or expired. 403 means the client is authenticated but not allowed to do this.
- Should validation errors return 400 or 422?
- Both are used. A common convention is 400 for requests that can’t be parsed and 422 for well-formed requests whose values fail validation.
- When should I use 301 versus 308?
- Both are permanent redirects. With 301, browsers may turn a POST into a GET; 308 guarantees the method and body are kept. For plain page moves, 301 is fine.
- What is the difference between 502 and 504?
- Both come from a proxy or load balancer. 502 means the server behind it returned an invalid response or crashed; 504 means it didn’t respond in time.
Something not working, or a result looks wrong? Report a problem with this tool