HTTP Status Code Reference.

Interactive guide to HTTP status codes with real-world examples and best practices

HTTP Status Codes

1xx Informational

2xx Success

3xx Redirection

4xx Client Error

5xx Server Error

Select a Status Code

Choose a status code from the list to view detailed information and examples.

Use cases

Real-world uses.

API Developers
Implement standard-compliant API responses with appropriate status codes for better client interaction and error handling.
Backend Engineers
Build robust error handling and response mechanisms that follow HTTP protocol best practices.
Frontend Developers
Debug API interactions and implement client-side logic to handle different status codes appropriately.
DevOps Professionals
Troubleshoot server issues and configure proper error responses in reverse proxies and load balancers.
Quality Assurance Testers
Verify proper API behavior by confirming that endpoints return appropriate status codes for various scenarios.
Technical Documentation Writers
Create accurate API documentation that clearly explains the status codes your service uses and how clients should interpret them.

How it works

Five steps.

  1. 01

    Browse HTTP status codes by category (1xx, 2xx, 3xx, 4xx, 5xx) or search for a specific code.

  2. 02

    Select a status code to view detailed information, descriptions, and real-world examples.

  3. 03

    Copy code snippets showing request and response patterns for the selected status code.

  4. 04

    Review best practices and common use cases for each status code.

  5. 05

    Consult the reference tab for specification links and common headers.

Features

Key Features.

Everything you need to understand and implement HTTP status codes correctly
  • Comprehensive Reference

    Access detailed information on all HTTP status codes from 1xx to 5xx in one place.

  • Real-World Examples

    See practical code examples showing how each status code is used in client-server communication.

  • Troubleshooting Guide

    Diagnose common HTTP errors and understand how to properly handle error responses.

  • API Design Best Practices

    Learn how to select the most appropriate status codes for your API responses.

  • Interactive Interface

    Filter, search, and explore HTTP status codes with an intuitive and responsive interface.

  • Copy-Ready Snippets

    Copy code examples directly to your clipboard for immediate use in your projects.

FAQ

Questions.

Can't find an answer? Send us your question.

What are HTTP status codes?

HTTP status codes are standardized three-digit numbers returned by a web server in response to a client's request. They indicate the outcome of the request and help clients understand how to interpret the server's response.

What's the difference between 4xx and 5xx error codes?

4xx status codes indicate client errors—problems with the request itself (like 404 Not Found or 400 Bad Request). 5xx status codes indicate server errors—problems on the server side (like 500 Internal Server Error or 503 Service Unavailable).

When should I use a 201 instead of a 200 response?

Use 201 Created when a request successfully results in the creation of a new resource. Use 200 OK for successful requests that don't create new resources or when you want to include the created resource in the response body.

What's the difference between 401 and 403 status codes?

401 Unauthorized means the client hasn't provided valid authentication credentials. 403 Forbidden means the client is authenticated but doesn't have permission to access the requested resource.

Should I use 204 or 200 for successful DELETE requests?

For DELETE requests, 204 No Content is generally preferred if you don't need to return any content. Use 200 OK if you want to return information about the deletion in the response body.

What's the purpose of 3xx redirect status codes?

3xx redirect status codes indicate that the client needs to perform a further action to complete the request. They're commonly used for URL redirects, caching directives, or indicating that a resource has moved.

What does the 429 Too Many Requests status code mean?

429 Too Many Requests indicates that the user has sent too many requests in a given amount of time (rate limiting). It's used to protect APIs and services from abuse or overload.

When should I use 502 Bad Gateway vs. 504 Gateway Timeout?

Use 502 Bad Gateway when your server (acting as a gateway/proxy) receives an invalid response from an upstream server. Use 504 Gateway Timeout when your server doesn't receive a response from the upstream server within the allowed time limit.

What HTTP status code should I use for validation errors?

For validation errors, 400 Bad Request is typically appropriate. For more specific validation issues, you can also consider 422 Unprocessable Entity, which is specifically for semantically invalid requests.

Are HTTP status codes case-sensitive?

The numeric codes themselves are just numbers, but the reason phrases (like 'Not Found' in 404 Not Found) are case-sensitive according to the HTTP specification, though many implementations treat them case-insensitively in practice.

Related tools

More SEO & Analytics tools.