Skip to main content

HTTP Status Code Reference

Every HTTP status code explained — with real-world use cases, when to use them, and what they mean in REST APIs. Filter by category (1xx–5xx) or search by code number, name, or keyword.

✓ All 60+ standard codes ✓ Grouped by category ✓ Search by code or keyword

Frequently Asked Questions

What are HTTP status codes and why do they matter?▼

HTTP status codes are 3-digit numbers a server returns with every response to indicate the outcome of a request. They're grouped into 5 classes: 1xx (informational), 2xx (success), 3xx (redirection), 4xx (client error), and 5xx (server error). Understanding them is essential for debugging APIs, building error handling, and interpreting server logs.

What's the difference between 401 Unauthorized and 403 Forbidden?▼

401 Unauthorized means the server doesn't know who you are — authentication is missing or invalid. 403 Forbidden means the server knows who you are but you don't have permission. Use 401 when credentials are absent or wrong; use 403 when the user is authenticated but lacks access rights.

When should I use 301 vs 302 redirects?▼

301 Moved Permanently tells browsers and search engines to permanently update their records — SEO equity passes and the redirect is cached. 302 Found is temporary, so the original URL is preserved and not cached. Use 301 for permanent URL changes and domain migrations; use 302 for login flows, A/B testing, and temporary redirects.

What does 429 Too Many Requests mean?▼

429 indicates rate limiting — the client has exceeded the allowed request rate. Servers should include a Retry-After header showing when to retry. Clients should implement exponential backoff with jitter. This is the standard way to protect APIs from abuse without returning a 503.

When should a REST API return 422 vs 400?▼

400 Bad Request is for syntactically malformed requests (invalid JSON, missing Content-Type header). 422 Unprocessable Entity is for syntactically valid but semantically invalid input (correct JSON structure, but a field fails validation like 'age' being -5). Use 422 for form/field validation errors in modern APIs.

What is the difference between 404 and 410?▼

404 Not Found means the resource doesn't exist or you're not revealing its existence. 410 Gone means the resource previously existed but has been permanently deleted — this signals crawlers to deindex the URL and removes it from search results faster. Use 410 when you deliberately retire URLs; 404 is fine when you don't track deletions.

What HTTP status code should I use for API rate limiting vs maintenance?▼

For rate limiting, use 429 with a Retry-After header. For planned maintenance or temporary unavailability, use 503 Service Unavailable, also with a Retry-After header. 503 is the correct code when your server is up but intentionally not serving requests. Avoid using 500 for either scenario.

Sponsored

Disclosure

Affiliate disclosure: some links below may earn us a small commission at no cost to you. Learn more

Need to test HTTP requests directly?

API Request Tester →
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

Webhook Tester OpenAPI Validator HTTP Status Code Reference API Request Builder API Response Mock Generator WebSocket Tester WebP Converter HTTP Status Code Lookup WebSocket Test Client HTTP Status Code Lookup API Response Time Tester HTTP API Tester HTTP Methods Reference OpenAPI Schema Validator OpenAPI Mock Generator API Test Case Generator Core Web Vitals Guide API Response Formatter & Analyzer HTTP Status Code Reference Web Vitals Scorer Web Vitals Analyzer API Mock Server Config Generator REST API Request Builder API Response Mocker Core Web Vitals Budget Calculator HTTP Headers Analyzer API Rate Limit Calculator HTTP Headers Inspector HTTP Code Snippet Generator PWA Manifest Generator HTTP Mock Response Builder LLM Cost Calculator Caddy Caddyfile Generator HTTP Cache-Control Builder WASM Module Explorer HTTP Header Analyzer AI Prompt Cost Calculator HTTP/2 Server Push Headers Builder Lighthouse Score Simulator Mock Service Worker (MSW) API Mocking Guide Core Web Vitals Calculator HTTP Security Headers Checker LLM Prompt Cost Calculator AI Rate Limit Calculator WebAssembly Binary Inspector Web Vitals Budget Planner HTTP Cache Header Builder Web Performance Checklist Image Optimizer Checklist API Key Generator AI Doc Generator — Pro Tool Color Blindness Simulator curl Command Builder HTTP Security Headers Generator JSON Diff Viewer JSON Diff JWT Builder JWT Decoder Developer Utilities Rate Limiter Tester API Changelog Generator Service Worker Generator HMAC Generator CSP Header Builder Rate Limit Calculator CORS Policy Builder Haproxy Config Validator WCAG Contrast Checker HAR Diff Analyzer JWT Debugger Pro Vue Component Generator LLM Context Window Calculator LLM Token Counter Bundle Size Estimator SSL Certificate Checker Prompt Token Estimator nginx Config Builder Pulumi Modern IaC Guide Bundle Size Impact Calculator HTML5 Canvas API Playground Token Context Calculator OpenAI Function Calling Generator TTFB Analyzer Token Counter & Cost Estimator AI API Rate Limit Calculator JWT Decoder & Validator

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 →