Original Research

NPM Package Size Index

By Michael Lip · Published April 10, 2026 · Data source: npm registry API · Last updated:
40
Packages Analyzed
154 MB
Largest (next)
20 KB
Smallest (cors)
7,700x
Size Range

How big are the packages you depend on? We queried the npm registry API for 40 of the most popular JavaScript packages and ranked them by unpacked size. The results reveal a 7,700x difference between the smallest (cors at 20 KB) and largest (next at 154 MB) popular packages.

All sizes are unpacked sizes as reported by the npm registry's dist.unpackedSize field, representing the total bytes of all files after extracting the tarball. This differs from bundle size, which accounts for tree-shaking and minification.

Package Size Rankings

# Package Version Unpacked Size Bytes Category
1next16.2.3154.4 MB154,361,847Huge
2typescript6.0.224.3 MB24,345,915Huge
3prettier3.8.28.6 MB8,604,282Large
4webpack5.106.05.86 MB5,859,643Large
5rxjs7.8.24.50 MB4,497,673Large
6moment2.30.14.35 MB4,350,323Large
7sequelize6.37.82.91 MB2,909,753Medium
8jquery4.0.02.89 MB2,889,460Medium
9eslint10.2.02.90 MB2,897,265Medium
10vue3.5.322.48 MB2,480,183Medium
11axios1.15.02.45 MB2,445,962Medium
12vite8.0.82.19 MB2,185,148Medium
13mongoose9.4.12.07 MB2,069,255Medium
14glob13.0.61.61 MB1,607,230Medium
15socket.io4.8.31.42 MB1,416,999Medium
16lodash4.18.11.41 MB1,413,741Medium
17knex3.2.9915 KB915,416Small
18underscore1.13.8908 KB908,033Small
19async3.2.6808 KB807,741Small
20ioredis5.10.1790 KB789,610Small
21bluebird3.7.2632 KB632,380Small
22redis5.11.0249 KB248,807Small
23yargs18.0.0231 KB231,436Small
24request2.88.2209 KB209,281Small
25commander14.0.3209 KB208,654Small
26react19.2.5172 KB171,604Small
27dotenv17.4.1118 KB118,068Small
28helmet8.1.0104 KB103,678Small
29pg8.20.092 KB91,973Tiny
30express5.2.175 KB75,429Tiny
31uuid13.0.067 KB66,680Tiny
32cookie1.1.161 KB60,539Tiny
33minimist1.2.854 KB54,477Tiny
34inquirer13.4.149 KB49,224Tiny
35chalk5.6.244 KB44,342Tiny
36jsonwebtoken9.0.343 KB43,403Tiny
37debug4.4.343 KB42,793Tiny
38body-parser2.2.240 KB39,481Tiny
39morgan1.10.131 KB30,593Tiny
40cors2.8.620 KB19,956Tiny

Methodology

Data source: All sizes were fetched from the npm registry API (registry.npmjs.org/PACKAGE) on April 10, 2026. The dist.unpackedSize field from the latest version was used for each package.

  • Packages were selected based on weekly download popularity from the npm ecosystem
  • Unpacked size represents the total size of all files in the package after extraction
  • Size categories: Tiny (<50 KB), Small (50-500 KB), Medium (500 KB-2 MB), Large (2-10 MB), Huge (>10 MB)
  • This does not include transitive dependencies — only the direct package files

Frequently Asked Questions

What is the difference between npm unpacked size and bundle size?

Unpacked size is the total size of all files in a package after extracting the tarball. Bundle size (or minified + gzipped size) is the size after tree-shaking, minification, and compression. For example, lodash has an unpacked size of 1.41 MB but a minified+gzipped bundle of about 69 KB when tree-shaken properly. This index uses unpacked size from the npm registry API.

Why is the Next.js package so large?

Next.js has an unpacked size of 154 MB because it bundles its own copy of the webpack compiler, SWC (Rust-based compiler), and pre-compiled binaries for multiple platforms. Despite the large install size, your production bundle only includes the code paths you actually use.

Which popular npm packages are the smallest?

Among popular packages, the smallest include: cors (19.9 KB), body-parser (39.5 KB), cookie (60.5 KB), debug (42.8 KB), chalk (44.3 KB), and dotenv (118 KB). These packages follow the Unix philosophy of doing one thing well.

How can I check an npm package's size before installing?

Several methods: 1) Check npmjs.com package page, 2) Use bundlephobia.com for minified+gzipped size, 3) Run 'npm pack --dry-run', 4) Use the npm registry API: 'curl https://registry.npmjs.org/PACKAGE', 5) Use 'npm install --dry-run'.

Does package size affect npm install speed?

Yes, package size directly affects install time, especially in CI/CD pipelines. Strategies to reduce install size: use pnpm (deduplicates via hard links), prune devDependencies in production, and prefer smaller alternatives (date-fns over moment, got over request).

Free to use under CC BY 4.0 license. Cite this page when sharing.