Start free · Free tools · Fair usage limits
Browse Tools

Categories

Custom AI Solutions – AI2Flows
LIVE NEWS
Loading latest AI & SEO news…
Home›Tools›HTTP Status Codes Reference›HTTP 413 Content Too Large
4xx Client Error

HTTP 413 Content Too Large

HTTP 413 Content Too Large (formerly Payload Too Large or Request Entity Too Large) means the request body is bigger than the server is willing to accept.

Quick answer

HTTP 413 Content Too Large (formerly Payload Too Large or Request Entity Too Large) means the request body is bigger than the server is willing to accept. It most often appears on file uploads that exceed a limit set in Nginx, a framework, a CDN or a serverless platform.

Last updated · Maintained by FreeAIToolz · How we test

What does HTTP 413 Content Too Large mean?

Limits exist at several layers, and the smallest one wins. Nginx defaults client_max_body_size to 1 MB, PHP uses upload_max_filesize and post_max_size, and serverless platforms such as Vercel and AWS Lambda cap request bodies at a few megabytes.

Status code413
NameContent Too Large (formerly Payload Too Large / Request Entity Too Large)
Class4xx Client Error
Defined inRFC 9110 §15.5.14
Cacheable by defaultNo, unless Cache-Control says so
Safe to retry automatically?No: change the request first
Related headersRetry-After (if temporary)

What causes HTTP 413?

  • Upload larger than the web server limit (Nginx default 1 MB).
  • Framework or language limits (PHP post_max_size, Express body-parser limit).
  • Serverless or CDN request size caps.

How do I fix HTTP 413?

  1. Raise the limit at every layer: Nginx client_max_body_size 50M; PHP upload_max_filesize and post_max_size; express.json({ limit: "10mb" }).
  2. For very large files, upload directly to object storage (S3, R2) with a pre-signed URL.

What should a client do after HTTP 413?

Reduce the body size (compress, resize or chunk it); do not retry unchanged.

Does HTTP 413 affect SEO?

No SEO impact.

Example 413 response

HTTP/1.1 413 Content Too Large
Date: Mon, 01 Dec 2026 12:00:00 GMT
Content-Type: application/json

{"error":{"status":413,"message":"Content Too Large"}}

How to return 413 Content Too Large in code

Express (Node.js)

res.status(413).json({ error: 'Content Too Large' });

Next.js route handler

return Response.json({ error: 'Content Too Large' }, { status: 413 });

FastAPI (Python)

raise HTTPException(status_code=413, detail="Content Too Large")

PHP

http_response_code(413);

Nginx

location = /example {
    return 413;
}

Other 4xx status codes

The request contains an error or cannot be fulfilled as sent. Fix the request before retrying.

Frequently asked questions

How do I fix 413 in Nginx?
Set client_max_body_size (for example 50M) in the http, server or location block and reload Nginx. Also check app-level limits.
Why do uploads fail with 413 on Vercel or Lambda?
Serverless functions have small request body limits. Upload large files directly to storage using a pre-signed URL.
Is 413 a client or server error?
413 is in the 4xx class, so it is classed as a client error: the request needs to change before it can succeed.