HTTP Status Codes
Look up what an HTTP status code means — 301, 403, 422, 503 and every other standard code — and find the right one to return from an API.
Result
Search HTTP status codes.
How to use this tool
- Type a code (404), the start of one (41 for 410–418), a class (4xx) or words such as “redirect” or “rate limit”.
- Or select a class button to list all codes in that class.
How it works
The first digit gives the class: 1xx informational, 2xx success, 3xx redirection, 4xx client error (a problem with the request) and 5xx server error. The list follows RFC 9110 and related standards, using their current names (for example 413 Content Too Large and 422 Unprocessable Content).
Example
Which redirect?
Use 301 or 308 for permanent moves and 302, 303 or 307 for temporary ones. 307 and 308 keep the request method, so a POST stays a POST.
Privacy and limitations
- The list is part of the page; searching sends nothing anywhere.
- Some services use non-standard codes (such as 499 or 520–527 on some CDNs), which are not listed.
Frequently asked questions
What is the difference between 401 and 403?
401 means the request is not authenticated (log in and try again). 403 means the server knows who you are but you are not allowed.
Should validation errors use 400 or 422?
Many APIs use 422 for well-formed requests whose content fails validation, and 400 for requests that cannot be parsed at all.