Skip to main content

NPM Bundle Size Estimator

Enter npm package names (one per line) to fetch their minified and gzip sizes from bundlephobia.com. Compare packages side-by-side and see total combined weight before you install.

✓ Gzip & minified sizes ✓ Tree-shaking info ✓ Side-by-side comparison

Tip: pin a version with package@version, e.g. [email protected]

Results will appear here

Frequently Asked Questions

What is bundle size and why does it matter?▼

Bundle size is the amount of JavaScript that gets shipped to the browser when a user loads your app. Larger bundles mean longer download times, slower parse/execute times, and worse Core Web Vitals scores. A package that is 200 KB minified might seem small, but on a 3G connection it adds noticeable load time. Keeping total JS under 170 KB gzipped is a good baseline for most apps.

What is the difference between minified and gzip size?▼

Minified size is the size after whitespace, comments, and long variable names are stripped. Gzip size is the minified bundle after gzip compression, which is what actually travels over the network when servers have compression enabled (most do). Gzip exploits repeated patterns in text, so it compresses JavaScript very well — typically 60–70% smaller than minified. Brotli compresses even further (10–20% smaller than gzip) and is supported by all modern browsers.

What does tree-shaking mean, and how does it reduce bundle size?▼

Tree-shaking is a dead-code elimination technique used by bundlers like Webpack, Rollup, and esbuild. When a package exports many functions but you only import a few, a tree-shaking-capable bundler removes the unused exports. A package with 'sideEffects: false' in its package.json is fully tree-shakable. Packages with side effects (like polyfills or CSS-in-JS) cannot be safely eliminated, so you always get the full bundle.

What counts as a 'green', 'yellow', or 'red' bundle size?▼

Under 10 KB gzipped is green — lightweight, no concern. 10–100 KB gzipped is yellow — evaluate whether you truly need it or if a smaller alternative exists. Over 100 KB gzipped is red — this is a heavy dependency. Examples: lodash-es is ~72 KB minified but tree-shakable; moment.js is ~232 KB minified with no tree-shaking; date-fns is ~78 KB but fully tree-shakable so real cost is just the functions you use.

Can I check a specific version of a package?▼

Yes. Enter the package name with a version using the @ syntax, for example: [email protected] or [email protected]. If you omit the version, the latest published version is used. This is useful when your project pins an older version and you want to compare bundle sizes between versions before upgrading.

Is my package list sent anywhere other than bundlephobia.com?▼

The package names are sent only to the bundlephobia.com public API (https://bundlephobia.com/api/size) to fetch size data. No other server receives your input. Bundlephobia is a well-known open-source project maintained by Paskal Paknikar that provides accurate npm package size data.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →