body-parser
npmv2.3.0Node.js body parsing middleware
Adopt with care
body-parser is usable, with caveats. Pulls in 37 transitive packages, about 1.6 MB installed (at least — some of the tree is still being crawled).
- AAdoption: grade A, Excellent.
97.1M downloads per week and 5 known dependents.
- AMaintenance: grade A, Excellent.
Last published 86 days ago. 13 releases in the last 2 years.
- CWeight: grade C, Fair — worth a look.
Pulls in 37 transitive packages, about 1.6 MB installed (at least — some of the tree is still being crawled).
- ASupply chain: grade A, Excellent.
No install scripts, 4 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding body-parser to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Part of this dependency tree has not been crawled yet, so these figures are a lower bound rather than a final total.
Licenses in the dependency tree
Every license you inherit by installing body-parser, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node >=18
- Module format
- CommonJS only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the body-parser README.
// Import all parsers
const bodyParser = require('body-parser')
// Or import individual parsers directly
const json = require('body-parser/json')
const urlencoded = require('body-parser/urlencoded')
const raw = require('body-parser/raw')
const text = require('body-parser/text')Dependencies
Declared by body-parser v2.3.0. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (9)
Dev (10)
Used by
Popular packages that depend on body-parser.
Promise based HTTP client for the browser and node.js
Fast, unopinionated, minimalist web framework
Universal WHATWG Fetch API for Node, Browsers and React Native
Low-level network interception library for Node.js.
No description provided.
Relationship graph
Dependencies (left) and dependents (right) of body-parser.
Frequently installed together
Fast, unopinionated, minimalist web framework
An AST-based pattern checker for JavaScript.
Next generation testing framework powered by Vite
HTTP and HTTPS modules that follow redirects.
An HTTP(s) proxy `http.Agent` implementation for HTTPS
ECMAScript parser
Prettier is an opinionated code formatter
A library to create readable "multipart/form-data" streams. Can be used to submit forms and file uploads to other web applications.
Browser running for Vitest using playwright
Offers getProxyForUrl to get the proxy URL for a URL, respecting the *_PROXY (e.g. HTTP_PROXY) and NO_PROXY environment variables.
A high-level API to automate web browsers
Browser running for Vitest
Release history
9 releases in the last two years, typically about 51 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 1.20.8 | 1 day ago | 59 KB | MIT |
| 1.20.6 | 2 months ago | 61 KB | MIT |
| 2.3.0latest | 2 months ago | 42 KB | MIT |
| 1.20.5 | 4 months ago | 60 KB | MIT |
| 2.2.2 | 8 months ago | 39 KB | MIT |
| 1.20.4 | 9 months ago | 60 KB | MIT |
| 2.2.1 | 9 months ago | 39 KB | MIT |
| 2.2.0 | 1 year ago | 58 KB | MIT |
| 2.1.0 | 1 year ago | 61 KB | MIT |
| 2.0.2 | 1 year ago | 61 KB | MIT |
| 2.0.1 | 2 years ago | 62 KB | MIT |
| 2.0.0 | 2 years ago | 62 KB | MIT |
| 1.20.3 | 2 years ago | 61 KB | MIT |
| 2.0.0-beta.2 | 3 years ago | 60 KB | MIT |
| 1.20.2 | 3 years ago | 59 KB | MIT |
Overview
body-parser is an npm package that node.js body parsing middleware. It is extremely widely used, with about 97.1M downloads per week and 5 known dependents in the graph. The latest version is 2.3.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need node.js body parsing middleware and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to minimize your dependency tree, have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (97.1M weekly downloads).
- Clear open-source license (MIT).
Cons
- Large dependency tree (19 direct dependencies) increases install size and audit surface.
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Funding
Frequently asked questions
Should I use body-parser?
body-parser is usable, with caveats. Pulls in 37 transitive packages, about 1.6 MB installed (at least — some of the tree is still being crawled).
How do I install body-parser?
Run `npm install body-parser` to add body-parser to your npm project.
How many dependencies does body-parser have?
body-parser declares 19 direct dependencies and pulls in 37 packages in total once its runtime tree is resolved totalling about 1.6 MB on disk.
What license is body-parser released under?
body-parser is distributed under the MIT license. Its dependency tree also includes: BSD-3-Clause, ISC, MIT.
How popular is body-parser?
body-parser has approximately 97,128,499 downloads per week and 5 known dependent packages.
Is body-parser still maintained?
The most recent release of body-parser (v2.3.0) was published 2 months ago.
Does body-parser run install scripts?
No. body-parser does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.