HTTP Status Codes Cheatsheet
Complete reference of HTTP response status codes with explanations. Bookmark this page for quick lookups during API development.
1xx — Informational
Server received request headers; client should proceed to send the body.
Server is switching protocols as requested by the client (e.g., to WebSocket).
Server has received and is processing the request, but no response is available yet.
Used to return some response headers before the final HTTP message.
2xx — Success
The request succeeded. The meaning depends on the HTTP method used.
The request succeeded and a new resource was created. Typically used for POST.
The request has been accepted for processing but processing is not complete.
The returned metadata is from a local or third-party copy, not the origin server.
The server successfully processed the request but returns no content.
Like 204, but requires the requester to reset the document view.
The server is delivering only part of the resource due to a range header.
WebDAV: the message body contains multiple status codes for multiple operations.
WebDAV: members of a binding have already been enumerated.
The server has fulfilled a GET request and the response represents instance-manipulations.
3xx — Redirection
There are multiple options for the resource that the client may follow.
This and all future requests should be directed to the given URL.
Temporary redirect. The resource is temporarily at a different URL.
The response can be found under another URL using a GET method.
The resource has not been modified since the last request (caching).
Like 302, but the method and body must not change when redirecting.
Like 301, but the method and body must not change when redirecting.
4xx — Client Errors
The server cannot process the request due to malformed syntax.
Authentication is required and has failed or has not been provided.
Reserved for future use. Some APIs use this for rate limiting.
The server understood the request but refuses to authorize it.
The requested resource could not be found on the server.
The HTTP method used is not supported for the requested resource.
The server cannot produce a response matching the Accept headers.
The client must authenticate with the proxy.
The server timed out waiting for the request.
The request conflicts with the current state of the server.
The resource is no longer available and will not be available again.
The request did not specify the Content-Length header, which is required.
The server does not meet one of the preconditions in the request headers.
The request is larger than the server is willing to process.
The URI provided was too long for the server to process.
The request entity has a media type that the server does not support.
The client has asked for a portion of the file that the server cannot supply.
Easter egg defined in RFC 2324. The server refuses to brew coffee with a teapot.
The request was well-formed but has semantic errors.
The user has sent too many requests in a given time (rate limiting).
The resource is unavailable due to legal demands (censorship).
5xx — Server Errors
The server encountered an unexpected condition that prevented it from fulfilling the request.
The server does not support the functionality required to fulfill the request.
The server received an invalid response from an upstream server.
The server is currently unable to handle the request (overloaded or maintenance).
The server did not receive a timely response from an upstream server.
The server does not support the HTTP protocol version used in the request.
The server is unable to store the representation needed to complete the request.
The server detected an infinite loop while processing the request.
The client needs to authenticate to gain network access (captive portal).
Frequently Asked Questions
What is the difference between 401 and 403?
401 Unauthorized means the request lacks valid authentication credentials. 403 Forbidden means the server understood the request but refuses to authorize it — even if the user is authenticated, they don't have permission.
When should I use 301 vs 302?
Use 301 for permanent redirects (the old URL will never return). Use 302 for temporary redirects (the old URL will be available again). For SEO, 301 passes link equity to the new URL.
What does 418 I'm a Teapot mean?
It's an April Fools' joke from RFC 2324 (Hyper Text Coffee Pot Control Protocol). It has no practical use but is included in many implementations as an Easter egg.
What is the most common HTTP error code?
404 Not Found is the most commonly encountered error by users. For developers, 500 Internal Server Error is the most common server-side error.