AnyTool
Your files never leave your device. All processing happens locally in your browser.

How to analyze a JavaScript bundle and find what is making it big?

Drop a webpack stats.json, an esbuild metafile, a rollup-plugin-visualizer JSON, or a whole dist/ folder onto AnyTool Bundle Analyzer. It auto-detects the format, renders an interactive treemap of module and chunk sizes, flags duplicate modules, and toggles raw, parsed, and gzip sizes. Everything runs 100% in your browser - your stats file is never uploaded.

  • Treemap any webpack, esbuild, or rollup stats file - auto-detected in one box
  • Flip raw, parsed, and gzip metrics and find duplicate modules with wasted bytes
  • Search to highlight modules, zoom by breadcrumb, and sort packages by size
  • 100% in your browser - no upload, no signup, works offline

What is

Bundle Analyzer

A bundle analyzer reads a bundler stats artifact and visualizes which modules, packages, and chunks contribute most to a JavaScript bundle, usually as a treemap, so you can shrink your build.

Developer Tools

Related terms

Webpack stats.jsonesbuild metafileTreemap visualizationTree shaking

Frequently Asked Questions

No. AnyTool Bundle Analyzer parses your stats file entirely in your browser and never uploads it.

AnyTool Bundle Analyzer is 100% client-side. Your webpack stats.json, esbuild metafile, or dist/ folder is read locally and parsed in a Web Worker, so nothing is sent to any server. It works offline after the first load and there is no signup.

It auto-detects webpack stats.json, esbuild metafiles, rollup-plugin-visualizer JSON, and a raw dist/ folder.

Unlike single-bundler tools, AnyTool Bundle Analyzer accepts webpack stats.json, esbuild metafiles, rollup-plugin-visualizer JSON output, or your whole dist/ folder in one drop box. It detects the format automatically and shows copy-paste snippets for generating each file.

Gzip is real when the bytes are readable and clearly labeled as estimated otherwise.

For a dist/ folder or readable files, the tool measures real gzip sizes with pako in a Web Worker. When only a stats file is available it estimates gzip from per-module data and labels those numbers as estimated, so you always know which figures are exact.

Drop your stats file and the tool lists modules shipped in multiple chunks with the wasted bytes.

After loading a stats file, the Duplicate modules panel lists any module path or package version shipped across more than one chunk, the number of copies, and the raw bytes wasted, so you can de-dupe and shrink the bundle.

Detailed Explanation

Technical Details

Universal Bundler Stats Ingestion

AnyTool Bundle Analyzer accepts a pre-built stats artifact and auto-detects its format: webpack stats.json (webpack --json > stats.json), an esbuild metafile (metafile: true), rollup-plugin-visualizer JSON, or a raw dist/ folder. It folds module sizes into a tree by chunk, package, and folder, then renders an interactive squarified treemap as branded SVG with no third-party treemap library. Most competing online tools are locked to a single bundler.

  • Auto-detects webpack, esbuild, rollup-plugin-visualizer, and dist/ folder inputs
  • Hand-rolled squarified SVG treemap - no canvas widget, search-friendly
  • Folds modules into a chunk, package, and folder size tree
  • Shows per-bundler snippets for generating each stats file
Use Cases

Duplicate Detection and Size Metrics

Beyond visualization, the tool surfaces actionable insight: it finds modules and clashing package versions shipped in more than one chunk and quantifies the wasted raw bytes, and it splits node_modules from app code as a share of the total. A segmented toggle re-weights the treemap by raw (stat), parsed, or gzip size, and a debounced search box highlights matching modules while dimming the rest.

  • Duplicate module finder reports copies, versions, and wasted bytes
  • node_modules versus app-code split as a percentage of total
  • Raw, parsed, and gzip metric toggle re-weights treemap areas
  • Live filter highlights matches and dims non-matches in the treemap
Limitations

Client-Side Processing and Honest Limits

The analyzer is fully client-side: large stats files parse in a Web Worker so the tab does not freeze, and the file never leaves the browser. It cannot run your build for you, so it requires a pre-generated stats artifact rather than source. Real gzip is measured with pako only for readable bytes such as a dist/ folder; gzip derived from stats alone is estimated and labeled as such, and brotli is not computed in the browser.

  • Web Worker parsing keeps the UI responsive on large stats files
  • Requires a pre-built stats artifact - cannot run your bundler in-browser
  • Real gzip via pako for readable files; otherwise gzip is labeled estimated
  • No upload, no server, no CDN - stats file stays in the tab
AnyTool Bundle Analyzer vs typical online alternatives
CapabilityAnyToolTypical alternative
Privacy / no uploadYes - 100% client-sideOften server-side or build-time
PriceFreeFree but install required
Multi-bundler inputwebpack, esbuild, rollup, dist/Usually one bundler only
Duplicate detectionYes - with wasted bytesRare in online tools
Searchable treemap + dark modeYes - live highlight, mobileOften neither

Incumbents are either powerful build-time plugins/CLIs or simple single-bundler online viewers.