Base64 Encode / Decode

Encode text to Base64 or decode Base64 back to text, entirely in your browser.

Encode Text to Base64

Decode Base64 to Text

What Base64 actually is

Base64 isn't encryption — it's a way to represent arbitrary binary data (or text) using only 64 printable ASCII characters (A–Z, a–z, 0–9, +, /), so it can be safely embedded in places that expect plain text, like JSON, URLs, or email. Anyone can decode it back instantly; it provides no confidentiality.

Where it shows up

Common uses include embedding small images directly in CSS or HTML (data URIs), encoding email attachments, and representing binary tokens or credentials in text-based protocols and config files.

Both conversions happen locally in your browser using the standard btoa/atob functions — nothing you type here is sent anywhere.

A worked example

Encoding the text Hello, CalcBundle! with Base64 gives SGVsbG8sIENhbGNCdW5kbGUh. Paste that string into the decoder and the original text comes back. Base64 turns every 3 bytes of data into 4 characters from a set of 64 safe characters, so the output is about a third longer than the input.

Tips for Base64

Base64 is an encoding, not encryption, so do not use it to hide passwords or secrets. It is used to carry binary data, such as images and files, through systems built for text, including email, JSON and data URLs. A string that ends in one or two equals signs is padding. If decoding fails, check for missing characters, line breaks or a URL-safe variant that uses - and _ in place of + and /.

You might also need: URL Encode / Decode, IP Subnet Calculator, Roman Numeral Converter, Bandwidth Calculator.

Common questions

Why does encoded text look longer than the original?

Base64 represents every 3 bytes of input as 4 output characters, so encoded text is roughly 33% longer than the original.

Can I use this to encode special characters and emoji?

Yes — text is converted to UTF-8 bytes before encoding, so non-English text and emoji round-trip correctly.

More Everyday Calculators

Pick another tool to jump straight to it.