HTTP Status Codes

Type a number such as 404, or a word such as "rate limit". Every registered code is here with its official name and what it means in practice.

How it works

Every HTTP response starts with a three-digit status code. The first digit is the class: 1xx means "still working", 2xx means success, 3xx means "look elsewhere", 4xx means the request was wrong, and 5xx means the server failed.

The names here are the reason phrases from RFC 9110, the current HTTP standard, and the IANA registry. A few have been renamed recently: 413 is now "Content Too Large" and 422 is "Unprocessable Content". Older tools still show the old names.

The table ships with this page, so searching it sends nothing anywhere. Unofficial codes such as nginx's 499 or Cloudflare's 520 to 527 are left out, because they mean different things on different servers.

How to use it

  1. 1 Type a code, or words from its name or meaning, into the search box.
  2. 2 The list narrows as you type. Every word must match, in any order.
  3. 3 Read the explanation, then press Copy to copy the code.
  4. 4 Clear the box to see all codes, grouped by class.

Good to know

  • 401 means "not logged in" and 403 means "logged in, but not allowed". The names are confusing; the meanings are not.
  • For a permanent move, 308 keeps the method and body of a POST, while 301 lets clients turn it into a GET.
  • A 502 or 504 comes from a proxy in front of your app. Look at the app behind it, not the proxy.
  • You can link straight to a search: add ?q=429 to this page's address.

Browser support

  • Chrome 94 and later
  • Firefox 93 and later
  • Safari 16.4 and later
  • Edge 94 and later

These are the oldest versions with everything the tool uses. They are worked out from the tool itself, so they change when it does.

Version numbers checked on 2026-09-04.

Choosing the right status code for a login API, one request at a time

Status codes are easiest to learn by following one small API through a few requests. Picture a service with a POST /login endpoint, a GET /admin page and a rate limit. Each request below gets one code, and the reason for each choice is the same reason you would use in your own code.

First, a client sends POST /login with a body that is not valid JSON: a missing closing brace. The server cannot even read what was asked, so the answer is 400 Bad Request. Next, the client fixes the JSON but leaves the password field empty. Now the body parses, but a value is wrong, so many APIs answer 422 Unprocessable Content, with a message naming the field. Then the client sends a wrong password. The request is well formed and complete, but the server cannot say who this is, so the answer is 401 Unauthorized. The right password finally gets 200 OK, with a token in the body.

With that token, the client asks for GET /admin. This user is a normal member, not an admin. The server knows exactly who is asking and still says no, so the answer is 403 Forbidden, not 401. Logging in again would not change anything, and that is the test for telling the two apart: if new credentials could fix it, use 401; if they could not, use 403. Some APIs answer 404 Not Found instead, so outsiders cannot even learn that an admin page exists. That is allowed, and the explanation for 404 above says so.

Now the client goes wrong and sends 100 login attempts in a minute. The server's limit is 10, so the 11th attempt gets 429 Too Many Requests, with a Retry-After: 60 header telling it to wait 60 seconds. If the server itself is down for maintenance, the right code is 503 Service Unavailable, also with Retry-After. And if the app crashed behind a load balancer, the client sees 502 Bad Gateway, produced by the load balancer, which is why the app's own logs may show nothing at all.

This table has limits worth knowing. It covers the codes registered with IANA, using the RFC 9110 names, and leaves out vendor codes because their meaning depends on the vendor. It also cannot tell you what a particular server meant: plenty of APIs return 200 OK with an error inside the body, or 500 for what is really a bad request. The code is a promise about meaning, and the explanations here describe the promise. When a server breaks it, the response body and the server's logs are the next place to look.

Frequently asked questions

What is the difference between 401 and 403?

401 Unauthorized means the server does not know who you are: no login, or an expired token. Logging in may fix it. 403 Forbidden means it knows who you are and still refuses. Logging in again will not help; you need different permissions.

Should my API return 400 or 422 for a validation error?

Both are used. 400 Bad Request fits a body the server cannot read at all, such as broken JSON. 422 Unprocessable Content fits a body that parses fine but has wrong values, such as an end date before the start date. Pick one rule and use it everywhere.

When should I use 301, 302, 307 or 308?

Use 301 or 308 when the move is permanent, and 302 or 307 when it is temporary. 307 and 308 also promise that a POST stays a POST with its body; 301 and 302 do not. For plain page moves, 301 is fine and well understood by search engines.

Is 418 I'm a teapot a real code?

It began as an April Fools joke in RFC 2324 in 1998. It never became a real status, but so many servers and libraries know it that the HTTP standard reserves 418 so nobody can give it a serious meaning.

Why do I see a 5xx code that is not listed here?

Some services invent their own codes. Cloudflare uses 520 to 527 for problems between it and your server, and nginx logs 499 when the client gave up. They are not part of HTTP, so their meaning depends on who sent them.

Related tools

Your files are processed on your device and are not uploaded. You can verify this in your browser’s developer tools under the Network tab.