Base64 Encoder/Decoder

Instantly encode & decode Base64 text

How it works:

Convert text to Base64 encoding or decode Base64 back to plain text. Useful for encoding data, API calls, or handling binary content in text format.

Plain Text

Supports UTF-8 text including special characters and emojis.

Base64 Encoded

Paste encoded text here to decode back to plain text.

This tool converts text to Base64 and back. Type or paste plain text on the left to encode it; paste a Base64 string on the right to decode it. Everything happens in your browser — nothing you enter is uploaded or stored.

What is Base64?

Computers store everything as raw bytes, but many of the channels we push data through — email headers, URLs, JSON and XML payloads, HTTP headers — were designed for a limited set of printable text characters. Send raw bytes through them and things get mangled. Base64 solves this by reversibly mapping every 3 bytes (24 bits) of input to 4 printable characters drawn from a 64-character alphabet: A–Z, a–z, 0–9, + and /. The result is safe to move anywhere plain text goes.

When the input length isn't a multiple of 3, Base64 pads the end with one or two = characters. Because 3 bytes become 4 characters, encoded output is always about 33% larger than the original.

When and why you'd use it

Worked examples

ManTWFu
Three bytes (M, a, n) map cleanly to four characters — no padding needed.
HiSGk=
Two bytes leave a remainder, so one = pads the output.
✓ café4pyTIGNhZsOp
Unicode is UTF-8 encoded to bytes first, so accents and symbols round-trip correctly.

Frequently asked questions

Is Base64 encryption?

No — and this matters. Base64 uses no key and no secret: anyone who sees the string can decode it instantly (this page will do it). It only changes the representation of data, not its secrecy. Never use Base64 to "hide" passwords, tokens, or personal data.

Why is my encoded text longer than the original?

Base64 turns every 3 bytes into 4 characters, so the output is roughly 33% larger. That overhead is the price of making binary data text-safe.

What is "base64url"?

A URL- and filename-safe variant that replaces + and / with - and _ and often drops the = padding. It's used in JWTs and query strings.

Does it work with emojis and other languages?

Yes. Text is UTF-8 encoded before Base64, so emojis and non-Latin scripts encode and decode without loss.

Why does decoding sometimes fail?

The input isn't valid Base64 — usually stray spaces, missing padding, or characters outside the Base64 alphabet.

Not a security tool. Base64 is reversible by anyone with no key. Treat an encoded string as fully readable — don't rely on it to protect secrets.