Base64 Encode / Decode

Encode any text (including emoji and non-Latin characters) to Base64, or decode a Base64 string back to plain text. Runs entirely in your browser, with no data sent anywhere.

PrivateFreeWorks offline

Reviewed by Vincenzo Manto, Founder & Lead Developer · Last updated September 27, 2026

How it works

  1. 1

    Type or paste text into the input box, or paste a Base64 string.

  2. 2

    Pick Encode or Decode mode.

  3. 3

    The result updates instantly in the output box as you type.

  4. 4

    Copy the encoded or decoded result with one click.

Example

Text
Hello, World!
Base64
SGVsbG8sIFdvcmxkIQ==

When you need Base64 encoding

Base64 shows up constantly in web development: embedding small images as data URIs, packing binary data into JSON or URLs, or reading Basic Auth headers. This tool lets you encode or decode a string in a second without opening a terminal or writing a one-off script.

Why UTF-8 handling matters here

A common gotcha with Base64 in JavaScript is that the native btoa() function throws or produces garbage on non-Latin1 text. This tool encodes through UTF-8 first, so pasting Japanese, Arabic, or emoji-heavy strings produces the same output a backend implementation would give you.

If you're actually debugging a token, not a string

Pasting a JWT's middle segment here will decode the raw base64url, but it won't split the three segments, flag which one is the header versus the payload, or convert exp/iat timestamps to readable dates. For that, use the dedicated JWT decoder instead - it's built specifically for that structure.

Frequently asked questions

Is my text sent anywhere when I encode or decode it?

No. Encoding and decoding use the browser's built-in TextEncoder/TextDecoder and btoa/atob APIs, so everything happens on your device with no network request involved.

Does it handle emoji and non-Latin characters correctly?

Yes. Unlike the raw btoa() function, which chokes on characters outside Latin1, this tool first converts text to UTF-8 bytes, so emoji, accented letters, and CJK characters encode and decode correctly.

What happens if I paste invalid Base64 to decode?

You'll get a clear error message instead of garbled output, since malformed Base64 (wrong padding or invalid characters) can't be decoded reliably.

Is Base64 the same as encryption?

No. Base64 is a reversible encoding, not encryption. Anyone can decode it instantly, so it shouldn't be used to protect sensitive data, only to represent binary-safe text.

Can I encode a file, not just text?

This tool is built for plain text input. For binary files you'd typically encode the file's bytes with a script, since pasting raw binary into a text box isn't practical.

Related tools