JavaScript Bundle Analyzer

Analyse a JS bundle and its source map: size of every npm package and file, gzip size, nested duplicate packages and tips for heavy libraries.

Tool

Was this tool useful?

About this tool

About JavaScript Bundle Analyzer

Why is your JavaScript so big? Drop in the built bundle (.js) and its source map (.js.map). The analyzer works out exactly how many bytes of the bundle come from each npm package and each source file, shows the gzipped size, finds packages bundled twice from inside other packages, and gives tips for known heavy libraries like moment, lodash and core-js. Without a source map it still detects well-known libraries.

How it works

The source map's mappings are decoded (Base64 VLQ) and the bundle characters between mapping points are counted for each original source file. Files under node_modules/<package> are grouped by package.

Example

A React app of 600 KB may show react-dom 130 KB, moment 70 KB with locales, and lodash 70 KB – the last two can often be replaced with smaller libraries.

How to use this tool

  1. Build your app with source maps (webpack, Vite, Rollup, esbuild…).
  2. Choose the .js file and its .js.map.
  3. See the biggest packages and files; export the list.

Frequently asked questions

Is my code uploaded?

No. The files are read only in your browser.

Why do sizes differ from webpack-bundle-analyzer?

This tool measures the minified bundle bytes; some tools show sizes before minification. Gzip size is for the whole bundle.

Can I export the result?

Yes – download the result as CSV (opens in Excel and Google Sheets).

Does the JavaScript Bundle Analyzer send my data to a server?

No. The JavaScript Bundle Analyzer runs entirely in your browser using JavaScript, so tokens, code and data you paste stay on your device. You can even use it offline once the page has loaded.