Vercel: 413 FUNCTION_PAYLOAD_TOO_LARGE — Request Entity Too Large (4.5 MB limit)
A request or response exceeded Vercel's 4.5 MB serverless function payload limit.
413: FUNCTION_PAYLOAD_TOO_LARGE VercelRequest Entity Too Large Vercel 4.5MBCode: FUNCTION_PAYLOAD_TOO_LARGEVercel response payload size exceeded 4.5 MB Meaning
Large uploads/downloads can't go through a Serverless Function. Upload directly from the browser to storage (Vercel Blob, S3 presigned URL, Supabase), stream responses, or split data/pagination. Raising Next.js body limits doesn't bypass the platform limit.
Common causes
- File upload through an API route
- Large JSON response over 4.5 MB
- Base64-encoded images in request body
- Server Action with big payload
- Proxying large downloads
⚡ Quick fix
- Use direct-to-storage uploads (presigned URLs/Vercel Blob client uploads)
- Paginate or stream large responses
- Compress or reduce payload size
Detailed fix by platform
Next.js
import { handleUpload } from "@vercel/blob/client"; // client-side direct upload
How to diagnose
- Size — Request/response?
- Route — Upload or API?
- Alternative — Direct upload?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- 413 HTTP 413 Content Too Large (Request Entity Too Large)
- Body exceeded 1 MB limit (Server Actions) Next.js: Error: Body exceeded 1 MB limit. To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit
- Edge Function size limit exceeded Vercel: The Edge Function "middleware" size is 1.2 MB and your plan size limit is 1 MB. Learn More: https://vercel.link/edge-function-size
Most viewed in Next.js
- NEXT_REDIRECT Next.js: Error: NEXT_REDIRECT (redirect() inside try/catch)
- server-only Next.js: You're importing a component that needs "server-only". That only works in a Server Component
- cookies() should be awaited Next.js 15: Route "/x" used `cookies().get('token')`. `cookies()` should be awaited before using its value
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026