Request body to a function
- Limit
- 4.5 MB
- Result
- 413 FUNCTION_PAYLOAD_TOO_LARGE
Fix Vercel 413 FUNCTION_PAYLOAD_TOO_LARGE: the 4.5 MB request and response body limit, client-side uploads to Vercel Blob, chunking, and how to check payload size.
Vercel returns 413 FUNCTION_PAYLOAD_TOO_LARGE when the request or response body of a Vercel Function is bigger than 4.5 MB. The limit is fixed, so the fixes are to send less, compress, upload large files straight from the browser to Vercel Blob, split the data across requests, or keep big data in external storage.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
413: FUNCTION_PAYLOAD_TOO_LARGE. The pages I checked document no setting to change it; the guidance is to change how the data travels.head -c 5000000 /dev/zero > big.bin
curl -i -X POST --data-binary @big.bin https://your-app.vercel.app/api/uploadThe curl test sends 5,000,000 bytes, which is above 4.5 MB. Expect a 413; then repeat with a smaller file to confirm the route works.
Measure what the client sends and compare it with 4.5 MB.
Send less data, or compress it before sending.
For large files, use client-side uploads: the file goes from the browser to Vercel Blob without passing through the function.
Send smaller chunks in separate requests when the data cannot shrink.
For very large data, keep it in storage and pass the function a reference instead of the bytes.
4 questions people ask next, answered from the sources on this page.
4.5 MB for the request body or the response body of a Vercel Function. A request over that limit returns 413 FUNCTION_PAYLOAD_TOO_LARGE.
The Vercel docs I checked list it as a fixed limit and give no setting to raise it. They suggest reducing or compressing the payload, uploading client-side to Vercel Blob, splitting into requests, or using external storage.
Use a client-side upload to Vercel Blob so the file travels from the browser to storage and not through your function. Your function then handles only the file reference.
The meaning is the same HTTP status, 413 Payload Too Large. The limit, the setting and the fix are specific to the platform that enforces it.
Run the free audit, then approve the fixes. Every change can be undone.