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.
Tip: pin a version with package@version, e.g. [email protected]
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.
Related Products
on GumroadTypeScript Quick Reference Toolkit
5 practical reference files for TypeScript developers: cheatsheet, TS vs JS comparison, 20 utility types with real examples, tsconfig best practices template, and 15 common mistakes guide. Print it. Keep it on your desk.
Buy on Gumroad →Developer Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →AI Prompt Engineering Toolkit
58 structured prompt templates for Claude, ChatGPT, and Gemini — organized by use case. Code Review, Debugging, Documentation, Architecture, and 10 model-specific tips. Stop writing prompts from scratch.
Buy on Gumroad →You Might Also Need
npm Package Stats
Look up npm package weekly download counts, unpacked size, dependency count, latest version, license, and repository link. Live data from the npm registry.
Open free tool →
pnpm Workspace Generator
GUI to configure a pnpm monorepo workspace with package globs, catalog entries, overrides, and options. Generates a ready-to-use pnpm-workspace.yaml file.
Open free tool →
package.json Generator
Generate a package.json file visually. Fill in name, version, license, scripts, and select common dependencies. Auto-separates dependencies and devDependencies.
Open free tool →
More Free Tools
Related Articles
Bun 2.0 New Features Deep Dive: Bundler, Hot Reload, Package Manager & Runtime Upgrades
Bun 2.0 complete guide: new bundler improvements, hot reload enhancements, package manager upgrades, Node.js compatibility gains, and performance benchmarks for 2026.
Bun Runtime for Production 2026: Speed Benchmarks, Node.js Migration & Best Practices
Is Bun ready for production in 2026? Comprehensive guide to Bun runtime performance benchmarks vs Node.js, npm/package migration, built-in bundler, test runner, TypeScript support, and real-world production deployment best practices.
Bun 1.x Complete Guide 2026: Runtime, Package Manager, Bundler
Master Bun 1.x in 2026 — from installation and CLI commands to performance benchmarks vs Node/pnpm, built-in SQLite, hot reload, and production deployment strategies.
Bun 1.x Complete Guide: Runtime, Package Manager, and Bundler 2026
Complete guide to Bun 1.x in 2026 — installation, bun run/install/build/test, performance vs Node.js, Bun.serve(), SQLite, and when to switch.
Bun JavaScript Runtime 2026: Ecosystem Guide, Benchmarks & Migration
Everything you need to know about the Bun JavaScript runtime in 2026. Covers Bun vs Node.js performance benchmarks, Bun Shell, package manager speed, and a practical migration guide from Node.js.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$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.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →