Base64 Size Calculator
Work out how large a file becomes when it is encoded as Base64, including the data URI prefix, or how many bytes a Base64 string decodes to.
1 Fill in the boxes
2 Your answer
Your answer shows here as you type.
How to use the Base64 Size Calculator
- Choose whether you want the size after Base64 encoding or the decoded size of a Base64 string.
- Enter the file size in bytes, or the number of Base64 characters when decoding.
- For a data URI, type the MIME type such as image/png, or set the trailing equals signs when decoding.
Frequently asked questions
How much bigger is Base64 than the original file?
Base64 makes data about 33 percent larger. Every 3 bytes become 4 characters, so the encoded length is 4 times the number of 3-byte groups, rounded up.
What do the = signs at the end of a Base64 string mean?
Base64 pads the output with one or two equals signs so the length is a multiple of 4. The decoded size is (length divided by 4) times 3, minus the number of equals signs.
Does a data URI add extra size?
Yes. The prefix data:[type];base64, is added before the encoded text. For example, data:image/png;base64, is 22 characters.
Wrote something with AI? Slop Monkey rewrites it so it sounds like you, and keeps your facts.