The 413 Payload Too Large HTTP status code indicates that the client has sent a request body that exceeds the server’s configured size limit. This commonly happens during file uploads or large POST requests.
The server rejects the request before processing it fully. Limits may be enforced by:
// Express.js example handling large payloads
const express = require("express");
const app = express();
// Set limit to 1MB
app.use(express.json({ limit: "1mb" }));
app.post("/upload", (req, res) => {
res.send("Upload successful");
});
app.listen(3000);
If the client sends data larger than 1mb, the server automatically responds with:
Status: 413 Payload Too Large
Upload a file below to test the "Server Limit". We have simulated a server limit of 1 MB.
Client ➜ Large Payload ❌ Server Limit