Tool 004 / dev / free / runs locally
Base64 Encoder and Decoder
Convert text to Base64 or decode a Base64 string back to readable text. The tool handles full Unicode using UTF-8, so emoji and accented characters round-trip correctly. Everything runs in your browser.
SGVsbG8sIFRvb2xzIE5pbWJ1cw==
How it works
Base64 represents arbitrary bytes using only 64 printable ASCII characters (A to Z, a to z, 0 to 9, plus, and slash), so binary or non-ASCII data can travel safely through systems that expect plain text, such as email bodies, JSON fields, and data URIs. This tool encodes the text you type and decodes Base64 back to text, switching with the Encode and Decode buttons.
It is UTF-8 safe. On encode, your text is first turned into UTF-8 bytes with TextEncoder, then those bytes are Base64-encoded, so accented letters, emoji, and other multi-byte characters survive a round trip. On decode it reverses both steps. That two-step approach avoids the classic bug where plain btoa garbles anything outside Latin-1.
Everything runs in your browser tab. Because Base64 is an encoding and not encryption, anyone can decode it; never treat a Base64 string as a way to hide a secret. It only makes binary data text-safe.
How to use it
- Choose Encode (text to Base64) or Decode (Base64 to text).
- Type or paste your content into the left box.
- Read the converted result on the right.
- Click Copy to grab the output.
Worked examples
Input: Encode: Hello, Tools Nimbus
Output: SGVsbG8sIFRvb2xzIE5pbWJ1cw==
The == padding marks that the final group was short by two bytes.
Input: Decode: 4pyTIGNhZsOp
Output: A check mark followed by café, proving multi-byte UTF-8 round-trips.
Plain atob would mangle this; the UTF-8 decode step fixes it.
Edge cases and limits
- Decoding expects standard Base64 (with + and /). URL-safe Base64 that uses - and _ will fail; convert those characters first.
- Stray whitespace or line breaks inside a Base64 string can trigger an Invalid Base64 input error. The decoder trims surrounding whitespace but does not strip internal newlines.
- Base64 inflates size by about 33 percent, so encoded output is always longer than the original.
Common mistakes
- Treating Base64 as encryption. It is fully reversible by anyone and offers zero confidentiality.
- Pasting a data URI prefix like data:image/png;base64, into the decoder. Remove everything up to and including the comma first.
- Forgetting padding. Truncating the trailing = characters from a valid string can make it undecodable.
Frequently asked questions
Does this handle Unicode and emoji?+
Yes. We encode and decode using UTF-8 byte handling, so accented letters, emoji, and other non-ASCII characters survive the round trip without corruption.
Why do I get an error when decoding?+
Decoding fails when the input is not valid Base64, for example if it contains stray spaces, line breaks, or characters outside the Base64 alphabet. Clean up the input and try again.
Is Base64 a form of encryption?+
No. Base64 is encoding, not encryption. It only changes how data is represented and offers no security. Anyone can decode it, so never use it to protect secrets.
Related tools
More Developer tools that run entirely in your browser.