Developer tools

HTTP Status Codes

HTTP Status Codes

Searchable list of HTTP status codes with meanings, when to use them and retry advice.

About this tool

About HTTP Status Codes

A quick, searchable reference for every standard HTTP status code, from 100 Continue to 511 Network Authentication Required, written for people building and debugging APIs. Each entry explains what the code means, when a server should return it instead of a similar one (401 or 403? 301 or 308? 400 or 422?), and what a client should do: retry immediately, retry later while honouring Retry-After, or fix the request first. You can also see which responses are cacheable by default under RFC 9110 and which specification defines each code. Common non-standard codes are included and clearly labelled, such as nginx's 499 Client Closed Request and Cloudflare's 520 to 526, because they show up in real logs. Search by number or by words like timeout, redirect or rate limit, or filter by class. It is a static page: no lookups are sent anywhere.

Built and maintained by Abhi JainUpdated

Recent changes

  • Add CSV/JSON converters, world clock, HTTP reference, and tools UI updates

How to Use the HTTP Status Code Reference

  1. 1

    Search

    Type a code (404), a class (5xx) or words (rate limit, redirect) into the search box.

  2. 2

    Filter

    Use the class buttons (1xx Informational to 5xx Server error, or Unofficial) to narrow the list.

  3. 3

    Read the details

    Open a code to see when to use it, retry guidance, cacheability and the spec, and copy it.

HTTP Status Codes: questions and answers

What is the difference between 401 and 403?

401 Unauthorized means the request has no valid credentials: log in or send a token, and the response must include WWW-Authenticate. 403 Forbidden means the server knows who you are but you are not allowed; logging in again won't help.

Should I use 301 or 308 for a permanent redirect?

Both are permanent and cacheable. 301 lets clients change a POST into a GET when following it; 308 requires the same method and body. Use 308 for API endpoints and 301 for ordinary page moves.

Which HTTP errors should a client retry?

Retry 408, 429, 502, 503 and 504 with exponential backoff, and honour Retry-After when it is sent. Retry 500 only for idempotent requests. Don't retry other 4xx codes: the request itself must change.

What does 502 Bad Gateway mean?

A proxy, load balancer or CDN in front of the site got an invalid response, or none, from the server behind it. The fault is usually the upstream application crashing or refusing connections, not your request.

When should an API return 422 instead of 400?

Use 400 when the request can't be parsed at all, such as malformed JSON. Use 422 Unprocessable Content when it parses but fails validation, such as an email field that isn't an email address.