HTTP Status Codes Cheat Sheet

Every HTTP response carries a three-digit status code that tells the client what happened with its request. This reference lists the status codes you'll actually encounter, grouped by class, with a plain-English meaning, a typical use case, and a quick memory hook for each.

Quick rule of thumb: the first digit tells you the category.

PrefixClassMeaning
1xxInformationalWait
2xxSuccessIt worked
3xxRedirectionLook elsewhere
4xxClient ErrorYou messed up
5xxServer ErrorWe messed up

1xx — Informational Responses (100–199)

The server has received the request and the process is continuing.

CodeNameWhen It's UsedMemory Hook
100ContinueClient should continue sending request bodyKeep going
101Switching ProtocolsProtocol upgrade (e.g., HTTP → WebSocket)Switching lanes
102ProcessingRequest received, still processing (WebDAV)Working on it
103Early HintsPreload resources before final responseHeads up

2xx — Success Responses (200–299)

The request was successfully received, understood, and accepted.

CodeNameTypical UseMemory Hook
200OKStandard successful responseAll good
201CreatedResource created (POST)Born
202AcceptedAccepted but not yet completedIn progress
204No ContentSuccess with no response bodyEmpty but fine
206Partial ContentRange requests (file streaming)Just a slice

Which success code should your API return?

OperationRecommended Code
GET200
POST (create)201
PUT / PATCH200 or 204
DELETE204

3xx — Redirection Responses (300–399)

The client must take an additional action to complete the request.

CodeNameWhen to UseMemory Hook
301Moved PermanentlyPermanent redirectForever moved
302FoundTemporary redirectMoved for now
303See OtherRedirect after POSTLook elsewhere
304Not ModifiedCached version still validUse your copy
307Temporary RedirectTemporary, method preservedSame method, temp
308Permanent RedirectPermanent, method preservedSame method, forever

301 vs 308: both are permanent, but 308 guarantees the HTTP method (e.g., POST) isn't changed to GET on the redirect. Use 308 for non-GET requests.


4xx — Client Error Responses (400–499)

The request contains bad syntax or cannot be fulfilled by the server.

CodeNameTypical CauseMemory Hook
400Bad RequestMalformed syntax / invalid JSONYou messed up
401UnauthorizedMissing or invalid authenticationWho are you
403ForbiddenAuthenticated but no permissionNot allowed
404Not FoundResource does not existGone missing
405Method Not AllowedIncorrect HTTP methodWrong verb
406Not AcceptableCannot produce requested formatWrong format
408Request TimeoutClient took too longToo slow
409ConflictResource state conflictVersion clash
410GonePermanently removed resourceReally gone
413Payload Too LargeRequest body too largeToo heavy
415Unsupported Media TypeInvalid Content-TypeWrong type
422Unprocessable EntityValidation failedData invalid
429Too Many RequestsRate limiting triggeredSlow down

401 vs 403: authentication quick reference

ScenarioCode
No token provided401
Invalid or expired token401
Valid token, no permission403

5xx — Server Error Responses (500–599)

The server failed to fulfill an otherwise valid request.

CodeNameMeaningMemory Hook
500Internal Server ErrorGeneric server failureSomething broke
501Not ImplementedFeature not supportedNot built
502Bad GatewayInvalid upstream responseBad middleman
503Service UnavailableServer overloaded or downCome back later
504Gateway TimeoutUpstream service timeoutUpstream too slow

Rare but Useful HTTP Status Codes

CodeMeaning
418I'm a Teapot (RFC 2324 joke)
425Too Early (retry unsafe request)
451Unavailable for Legal Reasons

Frequently Asked Questions

What are the 5 categories of HTTP status codes? Codes are grouped by their first digit: 1xx (informational), 2xx (success), 3xx (redirection), 4xx (client errors), and 5xx (server errors).

What is the difference between 401 and 403? A 401 means you aren't authenticated (unknown or invalid credentials). A 403 means you're authenticated but not authorized to access the resource.

What status code should a successful POST return? Use 201 Created when the request creates a new resource, and include the new resource's location. Use 200 OK for a POST that doesn't create anything.

What does a 429 status code mean? 429 Too Many Requests means you've hit a rate limit. Check the Retry-After header to see when you can try again.

Is 418 a real HTTP status code? 418 I'm a Teapot is a real, registered code originating from an April Fools' RFC. It isn't used in production APIs but is widely recognized.

Last Updated on Jul 13, 2026