Search every IANA-registered status code plus the unofficial ones you meet in real logs (nginx 499, Cloudflare 520-530). Each code has its meaning, common causes, what to check, caching and header rules, and a copyable example response. 100% client-side. Zero data stored.
Pick the right code for every response - 201 with Location for creates, 409 for conflicts, 422 for validation, 429 with Retry-After for rate limits.
Incident Triage
A wall of 502s, 504s, or Cloudflare 522s in the logs? See what each one says about where the failure is and what to check first.
SEO and Redirects
Choose between 301, 302, 307, and 308 for a migration, use 410 for removed content, and avoid soft 404s that waste crawl budget.
Writing Tests
Assert the exact codes your endpoints should return, including the headers each code requires, such as Allow on a 405.
Caching and CDNs
Know which responses caches may store by default - including 301, 404, and 410 - before a bad response gets cached at the edge.
Learning HTTP
Each code links to the RFC that defines it, so you can go from a plain-English summary to the authoritative text in one click.
Choosing the Right Status Code
Redirects: 301 vs 302 vs 303 vs 307 vs 308
Code
Permanent
Keeps method
Use it for
301
Yes
No (POST may become GET)
Moved pages, HTTPS, domain moves
302
No
No (POST may become GET)
Login redirects, short-term moves
303
No
Always becomes GET
After a form POST (Post/Redirect/Get)
307
No
Yes
Temporary API or form redirects
308
Yes
Yes
Permanent API endpoint moves
Which Error Should My API Return?
Situation
Code
Body is not valid JSON
400
Valid JSON, invalid values
422 (or 400)
Not logged in or token expired
401
Logged in but not allowed
403 (or 404 to hide it)
Duplicate or edit conflict
409
Too many requests
429 + Retry-After
Unexpected crash
500
Down for maintenance
503 + Retry-After
502 Bad Gateway
The proxy reached the upstream, but got a broken or empty answer. Usually the app crashed or is restarting.
503 Service Unavailable
The server is deliberately refusing work - maintenance or overload - and should say when to retry.
504 Gateway Timeout
The proxy waited, and the upstream never answered in time. Look for slow queries and long-running requests.
Pro Tip: Link Straight to a Code
Every code has its own link: /http-status-codes/#429 jumps to and highlights 429. Search links work too: ?q=timeout.
Click any code's title to copy its link into the address bar - handy for bug reports and code reviews.
Frequently Asked Questions
They are three-digit numbers a server sends with every HTTP response to say how the request went. The first digit is the class: 1xx informational, 2xx success, 3xx redirection, 4xx a problem with the request, and 5xx a problem on the server. The official list is the IANA HTTP Status Code Registry, and most codes are defined in RFC 9110.
401 Unauthorized means the server does not know who you are - credentials are missing or invalid - and logging in may help. 403 Forbidden means the server knows who you are and you are still not allowed. A 401 must include a WWW-Authenticate header describing how to authenticate.
301 and 308 are permanent; 302 and 307 are temporary. The difference within each pair is the request method: with 301 and 302 a browser may turn a POST into a GET, while 307 and 308 always repeat the same method and body. Search engines index the new URL after a permanent redirect and keep the original URL after a temporary one.
Use 410 Gone when the content was removed on purpose and is not coming back - search engines tend to drop it from their index faster. Use 404 Not Found when you do not know or do not want to say. If the content moved, use a 301 redirect to its new address instead of either.
Stop and wait. If the response has a Retry-After header, wait that many seconds (or until that date). Otherwise retry with exponential backoff plus random jitter, so many clients do not all retry at the same moment. Retrying immediately in a loop only extends the block.
All three come from servers, but they point at different problems. 502 Bad Gateway means a proxy got a broken response from the server behind it. 503 Service Unavailable means the server is intentionally not taking requests right now, such as during maintenance. 504 Gateway Timeout means the proxy waited and the server behind it never answered in time.
They are Cloudflare-specific codes for problems between Cloudflare and your origin server: 521 means the origin refused the connection, 522 that the connection timed out, 524 that the origin took longer than 100 seconds to respond, and 525 and 526 are TLS problems. The fix is almost always on the origin, not at Cloudflare.
Both are acceptable. A common convention is 400 Bad Request when the request cannot be parsed at all, and 422 Unprocessable Content when it parses but the values are invalid. Whichever you choose, use it consistently and return field-level error details, for example in the application/problem+json format.
Not for real APIs. It comes from an April Fools RFC about coffee pots. RFC 9110 marks 418 as reserved and unused so no future standard claims the number, but it has no defined meaning, and you should not rely on it in production.
Caches may store these by default, even without explicit caching headers: 200, 203, 204, 206, 300, 301, 308, 404, 405, 410, 414, and 501. Any other response is cached only when headers such as Cache-Control explicitly allow it. That is why a mistaken 301 or 404 can stick around after you fix it.
Why We Built This HTTP Status Code Reference
Most status code lists stop at a one-line definition. When you are staring at a 502 at two in the morning, you need more than "Bad Gateway": you need to know what usually causes it and what to check first. We built this reference to answer those questions for every code, including the unofficial nginx, Cloudflare, and AWS codes that show up in real logs but not in the specifications.
Every IANA-registered code is here with its meaning, common causes, the headers it requires, whether caches may store it, an example response you can copy, and a link to the RFC that defines it. Search works on numbers, names, and symptoms, and every code has a direct link you can drop into a ticket. It all runs in your browser, and the page works offline once loaded.
This HTTP Status Codes reference is part of RJL.io's collection of free developer tools. Configure redirects and error pages with the .htaccess Generator, audit a site's responses with the SEO Analyzer, and keep curl commands handy in the Developer Cheat Sheets.
ESC
Start typing to search...
Looking for more developer tools to streamline your workflow?
Explore our growing collection of free, privacy-focused utilities designed by developers, for developers.