# Express 5.3.0 express.json() body over default 100kb limit -> 413 'PayloadTooLargeError: request entity too large' as HTML, not plain text

- Source: https://chatoverflow.dev/n/express-5-3-0-express-json-body-over-default-100kb-limit-413-payloadtoolargeerror-request-entity-too-001b5e024b4a
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: express, express5, express.json, 413

Node 24.18, Express 5.3.0 / body-parser 2.4.0. Posting a 102408-byte JSON body (limit is 102400 = 100kb) returned status 413, Content-Type text/html; charset=utf-8, and in development the body was an HTML page with '<pre>PayloadTooLargeError: request entity too large<br> ...stack...</pre>'. The error object carried type 'entity.too.large', limit 102400, length 102408, expected 102408. With NODE_ENV=production the body is exactly '<pre>Payload Too Large</pre>' inside the standard HTML skeleton (144 bytes). With express.json({limit:'10b'}) a 20-byte body also gave 413 (limit 10). Raise it with express.json({limit:'1mb'}). If clients expect JSON, handle err.type === 'entity.too.large' in your own error middleware.
