Bundle size

Type the source size and kb or mb. 100 KB in kb gives 21 KB gzip. 1.5 MB in mb gives 323 KB. 8 KB in kb gives 1.7 KB. Fixed ratios, not webpack.

These are fixed minify 0.7, gzip 0.21 and brotli 0.18 ratios, not webpack and not a real compressor. Typed before/after bytes sit on compression ratio.

Input data

Choose KB or MB — outputs are in kilobytes.

Results

Enter data and click Calculate.

How it works

Bundle size in this calculator is fixed ratios of the source. 100 KB in kb gives 21 KB gzip. 1.5 MB in mb gives 323 KB. 8 KB in kb gives 1.7 KB. Minify is 0.7 times source, gzip 0.21, brotli 0.18. The calculator does not run webpack and does not compress a file.

The size field is a number. The unit is kb or mb. Megabytes multiply the source by 1024, then the same ratios. 21 KB at 100 KB is 0.21 times 100, not a Network panel reading. Brotli here is always 0.18 times source.

Pick kb for 100 and for 8. Pick mb for 1.5. The same number in the other unit changes gzip. Leave source blank and the result is no gzip. This is a first-load sketch, not vite build stats.

Compression ratio next door takes before and after bytes that you type. Here you do not type the after size. The calculator multiplies source. 21 KB stays gzip from the ratio, not a CDN measurement.

Type 100, leave kb, then Calculate. Gzip is 21 KB. A comma in 1,5 with mb works too. 8 KB gives 1.7 KB, because a small result keeps one digit after the point.

100 KB in kb gives 21 KB. 1.5 MB in mb gives 323 KB. 8 KB in kb gives 1.7 KB. A different source with the same ratios gives a different gzip.

Formula

min = 0.7 × source; gzip = 0.21 × source; brotli = 0.18 × source

How to use

  1. Type source size 100 and leave the unit on kb.
  2. Click Calculate. Gzip on the page is 21 KB.
  3. 1.5 and mb give 323 KB. 8 and kb give 1.7 KB.
  4. Minify is 0.7 times source, brotli 0.18 times source.
  5. This is not webpack. The next card uses before and after bytes.

100 KB in kb gives 21 KB gzip

Gzip = 0.21 × source. 100 KB in kb gives 21 KB. This is not webpack.

Bundle
The JS source on the page. 100 KB in kb gives 21 KB gzip. 8 KB gives 1.7 KB.
size
A number in kb or mb. 1.5 MB gives 323 KB gzip after × 1024.
gzip
A fixed 0.21 ratio of source. Not a compressor and not webpack stats.

Examples

Example 1

  • 100 KB
  • unit kb

21 KB

What gzip size at 100 KB source in kb? 21 KB. Ratio 0.21, not a compressor.

Example 2

  • 1.5 MB
  • unit mb

323 KB

What gzip size at 1.5 MB in mb? 323 KB. MB multiplies source by 1024.

Example 3

  • 8 KB
  • unit kb

1.7 KB

What gzip size at 8 KB in kb? 1.7 KB. Small result keeps one digit after the point.

Related calculators

Common questions

What gzip size at 100 KB source in kb?

21 KB. 0.21 times 100. A fixed ratio, not real gzip.

What about 1.5 MB in mb?

323 KB. 1.5 × 1024 KB, then 0.21 times that source.

What about 8 KB in kb?

1.7 KB. 0.21 times 8. A small result keeps one digit after the point.

Is this webpack or a vite build?

No. The calculator multiplies source by 0.7 / 0.21 / 0.18. It does not read stats.

Is brotli measured?

No. Brotli here is always 0.18 times source. Real Brotli can differ.

What does the mb unit change?

Source times 1024, then the same ratios. 1.5 in mb gives 323 KB gzip.

Does a comma in 1,5 work?

Yes. 1,5 and 1.5 are the same entry with mb.

How is this different from compression ratio?

That card needs before and after. Here 100 KB in kb itself gives 21 KB gzip.

Is 21 KB CDN transfer?

No. It is 0.21 times the source you typed. A Network panel can differ.

Knowledge sources

The calculator counts bits, bytes or throughput from your numbers. Below are SI and bit definitions (NIST).

Page updated in 2026.

Why JS bundle size matters

Browsers must download, parse, and execute JavaScript before pages feel interactive. A large initial bundle hurts TTI — especially on mobile (weaker CPUs + networks).

This calculator gives rough sizes from source (minify ~70%, gzip ~21%, Brotli ~18%). It does not replace vite build / Lighthouse.

Raw size vs transferred size

  • Source / minified — on-disk artifact (resource size).
  • Gzip / Brotli — typical HTTP transfer size.
  • Compression helps download; the engine still parses uncompressed JS.

Download cost vs parse/execute cost

Even on fast Wi‑Fi, 300 KB of minified JS can stall the main thread on a low-end phone. “Small gzip transfer” ≠ “cheap at runtime.”

  • Framework runtimes have a fixed baseline cost.
  • Heavy libraries hurt both KB and parse time.
  • Measure with Lighthouse, Performance panel, Web Vitals.

Code splitting and lazy loading

The goal is less initial JS — not necessarily a smaller sum of all chunks. Lazy routes, dynamic import(), and tree-shaking defer cost until use.

This calculator does not model splits — enter the chunk that actually ships on first load.

Intuitive thresholds (gzip initial)

Rule of thumb — tune to your product.

Gzip (approx.)FeelTypical action
< ~100 KBcomfortablekeep the budget
~100–300 KBnoticeable on 3G/CPUaudit dependencies
> ~300 KBpainful first loadsplit / remove deps

Result ratios are fixed — trust build stats for production decisions.

Numeric examples (with assumed ratios)

  • 50 KB source → ~35 KB min, ~10.5 KB gzip — light chunk.
  • 300 KB source → ~210 KB min, ~63 KB gzip — already mobile-sensitive.
  • Pre-minified vendor code may compress differently than app source — check the Network panel.