Base64 Size Calculator
Find the encoded size and overhead of Base64.
Results update as you type.
How it works
Base64 encoding turns binary data into text so it can travel safely through systems that expect text, and this calculator shows how much larger the result gets. You enter the original size in bytes, and it returns the Base64-encoded size, the overhead added in bytes, and the overhead as a percentage. Base64 works by taking every three bytes of input and representing them as four printable ASCII characters, padding the last group with equals signs if the input is not a multiple of three. Because four characters represent three bytes, the encoded output is about one-third, roughly 33 percent, larger than the original, which the calculator makes precise using the ceiling formula that accounts for padding. This overhead matters when Base64 is used to embed images or files in HTML, CSS, JSON, or emails, or to transmit binary data in text-based protocols, because it inflates payload sizes and therefore bandwidth and storage. For example, embedding a 100 KB image as a Base64 data URI makes it about 133 KB. Knowing the overhead helps you decide whether inlining data as Base64 is worthwhile versus linking to a separate file, and to budget for the larger size in APIs and storage. Base64 is not compression or encryption; it only makes binary safe as text, at a size cost. Enter the original byte size to find the encoded size and overhead.
Encoded size = ceil(bytes / 3) × 4
Base64 encodes every 3 bytes of input into 4 ASCII characters, padding the final group if needed. So the encoded size is the original bytes divided by 3, rounded up, times 4. This makes Base64 output about one-third larger than the original data.
Source:Base64 encoding (RFC 4648)
We review all our tools from time to time to ensure accuracy.
Worked example
How to use this calculator
- 1
Enter your values
Enter original size.
- 2
Adjust the options
Fine-tune any options to match your situation.
- 3
Read your result
Base64-encoded size updates instantly as you type — no button to press.
Frequently asked questions
How much larger is Base64 than the original?
Base64 encoding increases size by about one-third, roughly 33 percent, because it represents every 3 bytes of input as 4 text characters. The exact encoded size is the original bytes divided by 3, rounded up, times 4, accounting for padding. So a 3,000-byte file becomes 4,000 bytes when Base64-encoded.
Why does Base64 add overhead?
Base64 maps 3 bytes of binary data to 4 printable ASCII characters so the data is safe to include in text. Since 4 characters take more space than the 3 bytes they represent, the output is larger. Padding characters added to complete the final group can add a byte or two more. This size cost is the trade-off for text-safe encoding.
When is Base64 used?
Base64 is used to embed images or files directly in HTML, CSS, or JSON as data URIs, to attach files in email (MIME), and to transmit binary data through text-only channels or APIs. Anywhere binary must travel as text, Base64 is common. Knowing its overhead helps decide whether inlining is worth the larger size.
Is Base64 encryption or compression?
No. Base64 is neither encryption nor compression. It provides no security, since anyone can decode it trivially, and it makes data larger rather than smaller. Its only purpose is to represent binary data safely as text. If you need security, encrypt the data; if you need smaller size, compress it, ideally before Base64 if both are required.
Should I inline images as Base64?
Inlining small images as Base64 data URIs saves an HTTP request, which can help for tiny assets, but the roughly 33 percent size increase and the fact that inlined data is not cached separately often make linking to a file better for larger images. Weigh the request savings against the added size and lost caching for your case.