HTTP Status Codes

Complete reference for HTTP status codes with detailed explanations and examples

Informational
1xx - Request received, continuing process
100

Continue

The server has received the request headers and the client should proceed to send the request body.

Examples:

  • Uploading large files in chunks

Notes:

  • Rarely used directly in modern web applications
RFC 7231
101

Switching Protocols

The server agrees to switch protocols as requested by the client.

Examples:

  • Upgrading from HTTP/1.1 to WebSocket

Notes:

  • Commonly used in WebSocket handshake
RFC 7231
Success
2xx - The action was successfully received, understood, and accepted
200

OK

The request has succeeded. The response payload depends on the request method.

Examples:

  • Successful GET request
  • API endpoint returning data

Notes:

  • Most common success status code
RFC 7231
201

Created

The request has succeeded and a new resource has been created as a result.

Examples:

  • POST request creating a new user
  • File upload completion

Notes:

  • Should include Location header with URL of new resource
RFC 7231
204

No Content

The server successfully processed the request but is not returning any content.

Examples:

  • DELETE operation completion
  • PUT request with no response needed

Notes:

  • Commonly used for DELETE operations
RFC 7231
Redirection
3xx - Further action needs to be taken to complete the request
301

Moved Permanently

The requested resource has been permanently moved to a new URL.

Examples:

  • Website migration
  • Domain change

Notes:

  • Search engines update their links
  • Maintains SEO value
RFC 7231
302

Found (Temporary Redirect)

The requested resource temporarily resides under a different URL.

Examples:

  • Temporary maintenance page
  • A/B testing

Notes:

  • Not cached by browsers
  • Original URL should be used for future requests
RFC 7231
Client Error
4xx - The request contains bad syntax or cannot be fulfilled
400

Bad Request

The server cannot process the request due to client error (malformed syntax, invalid request message framing, or deceptive request routing).

Examples:

  • Invalid JSON format
  • Missing required fields

Notes:

  • Client should modify request before retrying
RFC 7231
401

Unauthorized

Authentication is required and has failed or has not been provided.

Examples:

  • Missing authentication token
  • Invalid credentials

Notes:

  • Should include WWW-Authenticate header
RFC 7235
403

Forbidden

The server understood the request but refuses to authorize it.

Examples:

  • Accessing admin area without permissions
  • IP-blocked requests

Notes:

  • Different from 401 - server knows client identity
RFC 7231
404

Not Found

The requested resource could not be found on the server.

Examples:

  • Broken links
  • Deleted content

Notes:

  • Most common error status code
RFC 7231
429

Too Many Requests

The user has sent too many requests in a given amount of time.

Examples:

  • Rate limiting
  • API throttling

Notes:

  • Should include Retry-After header
RFC 6585
Server Error
5xx - The server failed to fulfill a valid request
500

Internal Server Error

A generic error message when an unexpected condition was encountered.

Examples:

  • Unhandled exceptions
  • Database connection failures

Notes:

  • Should be avoided through proper error handling
RFC 7231
502

Bad Gateway

The server received an invalid response from the upstream server.

Examples:

  • Proxy server issues
  • Service mesh failures

Notes:

  • Common in microservice architectures
RFC 7231
503

Service Unavailable

The server is temporarily unable to handle the request due to being overloaded or down for maintenance.

Examples:

  • Server maintenance
  • Traffic overload

Notes:

  • Should include Retry-After header if known
RFC 7231
1C
OneClick Utils

Professional IT tools for developers, system administrators, and IT professionals.

© 2025 OneClick Utils. All rights reserved.