httpStatus.title

httpStatus.subtitle

Showing 58 of 58 status codes
100

Continue

Informational

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

Common Use Case:

Used in chunked transfer encoding

101

Switching Protocols

Informational

The requester has asked the server to switch protocols and the server has agreed to do so.

Common Use Case:

WebSocket upgrade from HTTP

102

Processing

Informational

The server has received and is processing the request, but no response is available yet.

Common Use Case:

WebDAV operations

103

Early Hints

Informational

Used to return some response headers before final HTTP message.

Common Use Case:

Preload resources while server prepares response

200

OK

Success

The request has succeeded. The meaning of success depends on the HTTP method used.

Common Use Case:

Standard response for successful HTTP requests

201

Created

Success

The request has been fulfilled and resulted in a new resource being created.

Common Use Case:

POST request successfully created a resource

202

Accepted

Success

The request has been accepted for processing, but the processing has not been completed.

Common Use Case:

Asynchronous processing, batch operations

203

Non-Authoritative Information

Success

The server is a transforming proxy that received a 200 OK from its origin, but is returning a modified version.

Common Use Case:

Proxy or cache modified the response

204

No Content

Success

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

Common Use Case:

DELETE request succeeded, no response body needed

205

Reset Content

Success

The server successfully processed the request, but is not returning any content and requires the requester to reset the document view.

Common Use Case:

Form submission, clear form after success

206

Partial Content

Success

The server is delivering only part of the resource due to a range header sent by the client.

Common Use Case:

Video streaming, resumable downloads

300

Multiple Choices

Redirection

Indicates multiple options for the resource from which the client may choose.

Common Use Case:

Multiple file formats available

301

Moved Permanently

Redirection

This and all future requests should be directed to the given URI.

Common Use Case:

Permanent URL change, SEO redirect

302

Found

Redirection

The resource is temporarily under a different URI.

Common Use Case:

Temporary redirect, URL shorteners

303

See Other

Redirection

The response to the request can be found under another URI using a GET method.

Common Use Case:

Redirect after POST to prevent duplicate submissions

304

Not Modified

Redirection

Indicates that the resource has not been modified since the version specified by the request headers.

Common Use Case:

Browser caching, conditional requests

307

Temporary Redirect

Redirection

The request should be repeated with another URI but future requests should still use the original URI.

Common Use Case:

Temporary redirect preserving request method

308

Permanent Redirect

Redirection

The request and all future requests should be repeated using another URI.

Common Use Case:

Permanent redirect preserving request method

400

Bad Request

Client Error

The server cannot or will not process the request due to an apparent client error.

Common Use Case:

Invalid JSON, malformed request syntax

401

Unauthorized

Client Error

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

Common Use Case:

Missing or invalid authentication token

402

Payment Required

Client Error

Reserved for future use. Originally intended for digital payment systems.

Common Use Case:

Payment required for API access

403

Forbidden

Client Error

The request was valid, but the server is refusing action. The user might not have the necessary permissions.

Common Use Case:

Insufficient permissions, IP blocked

404

Not Found

Client Error

The requested resource could not be found but may be available in the future.

Common Use Case:

Page doesn't exist, broken link

405

Method Not Allowed

Client Error

A request method is not supported for the requested resource.

Common Use Case:

POST to read-only endpoint

406

Not Acceptable

Client Error

The requested resource is capable of generating only content not acceptable according to the Accept headers.

Common Use Case:

Client requested unsupported format

407

Proxy Authentication Required

Client Error

The client must first authenticate itself with the proxy.

Common Use Case:

Corporate proxy requires authentication

408

Request Timeout

Client Error

The server timed out waiting for the request.

Common Use Case:

Client took too long to send request

409

Conflict

Client Error

Indicates that the request could not be processed because of conflict in the current state of the resource.

Common Use Case:

Version conflict, duplicate entry

410

Gone

Client Error

Indicates that the resource requested is no longer available and will not be available again.

Common Use Case:

Permanently deleted resource

411

Length Required

Client Error

The request did not specify the length of its content, which is required by the requested resource.

Common Use Case:

Missing Content-Length header

412

Precondition Failed

Client Error

The server does not meet one of the preconditions that the requester put on the request.

Common Use Case:

If-Match header condition failed

413

Payload Too Large

Client Error

The request is larger than the server is willing or able to process.

Common Use Case:

File upload exceeds size limit

414

URI Too Long

Client Error

The URI provided was too long for the server to process.

Common Use Case:

URL exceeds maximum length

415

Unsupported Media Type

Client Error

The request entity has a media type which the server or resource does not support.

Common Use Case:

Wrong Content-Type header

416

Range Not Satisfiable

Client Error

The client has asked for a portion of the file, but the server cannot supply that portion.

Common Use Case:

Invalid byte range in Range header

417

Expectation Failed

Client Error

The server cannot meet the requirements of the Expect request-header field.

Common Use Case:

Expect: 100-continue not supported

418

I'm a teapot

Client Error

This code was defined in 1998 as an April Fools' joke and is not expected to be implemented by actual HTTP servers.

Common Use Case:

Easter egg, not for production use

421

Misdirected Request

Client Error

The request was directed at a server that is not able to produce a response.

Common Use Case:

HTTP/2 server cannot respond

422

Unprocessable Entity

Client Error

The request was well-formed but was unable to be followed due to semantic errors.

Common Use Case:

Validation errors in request body

423

Locked

Client Error

