HTTP Status Code Explorer
Searchable reference for all HTTP status codes. Click any code to expand real-world use cases, response examples, cacheability, and retry guidance.
Frequently Asked Questions
What is the difference between 401 and 403?▼
401 Unauthorized means you are not authenticated — you need to provide credentials (login, API key, JWT). 403 Forbidden means you are authenticated but do not have permission — the server knows who you are but refuses your request. In practice: 401 means log in, 403 means your role lacks the required permissions.
When should I use 422 instead of 400?▼
Use 400 Bad Request for syntactically malformed requests (invalid JSON, wrong content-type, missing required top-level parameter). Use 422 Unprocessable Entity for semantically invalid requests where the structure is valid but the values fail business rules — wrong email format, date in the past, value out of allowed range. Many APIs use 400 for both, but 422 is more precise for validation errors.
What is the difference between 301 and 308?▼
Both are permanent redirects, but 308 Permanent Redirect guarantees the HTTP method is preserved. With 301, browsers may change POST requests to GET on redirect (and many do). With 308, POST stays POST. Same relationship exists for temporary redirects: 302 may change POST to GET, 307 does not.
Should my API return 200 or 204 for DELETE?▼
Use 200 OK if you return a response body (e.g., the deleted resource or a confirmation message). Use 204 No Content if you return nothing. Both are valid — 204 is slightly more semantic but 200 is more common in REST APIs. Never return 200 with an empty body when you could return 204.
How should I handle 429 Too Many Requests?▼
Always include a Retry-After header with the number of seconds until the rate limit resets. Also include X-RateLimit-Limit (total requests allowed), X-RateLimit-Remaining (requests left in window), and X-RateLimit-Reset (Unix timestamp when window resets). Clients should exponential backoff on 429 — retry after Retry-After seconds, doubling on successive failures.
What HTTP status codes are cacheable by default?▼
Cacheable by default (no cache headers needed): 200, 203, 204, 206, 300, 301, 404, 405, 410, 414, 501. Not cacheable by default: 302, 303, 307, 308 (unless Cache-Control is explicitly set). Always cacheable: 200 with Cache-Control or Expires. Override caching with Cache-Control: no-store for sensitive responses.
Related Products
on GumroadDevToolkit Starter Kit
A ready-to-deploy developer tools website with 12 built-in tools. Astro + Preact + Tailwind. Deploy to Cloudflare Pages for free. Built-in SEO, dark mode, and ad-ready layout.
Buy on Gumroad →TypeScript Quick Reference Toolkit
5 practical reference files for TypeScript developers: cheatsheet, TS vs JS comparison, 20 utility types with real examples, tsconfig best practices template, and 15 common mistakes guide. Print it. Keep it on your desk.
Buy on Gumroad →Developer Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →You Might Also Need
Webhook Tester
Generate realistic webhook test payloads for GitHub, Stripe, Slack, and custom services. Get a curl command to send the payload to your local endpoint. Inspect headers, payload size, and content-type.
Open free tool →
OpenAPI Validator
Paste your OpenAPI 3.x spec (YAML or JSON) to validate structure, find missing required fields, detect duplicate paths, check for missing operationIds, and get errors and warnings with path references.
Open free tool →
HTTP Status Code Reference
Complete HTTP status code reference. Search all 1xx, 2xx, 3xx, 4xx, and 5xx codes with plain-English descriptions, real-world use cases, and when to use each in REST APIs.
Open free tool →
More Free Tools
Related Articles
curl 深度使用手冊:API 測試從入門到進階
curl 是每位開發者必備的 CLI 工具。本文涵蓋 GET/POST/PUT/DELETE 請求、認證、header 設定、檔案上傳、除錯技巧,以及 REST API 測試的完整實戰範例。
10 Best Free API Testing Tools in 2025 (Postman Alternatives Included)
Best free API testing tools in 2025: Postman free tier, Bruno, Insomnia, Hoppscotch, HTTPie, Thunder Client, and more. Full feature comparison included.
Complete HTTP Status Codes Reference for REST API Devs
The complete HTTP status codes reference for REST API developers. Every 1xx, 2xx, 3xx, 4xx, and 5xx code explained with real-world API examples and best practices.
How to Use curl for API Testing
Master curl for API testing: GET, POST, auth tokens, JSON payloads, debugging flags, and practical real-world examples every backend developer needs daily.
GraphQL Federation vs REST Microservices: Which Architecture in 2026?
Compare GraphQL Federation vs REST microservices — Apollo Federation, schema stitching, performance, team scaling, migration paths, and when to choose each in 2026.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$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.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →