HTTP Status Codes Cheat Sheet
HTTP status codes are server responses that indicate the outcome of a client request.
They are grouped into five categories based on their first digit.
1xx – Informational Responses
1xx status codes indicate that the request has been received and the server is continuing to process it. These responses are usually temporary and rarely exposed directly to end users.
100 Continue
Indicates that the server has received the request headers and the client may proceed with sending the request body.
HTTP/1.1 100 Continue
POST /upload HTTP/1.1
Expect: 100-continue
101 Switching Protocols
The server agrees to switch to a different protocol as requested by the client.
HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
2xx – Successful Responses
2xx status codes indicate that the request was successfully received, understood, and processed by the server.
200 OK
The request was successful and the server returned the requested resource.
HTTP/1.1 200 OK
GET /users HTTP/1.1
201 Created
The request was successful and resulted in the creation of a new resource.
HTTP/1.1 201 Created
POST /users HTTP/1.1
202 Accepted
The request was accepted for processing, but the processing has not been completed.
HTTP/1.1 202 Accepted
POST /jobs HTTP/1.1
204 No Content
The request was successful, but the server does not return any content.
HTTP/1.1 204 No Content
DELETE /users/10 HTTP/1.1
3xx – Redirection Responses
3xx status codes indicate that the client must take additional action to complete the request, usually by following a redirect.
301 Moved Permanently
The requested resource has been permanently moved to a new URL.
HTTP/1.1 301 Moved Permanently
Location: /new-url
GET /old-page HTTP/1.1
302 Found
The resource is temporarily available at a different URL.
HTTP/1.1 302 Found
GET /temporary HTTP/1.1
304 Not Modified
Indicates that the resource has not been modified since the last request.
HTTP/1.1 304 Not Modified
GET /style.css HTTP/1.1
If-None-Match: "etag"
4xx – Client Error Responses
4xx status codes indicate that the client made an invalid request or lacks proper authorization.
400 Bad Request
The server could not process the request due to invalid syntax or malformed data.
HTTP/1.1 400 Bad Request
POST /users HTTP/1.1
{ invalid_json }
401 Unauthorized
Authentication is required and has failed or has not been provided.
HTTP/1.1 401 Unauthorized
GET /profile HTTP/1.1
403 Forbidden
The server understands the request but refuses to authorize it.
HTTP/1.1 403 Forbidden
DELETE /admin HTTP/1.1
404 Not Found
The server cannot find the requested resource.
HTTP/1.1 404 Not Found
GET /unknown-page HTTP/1.1
409 Conflict
The request conflicts with the current state of the resource.
HTTP/1.1 409 Conflict
POST /users HTTP/1.1
429 Too Many Requests
The client has sent too many requests in a given amount of time.
HTTP/1.1 429 Too Many Requests
GET /api/data HTTP/1.1
5xx – Server Error Responses
5xx status codes indicate that the server failed to process a valid request.
500 Internal Server Error
A generic server error occurred.
HTTP/1.1 500 Internal Server Error
GET /api/users HTTP/1.1
502 Bad Gateway
The server received an invalid response from an upstream server.
HTTP/1.1 502 Bad Gateway
GET /service HTTP/1.1
503 Service Unavailable
The server is currently unable to handle the request.
HTTP/1.1 503 Service Unavailable
GET /api HTTP/1.1
504 Gateway Timeout
The server did not receive a timely response from an upstream server.
HTTP/1.1 504 Gateway Timeout
GET /proxy HTTP/1.1