</>PackageGraphPackageGraph

body-parser

npmv2.3.0

Node.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.

9
Direct dependencies

Runtime packages this one declares itself.

37
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

1.6 MB
Install size

Unpacked size of this package plus its entire runtime tree.

5
Tree depth

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

BSD-3-ClauseISCMIT

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.

Dev (10)

eslint ^8.57.1eslint-config-standard ^14.1.1eslint-plugin-import ^2.32.0eslint-plugin-markdown ^3.0.1eslint-plugin-node ^11.1.0eslint-plugin-promise ^6.6.0eslint-plugin-standard ^4.1.0mocha ^11.7.6nyc ^17.1.0supertest ^7.2.2

Used by

Popular packages that depend on body-parser.

Relationship graph

Dependencies (left) and dependents (right) of body-parser.

Frequently installed together

Release history

9 releases in the last two years, typically about 51 days apart.

Recent versions of body-parser
VersionPublishedSizeLicense
1.20.81 day ago59 KBMIT
1.20.62 months ago61 KBMIT
2.3.0latest2 months ago42 KBMIT
1.20.54 months ago60 KBMIT
2.2.28 months ago39 KBMIT
1.20.49 months ago60 KBMIT
2.2.19 months ago39 KBMIT
2.2.01 year ago58 KBMIT
2.1.01 year ago61 KBMIT
2.0.21 year ago61 KBMIT
2.0.12 years ago62 KBMIT
2.0.02 years ago62 KBMIT
1.20.32 years ago61 KBMIT
2.0.0-beta.23 years ago60 KBMIT
1.20.23 years ago59 KBMIT

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.