The resource that is being accessed is locked.

Common Use Case:

WebDAV locked resource

424

Failed Dependency

Client Error

The request failed because it depended on another request and that request failed.

Common Use Case:

WebDAV dependency failed

425

Too Early

Client Error

Indicates that the server is unwilling to risk processing a request that might be replayed.

Common Use Case:

Prevent replay attacks

426

Upgrade Required

Client Error

The client should switch to a different protocol.

Common Use Case:

Force upgrade to TLS

428

Precondition Required

Client Error

The origin server requires the request to be conditional.

Common Use Case:

Prevent lost update problem

429

Too Many Requests

Client Error

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

Common Use Case:

Rate limiting, API throttling

431

Request Header Fields Too Large

Client Error

The server is unwilling to process the request because either an individual header field, or all the header fields collectively, are too large.

Common Use Case:

Headers exceed size limit

451

Unavailable For Legal Reasons

Client Error

A server operator has received a legal demand to deny access to a resource or to a set of resources.

Common Use Case:

Content blocked by government

500

Internal Server Error

Server Error

A generic error message when the server encounters an unexpected condition.

Common Use Case:

Unhandled exception, server crash

501

Not Implemented

Server Error

The server either does not recognize the request method, or it lacks the ability to fulfill the request.

Common Use Case:

Unsupported HTTP method

502

Bad Gateway

Server Error

The server was acting as a gateway or proxy and received an invalid response from the upstream server.

Common Use Case:

Upstream server error, proxy issue

503

Service Unavailable

Server Error

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

Common Use Case:

Maintenance mode, server overload

504

Gateway Timeout

Server Error

The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.

Common Use Case:

Upstream server timeout

505

HTTP Version Not Supported

Server Error

The server does not support the HTTP protocol version used in the request.

Common Use Case:

Unsupported HTTP version

506

Variant Also Negotiates

Server Error

Transparent content negotiation for the request results in a circular reference.

Common Use Case:

Server configuration error

507

Insufficient Storage

Server Error

The server is unable to store the representation needed to complete the request.

Common Use Case:

WebDAV server out of space

508

Loop Detected

Server Error

The server detected an infinite loop while processing the request.

Common Use Case:

WebDAV infinite loop

510

Not Extended

Server Error

Further extensions to the request are required for the server to fulfill it.

Common Use Case:

Extension required

511

Network Authentication Required

Server Error

The client needs to authenticate to gain network access.

Common Use Case:

Captive portal, WiFi login

About HTTP Status Codes

HTTP status codes are three-digit numbers returned by a server in response to a client's request. They indicate whether a specific HTTP request has been successfully completed and provide information about the nature of the response.

Status Code Categories

1xx - Informational:

The request was received and the process is continuing. These are provisional responses.

2xx - Success:

The request was successfully received, understood, and accepted by the server.

3xx - Redirection:

Further action needs to be taken to complete the request, usually a redirect.

4xx - Client Error:

The request contains bad syntax or cannot be fulfilled by the server. The error is on the client side.

5xx - Server Error:

The server failed to fulfill a valid request. The error is on the server side.

Most Common Status Codes

  • 200 OK: Standard successful response
  • 201 Created: Resource successfully created
  • 204 No Content: Success with no response body
  • 301 Moved Permanently: Permanent redirect
  • 302 Found: Temporary redirect
  • 400 Bad Request: Invalid request syntax
  • 401 Unauthorized: Authentication required
  • 403 Forbidden: Access denied
  • 404 Not Found: Resource doesn't exist
  • 429 Too Many Requests: Rate limit exceeded
  • 500 Internal Server Error: Server error
  • 502 Bad Gateway: Invalid upstream response
  • 503 Service Unavailable: Server temporarily unavailable

When to Use Each Status Code

REST API Design:

  • GET success: 200 OK
  • POST success: 201 Created
  • PUT/PATCH success: 200 OK or 204 No Content
  • DELETE success: 204 No Content or 200 OK
  • Validation error: 422 Unprocessable Entity
  • Not found: 404 Not Found
  • Unauthorized: 401 Unauthorized
  • Forbidden: 403 Forbidden

Best Practices

  • Use appropriate status codes for different scenarios
  • Don't return 200 OK for errors
  • Use 201 Created when creating resources
  • Use 204 No Content when there's no response body
  • Use 404 Not Found for missing resources
  • Use 422 for validation errors, not 400
  • Use 429 for rate limiting
  • Include error details in response body
  • Be consistent across your API

Debugging Tips

  • Check browser DevTools Network tab for status codes
  • Use curl or Postman to test API endpoints
  • Log status codes on both client and server
  • Set up monitoring for 4xx and 5xx errors
  • Return meaningful error messages with status codes
  • Use status codes to trigger retry logic

Frequently Asked Questions

What's the difference between 401 and 403?

401 means authentication is required or failed. 403 means the user is authenticated but doesn't have permission.

When should I use 400 vs 422?

Use 400 for malformed requests (invalid JSON). Use 422 for well-formed requests with semantic errors (validation failures).

What's the difference between 301 and 302?

301 is a permanent redirect (SEO-friendly). 302 is a temporary redirect.

Should I use 200 or 204 for DELETE?

Use 204 No Content if you're not returning a response body. Use 200 OK if you're returning confirmation data.

What does 418 I'm a teapot mean?

It's an April Fools' joke from 1998. Not meant for production use, but some APIs use it for fun.