HTTP Status Code Reference
Every HTTP status code explained — with real-world use cases. Filter by category or search by code number, name, or keyword.
Frequently Asked Questions
What is an HTTP status code?▼
HTTP status codes are 3-digit numbers returned by a server to indicate the result of a request. They're grouped into 5 classes: 1xx (informational), 2xx (success), 3xx (redirection), 4xx (client error), and 5xx (server error). Every HTTP response includes a status code.
What's the difference between 401 and 403?▼
401 Unauthorized means the request lacks valid authentication — the server doesn't know who you are. 403 Forbidden means the server knows who you are, but you don't have permission to access the resource. Use 401 when credentials are missing or invalid; use 403 when the user is authenticated but unauthorized.
When should I use 404 vs 410?▼
Use 404 Not Found when a resource doesn't exist or you don't want to reveal whether it exists. Use 410 Gone when a resource existed but has been permanently deleted — this tells search crawlers to deindex the URL. If you don't track deletions, 404 is fine in most cases.
What is the difference between 301 and 302 redirects?▼
301 Moved Permanently tells browsers and search engines to permanently update their records — link equity transfers and the redirect is cached. 302 Found is temporary, so browsers keep the original URL and don't cache the redirect. For SEO-safe URL changes, use 301. For login flows or A/B testing, use 302.
What does HTTP 429 Too Many Requests mean?▼
429 indicates rate limiting — the client has sent too many requests in a given window. Best practice is to include a Retry-After header indicating when the client can retry. Clients should implement exponential backoff and jitter when they receive 429 responses from APIs.
When should a REST API return 422 vs 400?▼
400 Bad Request is for syntactically malformed requests (invalid JSON, missing Content-Type). 422 Unprocessable Entity is for requests that are syntactically valid but semantically wrong (correct JSON structure, but a field fails validation like 'age' being negative). Most modern APIs use 422 for form/field validation errors.
Sponsored
DisclosureAffiliate disclosure: some links below may earn us a small commission at no cost to you. Learn more
Deploy frontend apps in seconds. Zero config, global CDN.
Deploy free →Deploy any app or database with one click. No DevOps required.
Start free →Simple cloud hosting for developers. VPS, managed databases, and more.
Get $200 free →Need to build and test HTTP requests?
API Request Tester →Related Products
on GumroadAI Prompt Engineering Toolkit
58 structured prompt templates for Claude, ChatGPT, and Gemini — organized by use case. Code Review, Debugging, Documentation, Architecture, and 10 model-specific tips. Stop writing prompts from scratch.
Buy on Gumroad →AI Developer Prompts Pack
55 battle-tested prompt templates for the workflows developers actually use: code review, debugging, architecture, documentation, and testing. Stop writing prompts from scratch.
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 測試的完整實戰範例。
Webhook Testing: How to Debug, Inspect, and Replay Webhooks in 2026
Complete guide to webhook testing. Covers local tunneling, replay tools, signature verification, retry handling, and the best practices for testing webhooks without production data.
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.
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.
tRPC vs GraphQL vs REST: Type-Safe APIs in 2026
Compare tRPC, GraphQL, and REST for building type-safe APIs in 2026. Covers DX, performance, bundle size, schema management, and when to use each approach.
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 →