Base64 Encode & Decode

UTF-8 Base64 encode and decode that keeps Korean and emoji intact, with a URL-safe variant. Your text never leaves your browser.

How do I Base64-encode text that contains Korean?

It uses UTF-8 so Korean stays intact, both encoding and decoding.

Encode, decode and URL-safe

Why don't characters break?

Base64 works on bytes. This tool converts text to UTF-8 bytes before encoding and reads it back as UTF-8 when decoding, so multibyte characters like Korean and emoji round-trip exactly.

More text tools for developers

How this tool calculates

Worked example

Encoding "Man" gives "TWFu", and "안녕👋" gives "7JWI64WV8J+Riw==". These come from running the tool's own encode function, and decoding them returns the original text unchanged.

Things to know before you use it

The full counting rules and the sources for service limits are on Methods and standards.

Frequently asked questions

Why do Korean characters and emoji survive intact?

The input is converted to UTF-8 bytes first and then Base64-encoded. Calling btoa directly on text breaks on multibyte characters like Korean or emoji, so this tool uses TextEncoder to build UTF-8 bytes before encoding, and decodes back through UTF-8 to restore the original exactly.

What is URL-safe Base64?

Standard Base64 uses + and /, which have special meaning in URLs and file names. URL-safe mode replaces + with - and / with _ and drops the trailing = padding, so the result can go straight into a query string, path or file name. Decoding accepts both variants.

Why does decoding fail sometimes?

Decoding fails if the input contains non-Base64 characters (whitespace is allowed), has a length that is not a multiple of four, or decodes to bytes that are not valid UTF-8. Check that the string is valid Base64 and that no characters were dropped.

Can I encode images or files?

No. This tool is text-only. It encodes and decodes the characters you type or paste, interpreted as UTF-8. Binary data such as images or files is out of scope.

Is my text sent to a server?

No. All encoding and decoding happens in your browser. Whatever you paste is never sent or stored on a server.

More text tools