{"repo":"expressjs/body-parser","free":true,"listed":false,"github":"https://github.com/expressjs/body-parser","clone":"git clone https://github.com/expressjs/body-parser.git","description":"Node.js body parsing middleware","language":"JavaScript","stars":5500,"topics":["javascript","middleware","expressjs","nodejs","json","urlencoded","body","parser"],"license":"MIT","category":"dev-tools","readme_excerpt":"body-parser [![NPM Version][npm-version-image]][npm-url] [![NPM Downloads][npm-downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Test Coverage][coveralls-image]][coveralls-url] [![OpenSSF Scorecard Badge][ossf-scorecard-badge]][ossf-scorecard-visualizer] Node.js body parsing middleware. Parse incoming request bodies in a middleware before your handlers, available under the req.body property. Note As req.body 's shape is based on user-controlled input, all properties and values in this object are untrusted and should be validated before trusting. For example, req.body.foo.toString() may fail in multiple ways, for example the foo property may not be there or may not be a string, and toString may not be a function and instead a string or other user input. Learn about the anatomy of an HTTP transaction in Node.js. This does not handle multipart bodies , due to their complex and typically large nature. For multipart bodies, you may be interested in the following modules: busboy and connect-busboy multiparty and connect-multiparty formidable multer This module provides the following parsers: JSON body parser Raw body parser Text body parser URL-encoded form body parser All parsers support automatic inflation of gzip , br (brotli), deflate and zstd encodings. zstd is available in Node.js ^22.15.0 and =23.8.0 . Other body parsers you might be interested in: - body - co-body Installation API The bodyParser object exposes various factories to create middlewares. All mid","default_branch":null,"files":null,"tree":[],"storefront":"/r/expressjs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/expressjs/body-parser/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}