Body exceeded 1 MB limit / 413 Payload Too Large
- Next.js
- Vercel
- Uploads
What it means
The upload or form was bigger than your server accepts. Next.js server actions accept 1 MB by default, and hosting platforms cap request bodies too.
Why it happens
- Photos or PDFs are sent through a server action or API route.
- Images are sent as base64 text, a third bigger than the file.
- The platform's own request size limit.
How to fix it
- Upload files straight from the browser to storage with a signed upload URL, and send only the path to your server.
- Resize images in the browser before uploading.
- Raise the server action body limit only for small files you control.
Let your AI find the cause
Paste this into Claude Code, Cursor, Lovable or whichever AI built your app. It looks first and changes nothing until you have read the answer.
Uploads in my app fail with 'Body exceeded 1 MB limit' or '413 Payload Too Large'. Without changing anything yet, show me how files travel from the browser to storage, how big they can be, and where they pass through my server.