</> ConvertAtlas Developer Tools
Web

HTTP Status Codes Explained: From 200 to 500

What each class of status code means, the ones you meet most, and how to use them correctly in your own APIs.

200 301 404 500

Every HTTP response carries a three-digit status code, and that small number says a lot: whether a request succeeded, was redirected, failed because of the client, or failed because of the server. Reading them fluently is fundamental to debugging web applications and designing good APIs. This guide explains the classes, the codes you will actually meet, and how to choose the right one.

200 301 404 500
Status codes are grouped by their first digit: 2xx success, 3xx redirect, 4xx client error, 5xx server error.

The five classes

  • 1xx Informational — the request was received and processing continues. Rare in everyday work.
  • 2xx Success — the request succeeded. 200 OK is the workhorse; 201 Created and 204 No Content are common in APIs.
  • 3xx Redirection — further action is needed, usually following a new URL. 301 and 302 are the key pair.
  • 4xx Client error — the request was faulty. The problem is on the request side.
  • 5xx Server error — the request was valid but the server failed to handle it.

The codes you meet most

A handful of codes cover the vast majority of real traffic. 200 means OK. 301 is a permanent redirect, 302 a temporary one. 400 means the request was malformed, 401 means you are not authenticated, 403 means you are authenticated but not allowed, and 404 means the resource was not found. 422 signals validation failure on otherwise well-formed input. 429 means you are being rate-limited. 500 is a generic server failure, and 503 means the service is temporarily unavailable.

Choosing the right code in your API

Good status codes make an API self-documenting. Return 201 when you create a resource, not a bare 200. Distinguish 401 (who are you?) from 403 (you cannot do this). Use 404 for missing resources and 422 for validation errors rather than lumping everything into 400. And never return 200 with an error message in the body — clients and monitoring tools rely on the status line to know what happened.

Try it: Redirect Rule GeneratorGenerate 301/302 redirect rules for Apache .htaccess and Nginx.

Look it up when in doubt

There are dozens of defined codes, and you do not need to memorise them all. Knowing the classes lets you guess intelligently, and a quick lookup confirms the exact meaning — far better than guessing and shipping the wrong signal.