Base64 Encode / Decode
Instantly encode text to Base64 or decode Base64 strings. Runs in your browser.
About the Base64 Encoder & Decoder
This Base64 encoder and decoder converts in both directions from one page, so there is no mode to switch. Unicode is handled through UTF-8, which means accented characters and emoji survive the round trip intact instead of coming back as question marks or corrupted bytes.
A Base64 encoder represents arbitrary bytes using 64 safe ASCII characters. It exists because many systems only reliably carry plain text — email attachments, HTTP basic auth headers, JSON string fields, data URIs and JWT payloads all use it to move data that is not text.
It is not encryption. Anyone can decode Base64 instantly, which is exactly why this page can. Encoding a password or token only obscures it from a casual glance; it provides no protection whatsoever.
Unicode is where simple implementations break, because Base64 works on bytes and JavaScript strings are UTF-16. Text is encoded through UTF-8 here, so "café" and emoji round-trip correctly rather than being corrupted. Note that Base64 makes data about 33% larger — that is the cost of the safety.
How to use the Base64 Encoder & Decoder
- Pick a direction. Choose encode to Base64, or decode from it.
- Paste your input. Enter plain text to encode, or a Base64 string to decode.
- Read the output. The converted result appears as you type.
- Copy it. Copy the encoded or decoded text.
Base64 Encoder & Decoder features
- Encodes and decodes from the same page, with no mode to switch
- Unicode handled through UTF-8, so accents and emoji survive the round trip
- Invalid Base64 reported rather than silently mangled
- Copy the result
- Runs in your browser; nothing is uploaded
Frequently asked questions
How does Base64 encoding work?
It maps every three bytes onto four characters drawn from a 64-symbol alphabet that survives text-only channels. The cost is size: encoded data is about a third larger than the original.
Is Base64 encryption?
No, and treating it as such is a real mistake. It is a reversible encoding with no key and no secret — anyone can decode it instantly. Use it for transport compatibility, never for protecting anything.
When should I use it?
When binary data has to travel through something that only handles text: embedding a small image in CSS or HTML, putting a certificate in a config file, or carrying a payload inside JSON.
Does it handle emoji and accented characters?
Yes. Text is converted to UTF-8 bytes before encoding, which is the step naive implementations skip — and skipping it is why some tools return question marks or corrupted characters after a round trip.
How is this different from URL encoding?
URL encoding escapes individual characters that are unsafe in a web address and leaves the rest readable. Base64 re-encodes everything into its own alphabet. Base64 output still needs URL encoding before it goes in a query string, since it can contain + and /.