Understanding Base64 Encoding and Decoding
What Base64 encoding does
Base64 represents data using a fixed set of 64 printable characters — the letters A–Z and a–z, the digits 0–9, and the two symbols + and /. This tool takes plain text you type or paste and rewrites it in that alphabet, and it runs the reverse just as easily: paste a Base64 string and it reconstructs the original text.
A single mode switch flips between the encode and decode directions, so you can go back and forth without reloading, and the converted result appears the moment you run it, ready to copy.
A concrete example
Base64 processes three bytes at a time. Those three 8-bit bytes are regrouped into four 6-bit chunks, and each chunk selects one character from the alphabet. Take the word Man: its bytes become four values that map to T, W, F, and u, so Man encodes to TWFu.
When the input length is not a multiple of three, one or two = characters are added as padding. Hello World, for instance, encodes to SGVsbG8gV29ybGQ=, where the trailing = signals that padding was needed to complete the final group.
When to reach for it
Base64 is the standard way to carry data that is not plain text through channels that only accept text. You might decode a segment of a JSON Web Token (JWT) to inspect its claims, read the credentials tucked inside an HTTP Basic Auth header, or unpack a value pulled from a cookie, config file, or API response to see what it really holds.
In the other direction, encoding lets you embed a small image directly in HTML or CSS as a data URI, or paste binary-ish content somewhere plain text is expected without it being mangled.
Notes and edge cases
Text is treated as UTF-8 before encoding, so accented letters, CJK characters, and emoji survive a full round trip intact. Decoding checks the input first: a string containing characters outside the Base64 alphabet, or with broken padding, is rejected with a clear error rather than returning garbage.
This tool uses the standard alphabet with + and /; the URL-safe variant that swaps those for - and _ is a related but separate encoding. Keep in mind that Base64 is an encoding, not encryption — it hides nothing on its own, since anyone can decode the result back to the original.