Skip to content

Base64 Encoder

Turn any text, emoji included, into Base64 that travels safely through text-only channels.

What is Base64 encoding?

Just 64 safe ASCII characters. A–Z, a–z, 0–9, plus + and /, with = as padding: are enough to carry any data at all. That's Base64. It takes data three bytes at a time and rewrites each group as four characters from that alphabet, so systems that only handle plain text: email bodies, JSON strings, URLs, config files: can carry anything. Type your text here and the encoder converts it to UTF-8 bytes, then produces the encoded string instantly.

Two properties surprise people. The output runs about a third longer than the input: that's the price of the safe alphabet, not a bug. And Base64 is an encoding, not encryption: anyone reverses it in a second, so it hides nothing and protects nothing. Trailing = signs, one or two of them, are normal padding. Some contexts. URLs, filenames: use a "URL-safe" variant that swaps + and / for - and _.

When the strings you're encoding belong to a larger dataset, the originals and their encoded forms can sit side by side as columns in a Ferra table, one row per value.

How the Base64 Encoder works

Paste text into the box and the encoded string shows up as you type. Your text becomes UTF-8 bytes first, which is why accented characters and emoji come through intact, and those bytes map onto the Base64 alphabet, with = padding added whenever the byte count isn't a multiple of three.

Text
Whatever you need encoded, from one word to a whole document. Full UTF-8 support means accents, non-Latin scripts, and emoji all round-trip correctly.

What the output means

Hello, world! encodes to SGVsbG8sIHdvcmxkIQ==. Count it: 13 input bytes, 20 output characters: four Base64 characters for every three bytes, with two = signs padding out the final group. Multi-byte text grows the same way; café becomes Y2Fmw6k= because the é takes two bytes in UTF-8.

Gibberish-looking output tempts people into treating it as secret. Encoded API keys and passwords end up pasted into tickets, repos, and logs on the theory that they're safe: they're not, and decoding takes one paste into a decoder. Sensitive data needs encryption or omission. Base64 is neither.

When to use the Base64 Encoder

The everyday case is stuffing awkward content into a format that only tolerates plain text. A multi-line certificate has to live in a single-line environment variable; a binary-ish payload has to ride inside a JSON field. Basic HTTP authentication headers carry credentials as Base64 too. Each time, the encoding exists so the surrounding format doesn't choke on quotes, newlines, or unusual bytes.

It earns its keep in testing as well. Need a known Base64 payload for a test, or want to see what a webhook receives after your system encodes a field? Encoding the value by hand shows you the exact string the other side should see: character for character.

Tips for the Base64 Encoder

Most Base64 confusion comes from the details around the encoding rather than the encoding itself. These points cover the usual traps.

Never mistake it for encryption
Base64 reverses trivially. Sensitive data stays sensitive after encoding, and is now easier to overlook.
Budget for the size increase
Output runs roughly 33% larger than input. Check length limits against the encoded size, not the original.
Know which variant you need
URLs and filenames usually want the URL-safe alphabet, with - and _ standing in for + and /. Match whatever the receiving system specifies.
Keep the padding
Trailing = signs are part of the encoding. Some systems tolerate their absence; stripping them by hand is a reliable way to make a string others can't decode.
Encode the exact bytes
A trailing newline or space changes the output completely. When two encodings of the "same" text differ, invisible whitespace is the usual culprit.

Related templates

Browse all templates