{jsonbody.com}

HTTP Status Code Lookup

Search every HTTP status code, from 200 and 301 to 404 and 500. See what each one means, its common causes and how to fix it. A free developer reference.

A searchable HTTP status code reference

Each HTTP response starts with a three-digit code that summarises what happened. This page lists the standard codes with their meaning, a common cause and what to do next. Search by number or keyword, such as redirect or rate limit, or filter by class.

The five classes

The first digit tells you the category, even if you have never seen the specific code.

  • 1xx Informational: the request was received and work is continuing.
  • 2xx Success: the request worked. 200 is general, 201 means created and 204 means no content.
  • 3xx Redirection: look elsewhere. 301 is permanent, 302 is temporary and 304 means use your cached copy.
  • 4xx Client error: something about the request is wrong, so repeating it unchanged will fail again.
  • 5xx Server error: the request may be fine, but the server failed to handle it.

Example: choosing a code for an API

Clients often decide what to do from the status alone, so an accurate code matters as much as the message in the body. A sensible mapping for a typical JSON API is shown here.

Common API situations
Created a record              201 Created
Deleted, nothing to return    204 No Content
Malformed JSON body           400 Bad Request
Missing or expired token      401 Unauthorized
Valid user, not allowed       403 Forbidden
Record does not exist         404 Not Found
Email already registered      409 Conflict
Failed field validation       422 Unprocessable Content
Too many requests             429 Too Many Requests

Codes that are often confused

  • 401 and 403: 401 means the server does not know who you are, while 403 means it knows and still refuses.
  • 301 and 302: search engines transfer ranking to the new URL for a 301, so use it for permanent moves. 307 and 308 are the versions that keep the request method.
  • 404 and 410: 410 says the page is gone for good, which can get it removed from search results sooner.
  • 502, 503 and 504: 502 means a proxy got a bad reply from the upstream server, 503 means the service is unavailable, and 504 means the upstream took too long.

Frequently Asked Questions

What should I do about a 500 error?

If it is your server, check the application logs, because the error details are normally recorded there. If it belongs to someone else, wait and retry, then contact the provider if it continues.

Does a 200 always mean success?

It means the HTTP exchange worked. Some APIs, including GraphQL services, return 200 with an error in the body, so check the body as well.

Why is 401 called Unauthorized if it is about login?

The name is a historical quirk. In practice, 401 means unauthenticated and 403 means unauthorised.

Which redirect is best for SEO?

Use a 301 for a permanent move and a 302 for a temporary one. Avoid long redirect chains, and link directly to the final URL.