Bundle Size Budget Calculator
Enter your asset sizes to compare against recommended performance budgets. Get estimated parse times, network transfer speeds for 3G/4G/5G, and pass/fail budget status for each asset type.
Asset Sizes (KB, uncompressed)
Budget Breakdown
Network Transfer Times (compressed)
| Network | Speed | Transfer Size | Load Time |
|---|
Optimization Tips
Frequently Asked Questions
What is a performance budget and why does it matter?▼
A performance budget sets maximum thresholds for page weight metrics — JS bundle size, CSS size, total page weight, number of requests. Budgets make performance a first-class constraint in development. Google recommends keeping total page weight under 500KB for fast-loading pages, with JavaScript under 200KB compressed. Exceeding budgets should trigger a review before merging code. Tools like Lighthouse, bundlesize, and size-limit can automate budget enforcement in CI.
What is the recommended maximum JavaScript bundle size?▼
The commonly cited guideline is 200KB compressed (gzip/brotli) for the initial JavaScript payload on mobile networks. This equates to roughly 800KB–1MB uncompressed, which can take 3–15 seconds to parse on a mid-range Android device. For Total Blocking Time (TBT) to stay below 300ms, you should keep all long tasks under 50ms. HTTP Archive data shows top-performing sites keep JS under 150KB; median sites ship 450KB+.
How does parse time relate to bundle size?▼
Every KB of JavaScript must be parsed and compiled by the browser's JS engine before it can execute. Parse time depends on CPU speed, not network speed — a 200KB JS bundle that downloads in 0.1s on 5G still takes ~500ms to parse on a low-end Android phone. This is why bundle size matters even on fast connections. Use code splitting, tree shaking, and dynamic imports to reduce the initial parse cost. Prefer smaller, lazily-loaded chunks.
What is the difference between compressed and uncompressed size?▼
Uncompressed size is the raw file size on disk. Compressed size (gzip or brotli) is what gets transferred over the network — typically 60–80% smaller. JavaScript and CSS compress very well; images do not (they're already compressed). Always check compressed sizes for performance budgets, since that's what users actually download. Brotli compresses 10–25% better than gzip and is supported by all modern browsers and CDNs.
How do I enforce bundle size budgets in CI?▼
Several tools automate this: size-limit (npm) — define budgets in package.json and fail CI if exceeded. bundlesize — similar, supports glob patterns. Lighthouse CI — runs Lighthouse in CI and fails on budget violations. Webpack Performance Hints — built into webpack with maxAssetSize and maxEntrypointSize. GitHub Actions + bundlestats-action — posts size diffs on every PR. A common workflow: run bundle analysis on every PR and post a size report as a PR comment.
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
Vitest Configuration Generator
Generate a complete vitest.config.ts visually. Configure test environment (node/jsdom/happy-dom), coverage provider, reporters, thresholds, and path aliases.
Open free tool →
Bundle Size Estimator
Estimate JavaScript bundle size from npm packages. 200+ popular packages with load time estimates for 3G, 4G LTE, 5G, and WiFi connections.
Open free tool →
Vitest Guide — Vite-native Testing
Comprehensive Vitest guide for Vite projects. Covers setup, vi.mock, in-source testing, coverage with V8/Istanbul, HMR test running, and migration from Jest.
Open free tool →
More Free Tools
Related Articles
JavaScript Bundle Size Optimization: From 2MB to 200KB — A Practical Guide
Practical techniques to reduce JavaScript bundle size from megabytes to kilobytes. Covers tree shaking, code splitting, dynamic imports, bundle analysis, and tools that actually work in 2026.
Vite 6 vs Webpack 5 深度對決:2026 大型專案遷移實戰指南
2026 年最完整的 Vite 6 vs Webpack 5 深度比較與遷移指南。涵蓋效能基準測試、分塊策略、CSS Modules、環境變數轉換、常見陷阱與真實大型專案遷移清單。
Performance Optimization 2026: Complete Guide to Frontend, Backend, and Infrastructure
Comprehensive performance optimization guide for 2026 covering Core Web Vitals, JavaScript bundle optimization, server-side rendering, caching strategies, database query optimization, CDN configuration, and real-world benchmarks.
Vite 6 vs webpack vs esbuild vs Turbopack: Build Tool Comparison 2026
In-depth 2026 comparison of JavaScript build tools: Vite 6, webpack 5, esbuild, and Turbopack. Build speeds, HMR, plugin ecosystems, migration paths, and when to use each.
Vite 6 vs Webpack 5 vs Turbopack: Which Bundler Wins in 2026?
A detailed comparison of Vite 6, Webpack 5, and Turbopack build performance, HMR speed, configuration complexity, and production output. Includes real benchmark data and a decision guide for 2026.
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 →