HTTP Status Codes Cheatsheet 2026

Updated April 2026

Quick Answer HTTP status codes are 3-digit numbers in the response that indicate the result. 2xx = success (200 OK, 201 Created, 204 No Content). 3xx = redirect (301 permanent, 302 temporary, 304 not modified). 4xx = client error (400 bad request, 401 unauthorized, 403 forbidden, 404 not found, 429 rate limited). 5xx = server error (500, 502, 503, 504).

Every HTTP status code in one place — what it means, when to return it, and what headers go with it.

1xx — Informational

CodeNameWhen to use
100ContinueServer accepts request, client should continue sending body
101Switching ProtocolsUpgrading to WebSocket — send Upgrade header

2xx — Success

CodeNameWhen to use
200OKStandard success. GET, POST responses with body
201CreatedResource created (POST). Include Location header pointing to new resource
204No ContentSuccess with no body — DELETE, PUT with no response, CORS preflight
206Partial ContentRange request fulfilled — video streaming, resumable downloads

3xx — Redirection

CodeNameWhen to use
301Moved PermanentlyPermanent redirect — HTTP to HTTPS, domain changes. Browsers and search engines update cached URL
302FoundTemporary redirect — keep original URL. Browsers don't cache
303See OtherRedirect after POST to prevent double-submit (POST/Redirect/GET pattern)
304Not ModifiedCache validation — content unchanged, browser uses cached version. Sent in response to If-None-Match or If-Modified-Since
307Temporary RedirectTemporary redirect preserving HTTP method (POST stays POST)
308Permanent RedirectLike 301 but preserves HTTP method

4xx — Client Errors

CodeNameWhen to use
400Bad RequestMalformed request, invalid parameters, validation failure
401UnauthorizedAuthentication required. Send WWW-Authenticate header. Different from 403 — user is not logged in
403ForbiddenAuthenticated but not authorized. User is logged in but lacks permission
404Not FoundResource does not exist. Also used to hide existence of private resources
405Method Not AllowedHTTP method not supported for this endpoint. Send Allow header listing valid methods
409ConflictState conflict — duplicate resource, optimistic lock failure
410GoneResource permanently deleted. Unlike 404, signals it existed before
422Unprocessable EntityValidation error — request well-formed but semantically invalid. Common in REST APIs
429Too Many RequestsRate limit exceeded. Send Retry-After and X-RateLimit-* headers

5xx — Server Errors

CodeNameWhen to use
500Internal Server ErrorUnexpected server error. Log the error, return generic message to client
501Not ImplementedHTTP method not supported by server at all
502Bad GatewayUpstream server returned invalid response — reverse proxy / CDN issue
503Service UnavailableServer temporarily unavailable — maintenance, overload. Send Retry-After
504Gateway TimeoutUpstream server timed out — reverse proxy / CDN issue

Headers that go with specific codes

StatusRequired/common headers
201 CreatedLocation: /api/resources/123
301/302/307/308Location: https://new-url.com
304 Not ModifiedETag, Cache-Control, Expires
401 UnauthorizedWWW-Authenticate: Bearer realm="api"
405 Method Not AllowedAllow: GET, POST, OPTIONS
429 Too Many RequestsRetry-After: 60, X-RateLimit-Limit: 100
503 Service UnavailableRetry-After: 120

Common confusions

Scan your security headers → HeadersFixer