HTTP Status Code Reference

Complete reference for all HTTP status codes with descriptions, use cases, and examples. Searchable.

Free Always No Account Needed 100% Client-Side
100

Continue

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

Use when: Used in Expect: 100-continue header flow.

1xx
101

Switching Protocols

The server is switching protocols as requested by the client.

Use when: Used when upgrading to WebSocket (Upgrade: websocket header).

1xx
200

OK

The request succeeded. The response body contains the requested resource.

Use when: Standard success response for GET, PUT, PATCH requests.

2xx
201

Created

The request succeeded and a new resource was created.

Use when: Use for successful POST requests that create a resource. Include Location header.

2xx
202

Accepted

The request has been accepted for processing, but processing is not complete.

Use when: Use for async operations — job queued but not yet finished.

2xx
204

No Content

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

Use when: Use for successful DELETE requests and PUT/PATCH with no response body.

2xx
206

Partial Content

The server is delivering only part of the resource due to a Range header.

Use when: Used in video streaming and resumable file downloads.

2xx
301

Moved Permanently

The resource has been permanently moved to a new URL.

Use when: Use for permanent URL changes. Browsers and search engines update their links.

3xx
302

Found (Temporary Redirect)

The resource is temporarily at a different URL.

Use when: Use for temporary redirects. Do NOT use for permanent moves (use 301).

3xx
304

Not Modified

The cached version of the resource is still valid.

Use when: Returned when If-None-Match/If-Modified-Since headers match. Saves bandwidth.

3xx
307

Temporary Redirect

Same as 302 but explicitly preserves the HTTP method.

Use when: Use instead of 302 when you need to keep POST method on redirect.

3xx
308

Permanent Redirect

Same as 301 but explicitly preserves the HTTP method.

Use when: Use instead of 301 when you need to keep POST method on permanent redirect.

3xx
400

Bad Request

The server cannot process the request due to malformed syntax.

Use when: Malformed JSON, missing required fields, invalid parameter types.

4xx
401

Unauthorized

Authentication is required and has failed or not been provided.

Use when: No token, expired token, or invalid credentials. Return WWW-Authenticate header.

4xx
403

Forbidden

The server understood the request but refuses to authorize it.

Use when: Authenticated but lacks permission. Unlike 401, re-authenticating won't help.

4xx
404

Not Found

The requested resource could not be found.

Use when: Resource doesn't exist. Also used to hide 403s for security (don't reveal existence).

4xx
405

Method Not Allowed

The HTTP method is not allowed for this resource.

Use when: GET-only endpoint received a POST. Include Allow header with valid methods.

4xx
408

Request Timeout

The server timed out waiting for the request.

Use when: Client took too long to send the full request. Server may close connection.

4xx
409

Conflict

The request conflicts with the current state of the resource.

Use when: Duplicate username, version conflict in optimistic locking, resource state mismatch.

4xx
410

Gone

The resource is no longer available and will not return.

Use when: Permanently deleted resources. More definitive than 404.

4xx
422

Unprocessable Entity

The request is well-formed but cannot be processed due to semantic errors.

Use when: Validation errors (email format wrong, value out of range). Common in REST APIs.

4xx
429

Too Many Requests

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

Use when: Rate limiting. Include Retry-After header to tell client when to retry.

4xx
500

Internal Server Error

The server encountered an unexpected condition that prevented it from fulfilling the request.

Use when: Unhandled exceptions, database errors. Log the error but don't expose details to client.

5xx
501

Not Implemented

The server does not support the functionality required to fulfill the request.

Use when: HTTP method not implemented. Different from 405 (method exists but not for this resource).

5xx
502

Bad Gateway

The server, acting as a gateway, received an invalid response from an upstream server.

Use when: Nginx/proxy can't reach your app server. Common during deployments.

5xx
503

Service Unavailable

The server is currently unavailable (overloaded or down for maintenance).

Use when: Planned downtime or overload. Include Retry-After header.

5xx
504

Gateway Timeout

The server, acting as a gateway, did not receive a timely response from an upstream server.

Use when: Upstream service is too slow. Common with slow database queries or external API calls.

5xx

About this tool

HTTP status codes are 3-digit numbers returned by servers to indicate the result of a client's request. Understanding them is fundamental to web development, API design, and debugging.

This reference covers all status codes defined in RFC 9110 and common extensions:

1xx — Informational (100 Continue, 101 Switching Protocols) 2xx — Success (200 OK, 201 Created, 204 No Content...) 3xx — Redirection (301 Moved Permanently, 302 Found, 304 Not Modified...) 4xx — Client Error (400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 429 Too Many Requests...) 5xx — Server Error (500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable...)

Each entry includes: official description, when to use it, common causes, and how clients should respond.

Includes Cloudflare-specific codes (520, 521, 524) and WebDAV extensions (207, 422, 423).

Frequently Asked Questions

What is the difference between 401 and 403?
401 Unauthorized means 'not authenticated' (you haven't proved who you are). 403 Forbidden means 'not authorized' (we know who you are, but you don't have permission).
What is the difference between 301 and 302?
301 is a permanent redirect (the resource has moved forever — update your bookmarks). 302 is temporary (the resource may move back — don't update bookmarks).
When should I use 422 vs 400?
400 Bad Request is for malformed syntax. 422 Unprocessable Entity means the syntax is valid but the semantic content fails validation (e.g., email format is wrong).
What does 'idempotent' mean in HTTP?
An idempotent request produces the same result whether made once or many times. GET, PUT, DELETE are idempotent. POST is not.

Related Tools