Skip to main content

HTTP Status Code Explorer

Complete HTTP status code reference with descriptions, use cases, and code examples for Express, FastAPI, and Hono. Click any code or search by number or keyword.

✓ All 1xx–5xx codes ✓ Express / FastAPI / Hono examples ✓ Search by code or keyword

Frequently Asked Questions

When should I use 200 vs 201 vs 204?▼

Use 200 OK for general success with a response body. Use 201 Created when a POST creates a new resource — include a Location header pointing to the new resource. Use 204 No Content for successful operations that return nothing (e.g. DELETE, or PATCH when you don't need to return the updated state).

What is the difference between 401 and 403?▼

401 Unauthorized means the request lacks valid authentication credentials — the client should authenticate and retry. 403 Forbidden means the server understood the request and the client IS authenticated, but lacks permission to access the resource. In short: 401 = not logged in, 403 = logged in but not allowed.

When should I use 422 instead of 400?▼

400 Bad Request covers malformed syntax (invalid JSON, wrong content-type). 422 Unprocessable Entity is for requests that are syntactically correct but semantically invalid — e.g. a valid JSON body where a required field fails business validation. REST APIs often use 400 for both, but GraphQL and some frameworks prefer 422 for validation errors.

What does 429 Too Many Requests mean and how should I handle it?▼

429 indicates the client has sent too many requests in a given time window (rate limiting). The response should include a Retry-After header indicating when the client can retry. Clients should implement exponential backoff and respect this header to avoid being permanently blocked.

Should I use 503 or 502 for downstream service errors?▼

Use 502 Bad Gateway when your server received an invalid response from an upstream service it's proxying to. Use 503 Service Unavailable when your server itself is overloaded or temporarily down for maintenance — include a Retry-After header. Use 504 Gateway Timeout when the upstream service didn't respond in time.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

OpenAPI Validator HTTP Status Code Reference API Request Builder API Response Mock Generator HTTP Status Code Reference HTTP Status Code Lookup HTTP Status Code Lookup API Response Time Tester HTTP API Tester HTTP Methods Reference OpenAPI Schema Validator OpenAPI Mock Generator API Test Case Generator API Response Formatter & Analyzer HTTP Status Code Reference API Mock Server Config Generator REST API Request Builder API Response Mocker HTTP Headers Analyzer API Rate Limit Calculator HTTP Headers Inspector HTTP Code Snippet Generator HTTP Mock Response Builder Rate Limit Calculator LLM Cost Calculator CORS Policy Builder HTTP Cache-Control Builder HTTP Header Analyzer AI Prompt Cost Calculator HTTP/2 Server Push Headers Builder Cron Expression Validator Cron Expression Explainer Mock Service Worker (MSW) API Mocking Guide HTTP Security Headers Checker LLM Prompt Cost Calculator AI Rate Limit Calculator HTTP Cache Header Builder API Key Generator AI Doc Generator — Pro Tool AI Regex Explainer — Pro Tool Cron Expression Builder Cron Expression Generator Cron Expression Validator curl Command Builder HTTP Security Headers Generator JSON Diff Viewer JSON Diff Regex Visualizer Regex Playground Regex Tester Pro Regex Tester Developer Utilities Rate Limiter Tester API Changelog Generator Webhook Tester Prometheus Alert Rules Validator Haproxy Config Validator Caddy Caddyfile Generator HAR Diff Analyzer Cron Expression Tester Vue Component Generator LLM Context Window Calculator LLM Token Counter SSL Certificate Checker Prompt Token Estimator Pulumi Modern IaC Guide GitHub Actions Cron Builder HTML5 Canvas API Playground Token Context Calculator LangChain PromptTemplate Builder OpenAI Function Calling Generator Token Counter & Cost Estimator AI API Rate Limit Calculator

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →