HTTP Status Code Lookup
Browse or search all HTTP status codes — 1xx Informational, 2xx Success, 3xx Redirection, 4xx Client Error, and 5xx Server Error. Click any code to see description, common causes, and when to use it in your API.
Frequently Asked Questions
What is the difference between 401 and 403?▼
401 Unauthorized means the client is not authenticated — the server doesn't know who you are. Include a WWW-Authenticate header so the client knows how to authenticate. 403 Forbidden means the client is authenticated but lacks permission — the server knows who you are but you're not allowed to access this resource.
When should I use 404 vs 403?▼
Use 404 when a resource doesn't exist. Use 403 when it exists but the user lacks permission. However, returning 404 for a resource that exists (but is forbidden) is a common security practice to avoid leaking information about the existence of private resources — sometimes called 'security through obscurity'.
What is the difference between 301 and 308?▼
Both are permanent redirects, but 301 allows browsers to change the HTTP method (typically converting POST to GET), while 308 requires the client to use the same HTTP method as the original request. Use 308 when you're permanently moving a POST endpoint and need the method preserved.
When should I use 422 instead of 400?▼
Use 400 Bad Request for syntactically malformed requests (invalid JSON, missing required headers). Use 422 Unprocessable Entity for requests that are syntactically valid but fail semantic/business validation (e.g., end date before start date, invalid email format, value out of allowed range).
What does 429 Too Many Requests require?▼
When returning 429, you should include a Retry-After header indicating when the client can retry — either as a number of seconds (Retry-After: 60) or an HTTP date. Also consider including X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers for better developer experience.
What is the difference between 502, 503, and 504?▼
502 Bad Gateway: your gateway/proxy received an invalid response from an upstream server. 503 Service Unavailable: the server itself is temporarily unavailable (overloaded, maintenance). 504 Gateway Timeout: your gateway/proxy didn't receive a timely response from an upstream server. All three indicate server-side problems and clients may retry.
Related Products
on GumroadAPI Testing Cheatsheet Pack
Quick-reference cheatsheets for REST, GraphQL, and WebSocket testing. Includes Postman collections, shell scripts for smoke tests and load tests, and JWT decoder.
Buy on Gumroad →DevToolkit 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 →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 Command Examples for REST APIs (2025 Reference)
Practical curl command examples for testing REST APIs. Covers GET, POST, PUT, DELETE, authentication, headers, file uploads, response handling, and debugging flags.
curl 深度使用手冊:API 測試從入門到進階
curl 是每位開發者必備的 CLI 工具。本文涵蓋 GET/POST/PUT/DELETE 請求、認證、header 設定、檔案上傳、除錯技巧,以及 REST API 測試的完整實戰範例。
FastAPI vs Django REST Framework 2025: Which Should You Choose?
FastAPI vs Django REST Framework compared for 2025. Performance benchmarks, feature comparison, real-world use cases, and a clear decision guide for your next Python API project.
Hono + Cloudflare Workers: Building a Production REST API in 2026
Deploy a type-safe REST API to Cloudflare's global edge network using Hono. Covers routing, middleware, D1 database, KV storage, authentication, and deployment — with production patterns you can copy today.
FastAPI vs Django REST Framework vs Flask vs Litestar: Python API Framework Comparison 2026
Which Python API framework should you choose in 2026? We compare FastAPI, Django REST Framework, Flask, and Litestar across performance, features, developer experience, and real-world use cases.
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 →