HTTP Status Code Reference
Searchable HTTP status code reference with descriptions, use cases, and examples. Find any HTTP response code from 1xx to 5xx instantly.
Showing 62 of 62 status codes
About HTTP Status Codes
HTTP status codes are three-digit numbers returned by a server in response to a client request. They indicate whether the request was successful, redirected, resulted in a client error, or caused a server error. Understanding these codes is essential for web development, API design, and debugging network issues.
How to Use HTTP Status Code Reference
Search or browse
Search by the specific code you're looking up (200, 404, 503) or browse by category — informational, success, redirection, client error, server error. Searching by code is faster when you have a number in front of you and want to know what it means; browsing the category lists is more useful when you're picking the right code for a new endpoint and want to see your options.
View code details
Each entry shows the code number, the official short name (OK, Not Found, Service Unavailable), a plain-English description of what the code means, common scenarios where it's the right choice, and related codes that often come up in the same context. The 401-versus-403 distinction and the 500-versus-503 distinction are the two pairs people look up most often.
Use in API design
Pick codes that accurately describe what happened on the server. The HTTP semantics matter — 4xx codes signal client errors that retrying probably won't fix, while 5xx codes signal server-side problems that might recover on retry. Specific codes like 422 for validation errors or 429 for rate limits give clients much clearer signals than always returning a generic 400 or 500.
Document and use
List the codes each endpoint can return in your API documentation, with notes on what each one means in that specific context. The team benefits from a shared understanding of when to reach for 201 versus 204, or when 409 Conflict is more appropriate than 400 Bad Request. Specific codes also make logs and dashboards more diagnostic when something goes wrong in production.
When to Use HTTP Status Code Reference
API development
Choosing the right status code for an API response is one of those small design decisions that has outsized effect on how usable the API feels. 200 for everything works but tells client code nothing; 201 for created resources, 204 for successful deletes, 422 for validation failures all give clients a much better signal. Backend developers designing REST endpoints reference the full taxonomy regularly during the design phase.
Debugging web issues
When a browser shows '500 Internal Server Error' or the network tab is full of 403s, knowing what each code actually means narrows down where the problem lives. The reference saves you from rote memorization and clarifies subtle distinctions like 502 versus 503. Useful for support engineers, developers fielding bug reports, and anyone investigating why a page won't load.
Documentation reference
API documentation is a lot more useful when it spells out which status codes each endpoint can return and what they mean in context. The reference makes it easy to pick the appropriate code for each scenario without inventing new ones or shoehorning multiple meanings onto one code. Technical writers documenting REST APIs lean on this constantly.
Educational/learning
The HTTP standard has hundreds of codes across five classes, but most APIs use only fifteen or twenty of them in practice. The reference helps web developers learn which ones matter, what they mean, and when to reach for them — and it's a useful interview prep resource for the inevitable 'what's the difference between 401 and 403' question.
HTTP Status Code Reference Examples
Common success
200 OKThe standard success response. The request worked and the response body contains the result. Used for GET requests that return data and most other successful operations that produce output.By far the most common success code. Almost every endpoint that returns data ends up here. For POST creating new resources, 201 is more semantically appropriate; for PUT updates that don't echo the resource back, 204 is cleaner — but 200 is the universal default that nothing breaks on.
Authentication error
401 Unauthorized vs 403 Forbidden401 means the client didn't authenticate or sent invalid credentials. 403 means the client is authenticated but doesn't have permission for this specific action.The most-confused pair in the catalog. The mental model worth holding: 401 asks 'who are you?', 403 says 'I know who you are, and you can't do this.' Many APIs blur this — returning 401 for both — but a properly distinguished pair makes client error handling significantly cleaner.
Server error
500 Internal Server ErrorSomething broke on the server through no fault of the client. The request was well-formed; the backend couldn't process it.The catch-all for unexpected backend failures. When you can be more specific — 502 for a bad upstream gateway, 503 for an overloaded or under-maintenance service, 504 for a gateway timeout — using the specific code helps clients decide whether to retry. 500 implies 'we don't know what happened, sorry.'
Tips & Best Practices for HTTP Status Code Reference
- 1.Reach for semantic codes rather than 200-for-everything. 200 with a response body, 201 for newly created resources (with a Location header), 204 for successful deletes that don't echo data — each gives client code a clearer signal about what just happened.
- 2.Mind the 4xx versus 5xx distinction. 4xx is the client's fault — bad input, missing auth, requesting something that doesn't exist. 5xx is your fault as the API author. The split tells clients whether retrying makes sense and where to direct the bug report.
- 3.401 means 'who are you' and 403 means 'you can't do this.' If your API conflates them, client error handling either has to inspect the body or guess. Distinguishing them properly is a small effort that pays off in cleaner integrations.
- 4.404 versus 410 is a smaller but real distinction. 404 means 'not found, maybe later.' 410 means 'this is permanently gone, stop trying.' For deprecated endpoints or removed resources, 410 prevents clients from polling forever.
- 5.429 Too Many Requests is the standard rate limit response. Always pair it with a Retry-After header so clients know when they can try again. Without that header, clients have to guess and tend to retry too aggressively.
- 6.Don't return 200 with an error in the body. Some legacy APIs do this and it makes status-code-driven error handling impossible. The status code is part of the response semantics — 2xx for success, 4xx/5xx for errors. Use it correctly and clients can rely on it.
Frequently Asked Questions
Related Tools
MIME Type Lookup
Look up MIME types by file extension or search MIME types to find associated extensions. Free MIME type reference with 200+ common types.
Robots.txt Generator
Generate robots.txt files online with crawler rules and sitemap directives. Free robots.txt generator for SEO and search engine control.
Sitemap Generator
Generate XML sitemaps online for better search engine indexing. Free sitemap generator with priority, frequency, and lastmod options.
.htaccess Generator
Generate .htaccess rules online for Apache web servers. Free htaccess generator for redirects, caching, security, and URL rewriting.
User Agent Parser
Parse and analyze user agent strings online to detect browser, OS, device, and bot details. Free user agent string parser and analyzer for web developers.
URL Parser
Parse and analyze URL components online including protocol, host, path, and query parameters. Free URL parser for web developers.