Skip to main content
WorkUtilities

HTTP Status Codes Reference

Searchable quick-reference for HTTP 1xx–5xx codes with practical context, common causes, and what to do.

Last updated: June 2026

100

Continue

Informational

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

When you'll see this

Large file uploads or when the client wants to check if the server will accept a request before sending a large payload.

Common causes

  • Client sent Expect: 100-continue header
  • Upload pre-check before POST body

What to do

Send the request body if you receive 100 Continue. Most browsers handle this automatically.

101

Switching Protocols

Informational

The server is switching protocols as requested by the client.

When you'll see this

WebSocket handshake upgrades from HTTP to WebSocket protocol.

Common causes

  • WebSocket connection upgrade
  • Protocol negotiation

What to do

Expected during WebSocket setup β€” no action needed if upgrade succeeds.

200

OK

Success

The request succeeded.

When you'll see this

Successful GET, PUT, PATCH, or POST that returns data. The most common success response.

Common causes

  • Resource fetched successfully
  • Update applied
  • Action completed

What to do

Parse the response body. Check response.status === 200 before using data.

const res = await fetch('/api/users');
if (res.status === 200) { const data = await res.json(); }

201

Created

Success

A new resource was successfully created.

When you'll see this

POST requests that create a new record β€” REST APIs return 201 with a Location header pointing to the new resource.

Common causes

  • New user registered
  • New record inserted
  • Resource created via POST

What to do

Read the Location header for the new resource URL. Parse response body for the created object ID.

204

No Content

Success

The request succeeded but there is no response body.

When you'll see this

Successful DELETE requests or PUT/PATCH updates where no data needs to be returned.

Common causes

  • DELETE succeeded
  • Update with no return payload
  • Action completed silently

What to do

Do not call response.json() β€” there is no body. Treat as success if status is 204.

206

Partial Content

Success

The server is delivering only part of the resource due to a range request.

When you'll see this

Video streaming, resumable downloads, or byte-range requests on large files.

Common causes

  • Range header in request
  • Video player seeking
  • Chunked file download

What to do

Check Content-Range header. Combine chunks if building a full file client-side.

301

Moved Permanently

Redirect

The resource has permanently moved to a new URL.

When you'll see this

Old URLs redirected to new ones. Search engines transfer SEO authority to the new URL.

Common causes

  • Domain migration
  • URL structure change
  • HTTP to HTTPS redirect

What to do

Update your links to the new URL. Browsers cache 301 redirects β€” clear cache if testing.

302

Found

Redirect

The resource is temporarily at a different URL.

When you'll see this

Temporary redirects, login flows, or post-form redirects.

Common causes

  • Temporary maintenance redirect
  • Login redirect
  • Legacy redirect behavior

What to do

Follow the Location header. Do not cache β€” the redirect is temporary.

304

Not Modified

Redirect

The cached version is still valid β€” no body is sent.

When you'll see this

Conditional GET requests with If-None-Match or If-Modified-Since headers.

Common causes

  • Browser cache validation
  • ETag match
  • CDN cache hit

What to do

Use your cached copy. No network body to parse.

307

Temporary Redirect

Redirect

Temporary redirect that preserves the original HTTP method.

When you'll see this

API redirects where POST must stay POST (unlike 302 which may change to GET).

Common causes

  • Temporary URL change
  • Load balancer redirect
  • OAuth callback redirect

What to do

Re-send the request to the Location URL with the same HTTP method.

308

Permanent Redirect

Redirect

Permanent redirect that preserves the original HTTP method.

When you'll see this

Permanent API endpoint moves where method must be preserved (POST stays POST).

Common causes

  • API version migration
  • Permanent endpoint rename

What to do

Update client code to use the new URL permanently. Method is preserved.

400

Bad Request

Client Error

The server cannot process the request due to a client error.

When you'll see this

Malformed JSON, missing required headers, invalid query parameters, or syntax errors in the request.

Common causes

  • Invalid JSON body
  • Missing Content-Type
  • Malformed query string

What to do

Validate request format before sending. Read the error response body for specific field errors.

401

Unauthorized

Client Error

Authentication is required and has failed or not been provided.

When you'll see this

Missing or expired JWT/API token, not logged in, or invalid credentials.

Common causes

  • No Authorization header
  • Expired access token
  • Invalid API key

What to do

Check your auth token. Refresh the token or redirect to login. 401 = not authenticated.

// 401 = no valid token
if (res.status === 401) { redirectToLogin(); }

403

Forbidden

Client Error

The server understood the request but refuses to authorize it.

When you'll see this

Logged in but lacking permission β€” wrong role, insufficient privileges, or resource access denied.

Common causes

  • Wrong user role
  • Insufficient permissions
  • IP blocked or geo-restricted

What to do

Check user roles and permissions. 403 = authenticated but not authorized. Different from 401!

// 403 = authenticated but no permission
if (res.status === 403) { showAccessDenied(); }

404

Not Found

Client Error

The requested resource does not exist.

When you'll see this

Wrong URL, deleted resource, typo in API path, or route not registered on the server.

Common causes

  • Typo in URL
  • Resource deleted
  • Route not defined
  • Wrong API version

What to do

Verify the URL path and resource ID. Check if the resource was deleted or moved.

if (res.status === 404) { showNotFound(); }

405

Method Not Allowed

Client Error

The HTTP method is not supported for this endpoint.

When you'll see this

Sending POST to a GET-only endpoint, or using DELETE where only PATCH is allowed.

