HTTP status codes

Search for a status code by number or name to see what it means and when it is used.

This free HTTP status code reference works offline once loaded. All inputs and calculations run locally on your device without server uploads; details on browser processing and storage are set out in the privacy policy.

The five classes

RangeClassMeaning
1xxInformationThe request was received and is continuing
2xxSuccessThe request worked
3xxRedirectThe client must go somewhere else
4xxClient errorThe request has a problem
5xxServer errorThe server failed to handle a valid request

The codes that matter most for websites

  • 301 vs 302: use 301 for a page that has moved for good, so search engines pass its ranking to the new address; 302 only for temporary moves.
  • 404 vs 410: 410 tells search engines a page is gone on purpose, and it drops out of results faster.
  • 503 with a Retry-After header is the right response during maintenance; search engines will come back later instead of dropping pages.
  • 500 errors on many pages can hurt your search ranking and ad serving, so fix them quickly.

Worked example: Choosing the exact HTTP status code for a REST API endpoint

When designing or testing a REST API (for example POST /api/v1/orders), picking the wrong status code breaks client retry logic and HTTP caching. Here is how five closely related codes differ in practice:

  • 201 Created vs 200 OK vs 204 No Content: Return 201 Created (with a Location: /api/v1/orders/9042 header) when a POST creates a new resource; return 200 OK when a GET or PATCH returns a response body; return 204 No Content when a DELETE succeeds and sends an empty body.
  • 400 Bad Request vs 422 Unprocessable Content: Return 400 when the JSON syntax itself is malformed ({"qty": }); return 422 when the JSON parses cleanly ({"qty": -5}) but fails business validation rules.
  • 401 Unauthorized vs 403 Forbidden: Return 401 when the request is missing a valid login token (unauthenticated); return 403 when the token is valid (you know who the user is) but that user lacks permission to access an admin route.

Limits and what this tool cannot do

  • Reference lookup only (does not probe live URLs): This tool looks up RFC 9110 / IANA status code definitions locally—it does not send HTTP requests to check whether a remote website is up or down.
  • Non-standard vendor codes (499, 520–527): Standard IANA codes are covered here; reverse-proxy vendor codes such as Nginx 499 Client Closed Request or proxy 522 Connection Timed Out / 524 A Timeout Occurred are proxy-specific extensions outside RFC 9110.

Questions

What is the difference between 401 and 403?

401 means you are not logged in, or your login failed. 403 means the server knows who you are and still refuses.

What does 502 Bad Gateway mean?

A proxy or load balancer, such as Nginx, could not get a valid answer from the server behind it. The server is often down or overloaded.

What does 429 mean?

Too many requests: you have hit a rate limit. Wait before trying again.

Why does 301 vs 308 (and 302 vs 307) matter for POST requests?

Historically, browsers seeing a 301 Moved Permanently or 302 Found redirect after a POST form submission silently changed the redirected request method to GET, losing the POST body. 307 Temporary Redirect and 308 Permanent Redirect forbid changing the HTTP method, guaranteeing a POST stays a POST.

Which status codes should trigger an automatic retry in an API client?

Only retry on 429 Too Many Requests (respecting the Retry-After header), 502 Bad Gateway, 503 Service Unavailable, and 504 Gateway Timeout—and only automatisch for idempotent methods (GET, HEAD, PUT, DELETE) or requests carrying an Idempotency-Key header.

What is HTTP 418 I'm a teapot?

Defined on April Fools' Day 1998 in RFC 2324 (Hyper Text Coffee Pot Control Protocol), 418 I'm a teapot indicates the server refuses to brew coffee because it is permanently a teapot. It is reserved in RFC 9110 so it is never reassigned.

Last reviewed .

Related converters and guides