bundle.js
FreeCheck the bundle size of any npm package before installing it. Enter a package name, get instant size stats (minified + gzipped). A critical tool for keeping JS bundles lean.
How to install bundle.js as a PWA
Frequently asked questions about bundle.js
Is bundle.js really accurate?
Yes — bundle.js uses esbuild compiled to WebAssembly to perform a real bundle in the browser, including tree-shaking, minification, and gzip compression. The numbers match what you would get running esbuild locally with default production settings. Bundlephobia, the older alternative, uses webpack and was sometimes inaccurate for ES-module-only packages; bundle.js is the modern successor with sharper numbers for tree-shaken imports.
Is bundle.js free?
Yes — bundle.js is fully free with no account or rate limit. The codebase is MIT-licensed (okikio/bundlejs on GitHub) and can be self-hosted. There are no paid tiers. The maintainer funds the project via GitHub Sponsors.
How does bundle.js compare to Bundlephobia?
bundle.js uses esbuild (WebAssembly, client-side) for fresh real-time bundles and supports modern ES-module-only packages cleanly. Bundlephobia uses webpack on a server, caches results, and lags on bleeding-edge packages. For ESM-first libraries and tree-shaken imports, bundle.js is more accurate. Bundlephobia remains useful for historical comparison data and its 'similar packages' suggestions.
Can I use bundle.js offline?
Partially — the esbuild WebAssembly bundle is cached after first load, but bundle.js still fetches the actual npm package source from a CDN (esm.sh / jsDelivr) at bundle time, which requires network. For fully offline bundle measurement, run esbuild or rollup locally on your machine. For ad-hoc 'how big is this package?' checks, bundle.js is the fastest path.
Who uses bundle.js in production?
bundle.js is used by frontend engineers vetting npm dependencies before adding them, by library maintainers testing the size impact of PRs, by performance consultants auditing JavaScript payloads, and by build-tooling authors verifying tree-shaking behavior. It is referenced in many Core Web Vitals optimization guides and is a common link in JavaScript performance Twitter/X discussions.
Where bundle.js is heading (12-24 months)
- →Adding Brotli compression alongside gzip would reflect modern CDN reality.
- →GitHub Action / CI integration for tracking package size in PRs is a natural extension.
- →Side-effect detection and tree-shake-safety scoring would address a frequent gotcha for ESM consumers.
- →Comparison-mode (paste two packages, see size delta) is a request frequently surfaced in issues.
Related questions
ChatGPT, Perplexity and Gemini usually suggest these next.
- How does bundle.js calculate gzipped size?
- Can bundle.js measure side effects in npm packages?
- How do I check the bundle size of a specific import path like lodash-es/debounce?
- Does bundle.js support TypeScript packages?
- How does bundle.js compare to Pkg-size and Bundlephobia?
More in Development Tools
Offline API documentation browser with 100+ languages and frameworks. Combines MDN, React, Node.js, Python docs into one fast, searchable interface. Works completely offline.
The best regex debugger on the web. Real-time explanation, match highlighting, test strings, and a library of saved patterns. Supports PCRE2, JavaScript, Python, Golang regex.
Google's image compression tool — compare formats (WebP, AVIF, MozJPEG) side by side with live quality sliders. All processing is client-side. A must-have for web developers.
Drag-drop SVG optimizer with live preview. Uses SVGO under the hood — remove metadata, clean paths, reduce file size by 30-80%. Essential for frontend developers.
Full browser-based IDE running Node.js via WebAssembly. Open GitHub repos instantly, run npm packages without installation, share working demos with a URL. No local setup needed.
Browser-based development environment for React, Vue, Angular, and more. Instant previews, collaborative editing, deploy with one click. Ideal for prototyping and sharing demos.