HTTP Status Codes Cheatsheet

This cheatsheet provides a comprehensive and practical reference for HTTP status codes. It covers informational, success, redirection, client error, server error, and command combos. Use it to quickly look up the meaning and usage of any HTTP status code.

Informational (1xx)

100 Continue
The server has received the request headers and the client should proceed to send the request body.
101 Switching Protocols
The requester has asked the server to switch protocols.
102 Processing
WebDAV; the server has received and is processing the request.

Success (2xx)

200 OK
The request has succeeded.
201 Created
The request has been fulfilled and resulted in a new resource being created.
202 Accepted
The request has been accepted for processing, but the processing has not been completed.
204 No Content
The server successfully processed the request, but is not returning any content.
206 Partial Content
The server is delivering only part of the resource due to a range header sent by the client.

Redirection (3xx)

301 Moved Permanently
The resource has been moved to a new URL permanently.
302 Found
The resource resides temporarily under a different URL.
304 Not Modified
The resource has not been modified since the last request.
307 Temporary Redirect
The resource resides temporarily under a different URL, but the client should use the original method.
308 Permanent Redirect
The resource has been permanently moved to a new URL.

Client Error (4xx)

400 Bad Request
The server could not understand the request due to invalid syntax.
401 Unauthorized
Authentication is required and has failed or has not yet been provided.
403 Forbidden
The client does not have access rights to the content.
404 Not Found
The server can not find the requested resource.
405 Method Not Allowed
The request method is known by the server but is not supported by the target resource.
408 Request Timeout
The server timed out waiting for the request.
409 Conflict
The request could not be completed due to a conflict with the current state of the resource.
410 Gone
The resource requested is no longer available and will not be available again.
418 I'm a teapot
This code was defined in 1998 as an April Fools' joke.
429 Too Many Requests
The user has sent too many requests in a given amount of time.

Server Error (5xx)

500 Internal Server Error
The server has encountered a situation it doesn't know how to handle.
501 Not Implemented
The request method is not supported by the server and cannot be handled.
502 Bad Gateway
The server was acting as a gateway or proxy and received an invalid response from the upstream server.
503 Service Unavailable
The server is not ready to handle the request.
504 Gateway Timeout
The server is acting as a gateway and cannot get a response in time.
505 HTTP Version Not Supported
The HTTP version used in the request is not supported by the server.

Command Combos

curl -I https://example.com Show HTTP response headers including status code.
http --print=h https://example.com Use HTTPie to print response headers.
fetch('https://example.com').then(r => r.status) Get status code in JavaScript (browser).

Categories

  • Informational (1xx)

    Request received, continuing process.

  • Success (2xx)

    The request was successfully received, understood, and accepted.

  • Redirection (3xx)

    Further action needs to be taken in order to complete the request.

  • Client Error (4xx)

    The request contains bad syntax or cannot be fulfilled.

  • Server Error (5xx)

    The server failed to fulfill an apparently valid request.

  • Command Combos

    Practical command-line and code examples for working with HTTP status codes.

Features

  • Quick search functionality
  • Organized by categories
  • Clear code descriptions
  • Common and advanced use cases covered
  • Easy to copy codes
  • Responsive design
  • Perfect for quick reference