Vercel 413 FUNCTION_PAYLOAD_TOO_LARGE
An upload or a function response dies with 413 FUNCTION_PAYLOAD_TOO_LARGE? Vercel caps a function request or response body at 4.5 MB.
Reviewed October 15, 2026
What it means in plain English
The browser sent a function more data than Vercel allows, or the function tried to send too much back. Vercel's functions limits say the maximum payload for a request body or a response body is 4.5 MB. Over that, the function returns HTTP 413 with the code FUNCTION_PAYLOAD_TOO_LARGE.
Likely causes
- A form posts a photo, a PDF, or a base64 string straight into a Route Handler or a Server Action.
- The AI generated an API route that reads
await request.json()for a file the user picked. - The function itself returns a large JSON dump or a generated file.
How to fix it, step by step
- In the failed request, compare the body size with 4.5 MB. Vercel documents that limit on the functions limits page.
- Stop sending the file through the function. Keep the function for a short JSON message, and put the file somewhere that accepts the upload directly.
- If the response is the large part, do not return the whole file from the function. Return a link to the stored file instead.
- Redeploy and retry the same upload.
How to check it worked
- The same action returns a normal status instead of 413.
- The function log no longer shows
FUNCTION_PAYLOAD_TOO_LARGE.
Sources
Related fixes
More Vercel deploy and runtime fixes
Keep going on your own.
The guides stay free. A deep leak report is $15. Fix packs are $24, or $49 for all three. There is no done-for-you repair.