Common causes

  • Wrong HTTP method
  • API only supports GET
  • CORS preflight mismatch

What to do

Check the Allow header for supported methods. Use the correct HTTP verb.

408

Request Timeout

Client Error

The server timed out waiting for the request.

When you'll see this

Slow client sending a large body, or server closed idle connection.

Common causes

  • Slow upload
  • Idle connection timeout
  • Network interruption

What to do

Retry the request. For large uploads, use chunked transfer or resumable upload.

409

Conflict

Client Error

The request conflicts with the current state of the resource.

When you'll see this

Duplicate email on signup, version conflict on concurrent updates, or resource already exists.

Common causes

  • Duplicate unique field
  • Optimistic locking conflict
  • Concurrent edit

What to do

Read the conflict details. Refresh data and retry, or resolve the duplicate.

410

Gone

Client Error

The resource existed but has been permanently removed.

When you'll see this

Deliberately deleted content that should not return β€” stronger signal than 404 for SEO.

Common causes

  • Permanently deleted resource
  • Deprecated endpoint removed

What to do

Remove links to this resource. Unlike 404, 410 tells search engines to de-index.

413

Payload Too Large

Client Error

The request body exceeds the server's size limit.

When you'll see this

File uploads exceeding server limit, or POST body too large for API gateway.

Common causes

  • File too large
  • Request body exceeds nginx/client limit
  • API payload cap

What to do

Reduce payload size, compress data, or use chunked/multipart upload.

414

URI Too Long

Client Error

The request URL exceeds the server's length limit.

When you'll see this

Too many query parameters, or excessively long GET URLs.

Common causes

  • Long query string
  • Too many filter params
  • Encoded data in URL

What to do

Move data from query string to POST body. Shorten or paginate parameters.

415

Unsupported Media Type

Client Error

The request Content-Type is not supported by the server.

When you'll see this

Sending XML to a JSON-only API, or wrong Content-Type header on upload.

Common causes

  • Wrong Content-Type header
  • Server expects application/json
  • Unsupported file format

What to do

Set Content-Type to what the API expects (usually application/json).

422

Unprocessable Entity

Client Error

The request is well-formed but contains semantic errors.

When you'll see this

Validation errors β€” valid JSON but business rules fail (negative age, invalid email format accepted by syntax but rejected by rules).

Common causes

  • Field validation failed
  • Business rule violation
  • Invalid enum value

What to do

Read validation errors in response body. Fix field values and resubmit.

429

Too Many Requests

Client Error

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

When you'll see this

API rate limiting, brute-force protection, or quota exceeded on third-party APIs.

Common causes

  • Rate limit exceeded
  • Too many login attempts
  • API quota hit

What to do

Check Retry-After header. Implement exponential backoff: wait 1s, 2s, 4s, 8s before retrying.

if (res.status === 429) {
  const retryAfter = res.headers.get('Retry-After');
  await sleep(retryAfter ? Number(retryAfter) * 1000 : 1000);
}

500

Internal Server Error

Server Error

The server encountered an unexpected error.

When you'll see this

Unhandled exception in server code, database crash, or misconfiguration on the server side.

Common causes

  • Unhandled exception
  • Database connection failure
  • Null reference in API code

What to do

Retry once. If persistent, check server logs. This is a server bug β€” not your fault as a client.

502

Bad Gateway

Server Error

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

When you'll see this

Reverse proxy (nginx, Cloudflare) cannot reach the backend, or backend crashed mid-request.

Common causes

  • Backend server down
  • Proxy misconfiguration
  • Upstream timeout

What to do

Retry after a delay. Check if the API service is up. Often transient during deployments.

503

Service Unavailable

Server Error

The server is temporarily unable to handle the request.

When you'll see this

Server overloaded, maintenance mode, or deliberate traffic shedding.

Common causes

  • Server maintenance
  • Overload / traffic spike
  • Health check failing

What to do

Check Retry-After header. Implement retry with backoff. Show maintenance message to users.

504

Gateway Timeout

Server Error

The gateway did not receive a timely response from the upstream server.

When you'll see this

Backend took too long to respond β€” slow database query, long-running job, or network issue between proxy and app.

Common causes

  • Slow database query
  • Long API processing
  • Proxy timeout too short

What to do

Retry with backoff. Optimize slow endpoints. Consider async processing for long operations.

507

Insufficient Storage

Server Error

The server cannot store the representation needed to complete the request.

When you'll see this

WebDAV operations when disk is full, or storage quota exceeded on server.

Common causes

  • Disk full on server
  • Storage quota exceeded
  • WebDAV write failure

What to do

Contact server admin. Free up storage or increase quota.

30+ codes

1xx through 5xx covered

Searchable

Filter by code or keyword

Copy ready

Code snippets included

Help Us Improve

Your feedback helps us build better tools.

About HTTP Status Codes Reference

Our free HTTP Status Codes Reference covers 30+ standard codes from 1xx through 5xx with practical developer context.

Search by code number or keyword, filter by category, and see when you'll encounter each code, common causes, and what to do.

Includes code snippets for 200, 401, 403, 404, and 429. No signup required.

Read the full guide: HTTP status codes guide β€” all codes explained

When Should You Use the HTTP Status Codes Reference?

API debugging

Understand what 4xx and 5xx errors mean in your API responses.

401 vs 403

Clarify authentication vs authorization errors.

Redirect codes

Choose between 301, 302, 307, and 308.

Rate limiting

Handle 429 Too Many Requests with backoff.

Quick lookup

Searchable reference faster than reading MDN docs.

Frequently Asked Questions