Base64 Encoded Size Calculator

Base64 encoding turns binary data into a text-safe alphabet of 64 characters so it can travel through email, JSON, and data URIs. The cost is size: every 3 bytes of input become 4 characters of output, a 4 to 3 ratio that adds roughly 33 percent. Enter the original size of your file and choose its unit, and this calculator returns the exact encoded byte count, the overhead added, and the overhead as a percentage. The formula follows RFC 4648, rounding each partial 3-byte group up to a full 4-character block.

0.00
0.00
0.00
0.00

Base64 size formula

Input bytes n = original size in bytes
Encoded chars = 4 * ceil(n / 3)
Each Base64 char is 1 byte of ASCII
Overhead = encoded bytes - input bytes
Overhead percent = (overhead / input bytes) * 100

The ceiling rounds each partial 3-byte group up to a full 4-character block, so the encoded length is always a multiple of 4.

Base64 context

  • Base64 is defined in RFC 4648 and uses A to Z, a to z, 0 to 9, plus, and slash.
  • The size ratio is exactly 4 to 3, about a 33 percent increase before padding.
  • Padding equals signs keep the output a multiple of 4 characters.
  • Data URIs embed Base64 images directly in HTML and CSS, avoiding extra requests.
  • MIME email wraps Base64 at 76 characters per line, adding a small amount of extra size.

Base64 size calculator: frequently asked questions

How much bigger does Base64 make a file?

Base64 encoding increases size by about 33 percent (one third) before padding. It maps every 3 input bytes to 4 output characters, so the ratio is 4 to 3. A 3,000-byte file becomes 4,000 bytes of Base64, plus a few padding characters.

What is the exact Base64 size formula?

The encoded length in characters is 4 times the ceiling of the input byte count divided by 3. This rounds each group of up to 3 bytes up to a full 4-character block, which is why the output is always a multiple of 4. RFC 4648 defines this encoding.

What are the equals signs at the end of Base64?

They are padding. When the input length is not a multiple of 3, the final block is padded with one or two equals characters so the output stays a multiple of 4. One leftover byte produces two equals signs; two leftover bytes produce one.

Does line wrapping change the size?

It can. MIME Base64 (used in email) inserts a line break every 76 characters, which adds a small number of extra bytes. This calculator reports the raw encoded size; if your application wraps lines, add the carriage-return and line-feed bytes per line.

Why use Base64 if it increases size?

Base64 lets binary data travel safely through channels that only handle text, such as email bodies, JSON, URLs, and HTML data URIs. The size penalty is the cost of guaranteeing the data survives systems that might alter raw bytes.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 17 June 2026. See our methodology.