NPM Package Size Estimator

Type an npm package name; get its minified size, gzipped size, dependency count, and whether it supports tree-shaking. Data is fetched live from bundlephobia. Useful before adding a dependency, or for justifying replacing a heavy package with a lighter one.

How to use the NPM Package Size Estimator

Type a package name (with version optional: [email protected]). The tool queries bundlephobia's API and returns size data plus dependency info. If a package isn't in their cache, the first request takes a few seconds while they build it.

Estimating npm package size

Every dependency you add ships to the browser, and a package that looks small can pull in a tree of transitive dependencies that quietly inflates your bundle — the classic case being a date or utility library that adds far more weight than the one function you actually needed. Knowing the cost before installing saves a painful audit later.

This looks a package up on bundlephobia and reports its minified and gzipped size, dependency count, and whether it is tree-shakeable, so you can compare alternatives — a modular ES build against a monolithic one, say — before committing to one. Once the manifest is in place, the package.json validator checks it for common mistakes.

Common use cases

  • Pre-install check — see a package’s weight before adding it.
  • Compare alternatives — weigh date-fns against moment, or lodash-es against lodash.
  • Justify a swap — quantify the saving from replacing a heavy dependency.
  • Check tree-shaking — confirm a package supports it before relying on it.
  • Audit a bundle — spot the dependency inflating your build.

Frequently asked questions

Where does the data come from?

From the public bundlephobia API, which builds and measures the package.

Can I check a specific version?

Yes — append the version, like [email protected].

Why is the first lookup slow?

If a package is not cached, bundlephobia builds it on demand, which takes a few seconds.

What is the difference between minified and gzipped?

Minified is the raw build size; gzipped is what travels over the wire after compression — usually the number that matters.
Embed this tool on your site

Free to embed, no attribution required (but appreciated). Paste this where you want the tool to appear: