Base64 Encode / Decode

Convert text to Base64, or decode a Base64 string back to text.

Equation used
Every group of 3 bytes (24 bits) becomes 4 Base64 symbols of 6 bits each (A–Z, a–z, 0–9, +, /), per RFC 4648

Frequently Asked Questions

Why is the Base64 output longer than my original text?

Base64 encodes every 3 bytes of input as 4 output characters, so encoded text is roughly 33% larger than the original — this is shown as a positive "Size change" percentage in the result.

Does this handle non-English or special characters correctly?

Yes — this tool is UTF-8 safe, so emoji, Urdu, or other non-ASCII text is converted to its UTF-8 byte sequence before Base64 encoding, and decoded back the same way, avoiding the mangled output that a naive btoa/atob can produce.

Why do I get an error when decoding?

The decoder expects a valid Base64 string (only A–Z, a–z, 0–9, +, /, and = padding). If the text contains other characters or isn't properly padded, it isn't valid Base64 and the calculator shows an error instead of garbled output.