HTTP Status Codes

Search every HTTP status code, from 1xx to 5xx, with its meaning and when to use it

How to look up an HTTP status code

  1. 1

    Search by code or keyword

    Type a number such as 404, a name such as "Not Found" or a word such as "redirect" or "timeout" in the search box. The list narrows as you type.

  2. 2

    Filter by class

    Click 1xx, 2xx, 3xx, 4xx or 5xx to show only informational, success, redirection, client error or server error codes.

  3. 3

    Open a code

    Click a code to read when to use it, or use Expand all to open every code in the current list.

  4. 4

    Copy it

    Use Copy code or Copy status line (for example "404 Not Found") to paste it into your code, documentation or bug report.

The five classes of HTTP status codes

The first digit of a status code tells you what kind of result the server is reporting. Knowing the class is often enough to understand a response before you read the details.

  • 1xx Informational: the request was received and the process continues (100, 101, 103)
  • 2xx Success: the request was received, understood and accepted (200, 201, 204)
  • 3xx Redirection: the client must take another step, usually to another URL (301, 302, 304)
  • 4xx Client error: the request is wrong or not allowed (400, 401, 403, 404, 429)
  • 5xx Server error: the server failed to fulfill a valid request (500, 502, 503, 504)

The codes you will meet most often

200 OK, 201 Created and 204 No Content cover almost every successful API call. 301 and 302 handle redirects, and 304 tells the browser to use its cached copy. On the error side, 400 means a bad request, 401 means you are not authenticated, 403 means you are not allowed, 404 means not found and 429 means you are being rate limited.

For server problems, 500 is the generic failure, 502 and 504 usually point to a proxy or load balancer that could not reach your application in time, and 503 means the service is temporarily unavailable, often during maintenance.

301 vs 302 vs 307 vs 308

301 and 308 are permanent redirects; 302 and 307 are temporary. The difference between the pairs is the method: 301 and 302 may turn a POST into a GET, while 307 and 308 guarantee that the method and body stay the same. For SEO, use 301 or 308 when a page moves for good so search engines transfer its ranking to the new URL.

401 vs 403

A 401 means the server does not know who you are: credentials are missing, expired or wrong. A 403 means the server knows who you are but you are not allowed to do this. Return 401 to ask for a login and 403 when logging in again would not help.

Choosing the right code for your API

Use specific codes instead of 200 with an error message in the body. Return 201 with a Location header after creating a resource, 204 after a delete, 422 for validation errors and 409 for conflicts. Clients, caches, monitoring tools and search engines all rely on the status code to behave correctly.

Private and fast

The whole reference loads with the page and the search runs in your browser. Nothing you type is sent to a server.

HTTP status codes FAQ

What is an HTTP status code?

It is a three-digit number the server sends at the start of every response to say whether the request worked, needs another step or failed, and why.

What is the difference between 4xx and 5xx errors?

4xx errors mean the problem is in the request (the client): wrong URL, missing login, invalid data. 5xx errors mean the request was valid but the server failed to handle it.

What does 404 Not Found mean?

The server cannot find the resource at that URL. It can be a typo, a deleted page or a wrong ID. If the page was removed on purpose and will not return, 410 Gone is more precise.

When should I use 301 and when 302?

Use 301 when the move is permanent, such as a new domain or a changed URL, so search engines transfer the ranking. Use 302 when the move is temporary.

What is the difference between 502, 503 and 504?

502 Bad Gateway means the proxy got an invalid response from the app. 503 Service Unavailable means the server is overloaded or in maintenance. 504 Gateway Timeout means the app took too long to answer the proxy.

Is the 418 I am a teapot code real?

Yes. It comes from an April Fools joke RFC (RFC 2324), is kept in the registry and is sometimes used as an Easter egg.

Is it free?

Yes. It is free, needs no sign-up and runs entirely in your browser.