InfyCalculator
💻

Base64 Size Overhead Calculator

See how much larger a file or string becomes when Base64-encoded — the encoded byte count, the ~33% overhead and the extra bytes added.

Original data size
Size unit
Loading calculator…

How it works

Encoded bytes = 4 × ⌈n ÷ 3⌉ · Overhead % = (encoded ÷ n − 1) × 100

Base64 packs every 3 bytes of input into 4 ASCII characters, so the output is always about 4/3 the size of the input — roughly a 33% increase. The ceiling and padding (= signs) mean tiny inputs round up to the next multiple of four characters. This overhead is why Base64 is used for transport safety (email, JSON, data URIs), not for saving space.

Worked example

A 1 MB (1,000,000-byte) file encodes to 4 × ⌈1,000,000 ÷ 3⌉ = 4 × 333,334 = 1,333,336 bytes ≈ 1.33 MB — about 333 KB, or 33.3%, larger than the original.

Frequently asked questions

Why is Base64 about 33% bigger?

Each group of 3 input bytes (24 bits) is re-expressed as 4 characters of 6 bits each. Four output bytes for every three input bytes is a 4/3 ratio, so the encoded data is roughly 33% larger regardless of content.

Does the calculator include line breaks?

No. Classic MIME Base64 inserts a line break every 76 characters, which adds a further ~1–2% on top of the 33%. This tool reports the raw encoded length without line wrapping, which is what most JSON APIs and data URIs use.

Can Base64 ever make data smaller?

No. Base64 is an encoding, not compression — it can only add overhead. If you need smaller output, compress the data first (gzip, Brotli) and then Base64-encode the compressed bytes if transport requires text.

Related calculators

This calculator is for educational purposes. Double-check important results before acting on them.