Skip to content
ZeroServer.tools

HTTP Status Code Reference

Search and look up every HTTP status code and its meaning.

Mocking Status:200 OK

cURL Mock Command
curl -i -X GET https://httpbin.org/status/200
JavaScript Fetch
fetch('https://httpbin.org/status/200')
  .then(res => {
    console.log('Status:', res.status); // 200
  });
Next.js Response Handler
export async function GET() {
  return new Response(
    JSON.stringify({ message: "OK" }),
    { status: 200 }
  );
}

1xx — Informational

2xx — Success

3xx — Redirection

4xx — Client Error

5xx — Server Error

Understanding HTTP status codes

Every HTTP response carries a three-digit status code that tells the client what happened. The first digit sets the class: 1xx informational, 2xx success, 3xx redirection, 4xx client errors, and 5xx server errors. Knowing the difference between, say, a 401 and a 403, or a 302 and a 308, saves real debugging time.

Building an API or a site? You might also want the MIME type lookup and the URL parser.

Built and maintained by Meet Shah · Last updated

What this tool is used for

  • Looking up what a status code you have not seen before means.
  • Choosing the right code for an API response.
  • Checking whether a code is cacheable by default.
  • Settling a design discussion with the specification.
  • Understanding a code returned by a service you do not control.

Frequently Asked Questions

What do the five classes mean?
1xx informational, 2xx success, 3xx redirection, 4xx client error, 5xx server error. The first digit is the part a client should branch on — the specific code refines it.
When should I use 301 rather than 302?
301 for a permanent move, which transfers ranking signals and is cached aggressively — sometimes indefinitely by browsers. 302 or 307 for anything temporary, precisely because you may want to undo it.
What is the difference between 401 and 403?
401 means not authenticated — credentials are missing or invalid, and the response should say how to supply them. 403 means authenticated but not permitted, where retrying with the same credentials will never work.
Should an API return 200 with an error body?
No. It defeats caching, monitoring and every generic client that branches on status, and it hides failures from anything counting error rates. The status line is part of the response contract.
What is 418?
"I'm a teapot", from a 1998 April Fools' RFC about coffee pots. It is not a real status, though enough software implements it as a joke that proposals to remove it have been resisted.

Common errors and gotchas

  • Returning 200 with an error in the body, which breaks every client that checks the status.
  • Confusing 401 with 403, where one means unauthenticated and the other unauthorised.
  • Using 404 for a permissions failure, which is sometimes deliberate and often just confusing.
  • Returning 500 for a client mistake, which sends the wrong signal to monitoring and retries.
  • Assuming a 3xx preserves the method, which differs between 301, 302, 307 and 308.

Related Developer Utilities tools

Private & free — this tool runs entirely in your browser.

IndieKitShip your Next.js startup in days.affiliate