NPM Package Size Index
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 |
|---|---|---|---|---|---|
| 1 | next | 16.2.3 | 154.4 MB | 154,361,847 | Huge |
| 2 | typescript | 6.0.2 | 24.3 MB | 24,345,915 | Huge |
| 3 | prettier | 3.8.2 | 8.6 MB | 8,604,282 | Large |
| 4 | webpack | 5.106.0 | 5.86 MB | 5,859,643 | Large |
| 5 | rxjs | 7.8.2 | 4.50 MB | 4,497,673 | Large |
| 6 | moment | 2.30.1 | 4.35 MB | 4,350,323 | Large |
| 7 | sequelize | 6.37.8 | 2.91 MB | 2,909,753 | Medium |
| 8 | jquery | 4.0.0 | 2.89 MB | 2,889,460 | Medium |
| 9 | eslint | 10.2.0 | 2.90 MB | 2,897,265 | Medium |
| 10 | vue | 3.5.32 | 2.48 MB | 2,480,183 | Medium |
| 11 | axios | 1.15.0 | 2.45 MB | 2,445,962 | Medium |
| 12 | vite | 8.0.8 | 2.19 MB | 2,185,148 | Medium |
| 13 | mongoose | 9.4.1 | 2.07 MB | 2,069,255 | Medium |
| 14 | glob | 13.0.6 | 1.61 MB | 1,607,230 | Medium |
| 15 | socket.io | 4.8.3 | 1.42 MB | 1,416,999 | Medium |
| 16 | lodash | 4.18.1 | 1.41 MB | 1,413,741 | Medium |
| 17 | knex | 3.2.9 | 915 KB | 915,416 | Small |
| 18 | underscore | 1.13.8 | 908 KB | 908,033 | Small |
| 19 | async | 3.2.6 | 808 KB | 807,741 | Small |
| 20 | ioredis | 5.10.1 | 790 KB | 789,610 | Small |
| 21 | bluebird | 3.7.2 | 632 KB | 632,380 | Small |
| 22 | redis | 5.11.0 | 249 KB | 248,807 | Small |
| 23 | yargs | 18.0.0 | 231 KB | 231,436 | Small |
| 24 | request | 2.88.2 | 209 KB | 209,281 | Small |
| 25 | commander | 14.0.3 | 209 KB | 208,654 | Small |
| 26 | react | 19.2.5 | 172 KB | 171,604 | Small |
| 27 | dotenv | 17.4.1 | 118 KB | 118,068 | Small |
| 28 | helmet | 8.1.0 | 104 KB | 103,678 | Small |
| 29 | pg | 8.20.0 | 92 KB | 91,973 | Tiny |
| 30 | express | 5.2.1 | 75 KB | 75,429 | Tiny |
| 31 | uuid | 13.0.0 | 67 KB | 66,680 | Tiny |
| 32 | cookie | 1.1.1 | 61 KB | 60,539 | Tiny |
| 33 | minimist | 1.2.8 | 54 KB | 54,477 | Tiny |
| 34 | inquirer | 13.4.1 | 49 KB | 49,224 | Tiny |
| 35 | chalk | 5.6.2 | 44 KB | 44,342 | Tiny |
| 36 | jsonwebtoken | 9.0.3 | 43 KB | 43,403 | Tiny |
| 37 | debug | 4.4.3 | 43 KB | 42,793 | Tiny |
| 38 | body-parser | 2.2.2 | 40 KB | 39,481 | Tiny |
| 39 | morgan | 1.10.1 | 31 KB | 30,593 | Tiny |
| 40 | cors | 2.8.6 | 20 KB | 19,956 | Tiny |
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.