HTTP Status Codes Cheatsheet

Common HTTP status codes and their meanings

← Back to Cheatsheets

Informational Responses (100-199)

1xx Informational 100-199
100
Continue
The server has received the request headers and the client should proceed to send the request body.
Used in HTTP/1.1 to resume or continue requests with large bodies.
101
Switching Protocols
The requester has asked the server to switch protocols and the server has agreed to do so.
Commonly used for WebSocket upgrades.
102
Processing (WebDAV)
The server has received and is processing the request, but no response is available yet.
Used to prevent timeouts in WebDAV requests that take time.

Successful Responses (200-299)

2xx Success 200-299
200
OK
The request has succeeded. The meaning of the success depends on the HTTP method.
Standard response for successful GET, POST, PUT, PATCH, or DELETE requests.
201
Created
The request has been fulfilled, resulting in the creation of a new resource.
Standard response for successful POST requests that create resources.
202
Accepted
The request has been accepted for processing, but the processing has not been completed.
Used for asynchronous processing where the result is not immediately available.
204
No Content
The server successfully processed the request and is not returning any content.
Commonly returned by DELETE requests or API endpoints that don't need to return data.
206
Partial Content
The server is delivering only part of the resource due to a range header sent by the client.
Used for resumeable downloads or streaming content.

Redirection Messages (300-399)

3xx Redirection 300-399
301
Moved Permanently
The resource has been moved permanently to a new URI.
Used for permanent URL redirections. Browsers cache this redirect.
302
Found (Moved Temporarily)
The resource is temporarily under a different URI.
Used for temporary redirects. Browsers do not cache this redirect.
304
Not Modified
The resource has not been modified since the version specified by the request headers.
Used for caching. Client can use cached version of resource.
307
Temporary Redirect
The target resource resides temporarily under a different URI.
Similar to 302 but requires the same HTTP method to be used.
308
Permanent Redirect
The target resource has been assigned a new permanent URI.
Similar to 301 but requires the same HTTP method to be used.

Client Error Responses (400-499)

4xx Client Errors 400-499
400
Bad Request
The server cannot or will not process the request due to something that is perceived to be a client error.
Generic client error response for malformed requests.
401
Unauthorized
The client must authenticate itself to get the requested response.
Returned when authentication is required but has failed or not been provided.
403
Forbidden
The client does not have access rights to the content.
Returned when user is authenticated but doesn't have permission to access the resource.
404
Not Found
The server cannot find the requested resource.
Most common error when a resource doesn't exist at the requested URI.
405
Method Not Allowed
The request method is known by the server but is not supported by the target resource.
Returned when trying to use POST on a read-only resource, for example.
409
Conflict
The request conflicts with the current state of the server.
Commonly returned when trying to create a resource that already exists.
410
Gone
The resource requested is no longer available and will not be available again.
Used when a resource has been permanently deleted.
422
Unprocessable Entity
The request was well-formed but was unable to be followed due to semantic errors.
Commonly returned by APIs when validation fails.
429
Too Many Requests
The user has sent too many requests in a given amount of time.
Used for rate limiting to prevent abuse.

Server Error Responses (500-599)

5xx Server Errors 500-599
500
Internal Server Error
The server has encountered a situation it doesn't know how to handle.
Generic server error response when no more specific message is appropriate.
501
Not Implemented
The request method is not supported by the server and cannot be handled.
Returned when the server doesn't recognize the request method.
502
Bad Gateway
The server, while acting as a gateway or proxy, received an invalid response from the upstream server.
Common in microservice architectures when a downstream service fails.
503
Service Unavailable
The server is not ready to handle the request, often due to maintenance or overload.
Used during maintenance windows or when server is temporarily overloaded.
504
Gateway Timeout
The server, while acting as a gateway or proxy, did not get a response in time from the upstream server.
Returned when a gateway times out waiting for a response from another server.
505
HTTP Version Not Supported
The HTTP version used in the request is not supported by the server.
Rarely used. Returned when server doesn't support the HTTP version in the request.