Cheat Sheet

HTTP Status Codes Cheat Sheet — All 70+ Codes Explained

Complete HTTP status code reference with all 1xx, 2xx, 3xx, 4xx, 5xx codes, when to use each, common causes, and practical examples. Bookmark for debugging.

Every HTTP status code you'll encounter, grouped by category, with practical notes on when to use each and what they usually mean in the wild. For quick lookup of a specific code, use the status code tool.

1xx — Informational

CodeNameWhen
100ContinueServer got request headers; client may send the body
101Switching ProtocolsUpgrade from HTTP to WebSocket or HTTP/2
102ProcessingLong-running request is in progress (WebDAV)
103Early HintsPreload hints before final response (saves perf time)

2xx — Success

CodeNameWhen
200OKStandard success (GET, most PUTs)
201CreatedResource created (POST); include Location header
202AcceptedRequest queued but not yet processed
204No ContentSuccess with no body (DELETE, some PUTs)
206Partial ContentRange request succeeded (video seeking, resumed downloads)

3xx — Redirection

CodeNameWhen
301Moved PermanentlyPermanent redirect; passes link equity in SEO
302FoundTemporary redirect; method may change (buggy by spec)
303See OtherPost-Redirect-Get pattern; GET the new URL
304Not ModifiedCache hit; resource unchanged since last fetch
307Temporary RedirectLike 302 but preserves HTTP method strictly
308Permanent RedirectLike 301 but preserves HTTP method strictly

301 vs 302: 301 for permanent URL moves (rebranding, migration). 302 for A/B tests, maintenance, session-specific. Search engines cache 301s; don't use them if you might move back. For API redirects preserving method, prefer 307/308.

4xx — Client Errors

CodeNameWhen
400Bad RequestMalformed syntax, invalid parameters
401UnauthorizedAuthentication required or failed (misnamed — should be "Unauthenticated")
402Payment RequiredReserved; rarely used in practice (Stripe uses it)
403ForbiddenAuthenticated but not authorized for this resource
404Not FoundResource doesn't exist
405Method Not AllowedEndpoint exists but doesn't accept this HTTP verb
406Not AcceptableAccept header can't be satisfied
408Request TimeoutClient took too long to send
409ConflictConcurrent edits, unique constraint violation
410GoneResource existed but is permanently deleted (stronger than 404)
411Length RequiredMissing Content-Length header
412Precondition FailedIf-Match or If-Unmodified-Since failed
413Payload Too LargeRequest body exceeds server limit
414URI Too LongUsually from too many query params
415Unsupported Media TypeBad Content-Type
418I'm a teapotApril Fools; real APIs sometimes use it as an easter egg
422Unprocessable EntitySyntactically valid but semantically invalid (validation errors)
425Too EarlyRequest sent in 0-RTT that could be replayed
428Precondition RequiredServer requires conditional request
429Too Many RequestsRate limited; check Retry-After
451Unavailable For Legal ReasonsBlocked by court order or regulation

5xx — Server Errors

CodeNameWhen
500Internal Server ErrorGeneric server failure; check logs
501Not ImplementedServer doesn't support the method
502Bad GatewayUpstream server returned invalid response (common behind load balancers)
503Service UnavailableTemporarily overloaded or in maintenance; include Retry-After
504Gateway TimeoutUpstream took too long
505HTTP Version Not SupportedServer doesn't support the HTTP version
507Insufficient StorageWebDAV; disk full
508Loop DetectedWebDAV; infinite redirect loop
511Network Authentication RequiredCaptive portal (hotel/airport Wi-Fi)

Quick decision tree: which code to return?

  • Created a resource?201 with Location header
  • Deleted a resource?204 (no body) or 200 (with result)
  • Validation failed?422 (not 400) when input was well-formed but semantically wrong
  • User not logged in?401
  • User logged in but not allowed?403
  • Resource moved forever?301 (or 308 for APIs)
  • Rate limited?429 with Retry-After: N
  • Down for maintenance?503 with Retry-After
  • Upstream timing out?504 (not 500)

Common debugging scenarios

401 from an authenticated endpoint: JWT may be expired — decode it with JWT decoder to check exp.

400 from an API: Request body likely malformed — prettify and validate with JSON formatter.

URL-encoding issues in 400/404: Special characters may need encoding — check with URL encoder/decoder.

Featured Tools

Try these free tools directly in your browser — no sign-up required.

http status codes http status code cheat sheet http response codes 404 meaning 500 error 301 vs 302

Explore 300+ Free Tools

Utilko has tools for developers, writers, designers, students, and everyday users — all free, all browser-based.