HTTP Status Codes Reference

Comprehensive documentation for all HTTP status codes with practical examples

1xx Informational4 codes

Use interim responses to acknowledge progress before the final response is ready, especially for protocol negotiation or long-running request handling.

100

Continue

Use 100 as an interim response when a client asked whether it should continue sending the request body.

101

Switching Protocols

Use 101 when the client requested a protocol upgrade and the server is switching this connection to that protocol.

102

Processing

Use 102 as an interim WebDAV response when processing is underway and the final status is not ready yet.

103

Early Hints

Use 103 when you can safely send helpful headers, especially Link hints, before the final response is ready.

2xx Success10 codes

Use success responses when the server accepted, completed, or can clearly confirm the request outcome and any resulting state.

200

OK

Use 200 when the request completed successfully and the response body represents the result.

201

Created

Use 201 when the request succeeded and created a new resource.

202

Accepted

Use 202 when the request is accepted but the real work will finish later, if it finishes at all.

203

Non-Authoritative Information

Use 203 mainly from a transforming proxy when the origin's successful response was modified before delivery.

204

No Content

Use 204 when the request succeeded and the client does not need a response body.

205

Reset Content

Use 205 when the request succeeded and the user agent should reset the document view that submitted it.

206

Partial Content

Use 206 when a valid Range request asks for one or more portions of a representation.

207

Multi-Status

Use 207 mainly in WebDAV when one request needs to report separate statuses for multiple resources or properties.

208

Already Reported

Use 208 inside WebDAV multi-status results when a bound resource was already reported earlier in the same response.

226

IM Used

Use 226 when the response body is not the full current representation, but the result of an agreed instance manipulation such as delta encoding.

3xx Redirection9 codes

Use redirection responses when the server needs the client to fetch somewhere else, reuse a cached result, or follow another request step.

300

Multiple Choices

Use 300 when more than one representation or target is valid and the client should pick the preferred one.

301

Moved Permanently

Use 301 for permanent redirects when moving the resource for good and method preservation is not the main concern.

302

Found

Use 302 for temporary redirects when you are comfortable with traditional redirect behavior and the original URI should remain the one clients keep using.

303

See Other

Use 303 when the original request succeeded or was accepted, but the client should retrieve a different resource next with GET or HEAD.

304

Not Modified

Use 304 for conditional GET or HEAD requests when the client's cached representation is still current.

305

Use Proxy

Do not emit 305 in modern systems; keep it as historical reference material only.

306

Unused

Do not emit 306; it is reserved and has no defined modern behavior.

307

Temporary Redirect

Use 307 when the redirect is temporary and the follow-up request must keep the same method and body.

308

Permanent Redirect

Use 308 for permanent redirects when the redirected request must preserve the original method and body.

4xx Client Error29 codes

Use client-error responses when the request is invalid, unauthorized, conflicts with resource rules, or needs the caller to change something.

400

Bad Request

Use 400 when the request is malformed or framed in a way the server will not process.

401

Unauthorized

Use 401 when authentication is missing, invalid, or expired and the client can authenticate.

402

Payment Required

Treat 402 as a nonstandard, reserved status that some products use for billing or subscription gates.

403

Forbidden

Use 403 when the request is understood but the client is not allowed to perform it, even with current authentication.

404

Not Found

Use 404 when the server cannot find the target resource and is not making a stronger permanence claim.

405

Method Not Allowed

Use 405 when the server knows the method but this specific resource does not support it.

406

Not Acceptable

Use 406 when the client's proactive negotiation constraints leave no representation you are willing to serve.

407

Proxy Authentication Required

Use 407 when a proxy requires authentication before it will forward the request.

408

Request Timeout

Use 408 when the server times out waiting for the client to send a complete request.

409

Conflict

Use 409 when the request is valid but conflicts with the current resource or system state.

410

Gone

Use 410 when the resource used to exist and the server knows it has been removed permanently.

411

Length Required

Use 411 when the server refuses to accept the request without a defined Content-Length.

412

Precondition Failed

Use 412 when the client supplied a conditional header and that precondition evaluated to false.

413

Content Too Large

Use 413 when the request content is larger than the limits the server is willing or able to process.

414

URI Too Long

Use 414 when the request target URI is longer than the server is willing to interpret.

415

Unsupported Media Type

Use 415 when the request content type or content coding is not supported for this resource or method.

416

Range Not Satisfiable

Use 416 when a supported Range request is syntactically valid but unsatisfiable for the selected representation.

417

Expectation Failed

Use 417 when the expectation in the Expect header cannot be met.

418

I'm a teapot

Treat 418 as an educational or playful status, not a production API contract.

421

Misdirected Request

Use 421 when the request reached a server that cannot produce a response for that scheme-and-authority combination.

422

Unprocessable Content

Use 422 when the request is well-formed and understood, but its instructions or values are semantically invalid.

423

Locked

Use 423 in WebDAV-style locking systems when the resource is currently locked and the request cannot proceed.

424

Failed Dependency

Use 424 in WebDAV-style multi-step operations when this action failed only because a dependent action failed first.

425

Too Early

Use 425 when the server will not risk processing a replayable request sent in TLS early data.

426

Upgrade Required

Use 426 when the server refuses the current protocol but is willing to continue after the client upgrades.

428

Precondition Required

Use 428 when the server requires the request to be conditional, usually to prevent lost updates.

429

Too Many Requests

Use 429 when a requester exceeds a rate limit or quota that applies to that client.

431

Request Header Fields Too Large

Use 431 when one header field or the total request header section is too large to process.

451

Unavailable For Legal Reasons

Use 451 when a legal demand prevents the resource from being provided.

5xx Server Error11 codes

Use server-error responses when the request may be valid but the server or an upstream dependency could not complete it safely.

500

Internal Server Error

Use 500 when an unexpected server-side fault prevents the request from being fulfilled and no more specific 5xx status applies.

501

Not Implemented

Use 501 when the server does not support the request method or required functionality anywhere on the server.

502

Bad Gateway

Use 502 when acting as a gateway or proxy and the upstream server sends an invalid or unusable response.

503

Service Unavailable

Use 503 when the service is temporarily unable to handle requests because of overload, maintenance, or another short-lived capacity issue.

504

Gateway Timeout

Use 504 when acting as a gateway or proxy and the upstream server did not respond before your timeout expired.

505

HTTP Version Not Supported

Use 505 when the request's HTTP major version is unsupported or intentionally refused by the server.

506

Variant Also Negotiates

Use 506 for a transparent content negotiation misconfiguration where the selected variant is itself negotiable and causes a loop or invalid resolution path.

507

Insufficient Storage

Use 507 when the server cannot store the representation needed to complete the request because storage-related resources are exhausted.

508

Loop Detected

Use 508 when a WebDAV operation fails because the server detected an infinite loop while traversing resources.

510

Not Extended

Use 510 when the request depends on a mandatory HTTP extension or extension declaration that the server cannot satisfy.

511

Network Authentication Required

Use 511 only for captive-portal or network-access control flows where an intercepting proxy requires network authentication before wider access is allowed.