Cheat sheetWeb

HTTP status codes

Every HTTP status code you'll actually meet, explained in one line each — grouped by class, filterable, and printable for the desk.

Last updated

2xx — Success

CodeMeaning
200 OKIt worked; the response body is the answer.
201 CreatedIt worked and a new resource now exists — Location header says where.
202 AcceptedReceived, queued for processing later; no promise it will succeed.
204 No ContentIt worked and there is deliberately nothing to send back.
206 Partial ContentHere is the byte range you asked for — resumable downloads live here.

3xx — Redirection

CodeMeaning
301 Moved PermanentlyGone for good; update your links — browsers and Google cache this.
302 FoundTemporarily elsewhere; keep using the old URL.
304 Not ModifiedYour cached copy is still current; body intentionally empty.
307 Temporary RedirectLike 302, but the method and body must not change on the retry.
308 Permanent RedirectLike 301, but the method and body must not change on the retry.

4xx — Client errors

CodeMeaning
400 Bad RequestThe server can't parse or accept what you sent — malformed syntax or invalid fields.
401 UnauthorizedMisnamed: you are unauthenticated — log in (or fix the token) and retry.
403 ForbiddenAuthenticated, but this identity may not do that — logging in again won't help.
404 Not FoundNo resource at this URL — or the server won't admit one exists.
405 Method Not AllowedThe URL exists but not for this verb; Allow header lists what works.
408 Request TimeoutYou took too long to finish sending; the server hung up.
409 ConflictValid request, but it collides with current state — edit conflicts, duplicate names.
410 GoneExisted once, deliberately removed forever — a 404 with a tombstone.
413 Payload Too LargeThe body exceeds the server's size limit — common on file uploads.
415 Unsupported Media TypeThe Content-Type you sent isn't one the endpoint accepts.
418 I'm a teapotAn April Fools RFC made real — used by sites to reject automated junk.
422 Unprocessable EntityParsed fine, failed validation — the classic "form errors" status for APIs.
429 Too Many RequestsRate limited; Retry-After says how long to back off.

5xx — Server errors

CodeMeaning
500 Internal Server ErrorThe server's code crashed; nothing you sent was necessarily wrong.
501 Not ImplementedThe server doesn't support this method at all, for any resource.
502 Bad GatewayA proxy got a garbage response from the server behind it.
503 Service UnavailableOverloaded or down for maintenance — temporary, retry later.
504 Gateway TimeoutA proxy gave up waiting for the server behind it.

1xx — Informational

CodeMeaning
100 ContinueHeaders look fine; go ahead and send the body.
101 Switching ProtocolsUpgrading this connection — how every WebSocket begins.

Worth remembering

  • The class digit is the contract: 2xx you're done, 3xx go elsewhere, 4xx fix your request, 5xx wait or escalate — an unfamiliar code still tells you which side is broken.
  • 401 vs 403 is the pair worth memorizing: 401 means prove who you are, 403 means we know exactly who you are.

Related in Cheat sheets