Base64 Encode / Decode

Encode text to Base64 or decode Base64 back to text — fully Unicode-safe.

Output will appear here.

What This Tool Does

This tool converts plain text into Base64 — a text-safe representation of the same data — and converts Base64 back into the original text. It correctly handles any Unicode input, including accented letters, emoji, and non-English scripts, not just plain ASCII.

How to Use It

Type or paste text into the input box and click Encode to get its Base64 representation, or paste Base64 text and click Decode to recover the original text. The result appears below with a Copy button. If the input isn't valid Base64 when decoding, or doesn't decode to valid text, you'll get a clear error instead of garbled output.

The Formula

Encoding first converts your text into its raw UTF-8 bytes using the browser's TextEncoder, then maps those bytes through the standard 64-character Base64 alphabet via btoa. Decoding reverses this: atob recovers the raw bytes, and TextDecoder reinterprets them as UTF-8 text. Routing through UTF-8 bytes explicitly — rather than calling btoa directly on the text — is what makes this correct for non-English and emoji input; a naive direct call only works for plain ASCII/Latin1 characters and breaks or throws on anything else.

A Worked Example

Encoding the plain ASCII text "Hello, World!" produces SGVsbG8sIFdvcmxkIQ==. Encoding "café ☕ 😀" — text with an accented letter and two emoji — still produces a correct, decodable result, and clicking Decode on that output returns the exact original string, accents and emoji intact. A naive btoa-only implementation would throw an error on that second example instead of producing usable output.

Encoding vs. Encryption

Base64 is not a security or privacy measure.It's a reversible, publicly documented encoding — anyone can decode a Base64 string back to its original text instantly, using this exact tool or any of dozens of others, with no key, password, or secret of any kind required. If you see a Base64 string in a URL, an API token, or a config file, treat its contents as fully visible to anyone who looks at it, not as protected data.

Base64's real purpose is representing binary or non-text data safely inside contexts that only support plain text — embedding an image inside a JSON payload, attaching a file to an email, or including binary data in a URL. It solves a compatibility problem, not a confidentiality problem. If you actually need to keep data secret, that requires real encryption with a key — Base64 provides none of that.

FAQ

Is Base64 encryption?
No. Base64 is not a security measure — anyone can decode it instantly with no key or password. It only represents data as text; see the Encoding vs. Encryption section above.
Does this handle accented letters and emoji correctly?
Yes. It encodes text via its UTF-8 bytes rather than a naive character-by-character approach, so accented letters, emoji, and non-English scripts all round-trip correctly.
Is my text sent to a server?
No, all encoding and decoding happens directly in your browser. Your text never leaves your device.