Base64 Encode & Decode
Convert text to Base64 and back in one click — with correct Unicode and emoji handling, right in your browser and nothing uploaded.
Quick answer
Base64 encoding rewrites data using 64 safe characters so it can travel through text-only channels without being corrupted. Switch to Encode and paste any text to get its Base64 form, or switch to Decode and paste Base64 to read it back. Because the text is converted to UTF-8 first, emoji and accented or non-Latin characters round-trip correctly. Everything runs privately in your browser.
What Base64 is for
Base64 turns arbitrary bytes into a string of 64 printable ASCII characters (A–Z, a–z, 0–9, plus + and /). That matters whenever data has to pass through a system that only understands text: embedding a small image directly in HTML or CSS as a data URI, carrying binary inside JSON or a JWT, encoding email attachments, or storing credentials in an HTTP Basic Authorization header. It trades size for safety — encoded output is about a third larger than the original.
Encoding is not encryption
It is worth repeating: Base64 offers no security. Anyone can decode it in a moment, exactly as this page does, so it must never be used to hide passwords, API keys or personal data. If you need confidentiality, reach for real encryption. Base64 solves a transport problem, not a privacy one.
Getting Unicode right
The classic bug is encoding text with characters beyond basic ASCII. The raw btoafunction only handles bytes 0–255, so passing it an emoji or an accented letter throws an error or mangles the output. This tool first converts your text to UTF-8 bytes and encodes those, then reverses the process on decode — so café, naïve and full emoji all survive intact. When decoding, stray spaces and line breaks are ignored so pasted blocks just work.
Private by design
Because encoding and decoding happen on your own device, you can safely convert tokens, payloads and confidential text. Nothing is uploaded, stored or logged, and the tool keeps working offline.
Frequently asked questions
Is my text uploaded to a server?+
No. Encoding and decoding happen entirely in your browser with JavaScript. Nothing you type or paste is uploaded, logged or seen by anyone — it never leaves your device, so it is safe for private data.
What is Base64 and when should I use it?+
Base64 represents binary or text data using 64 safe ASCII characters. It is used to embed images in CSS or HTML (data URIs), to carry data in JSON, JWTs and email attachments, and anywhere raw bytes need to travel through a text-only channel without corruption.
Is Base64 encryption?+
No. Base64 is encoding, not encryption — it scrambles nothing and protects nothing. Anyone can decode it back instantly, exactly like this tool does. Never use Base64 to hide passwords or secrets; use real encryption for that.
Does it handle emoji and non-English characters?+
Yes. Input is converted to UTF-8 bytes before encoding, so emoji, accents and non-Latin scripts survive the round trip intact. Naive encoders that skip this step corrupt any character outside basic ASCII.
Why do I get an error when decoding?+
Decoding fails when the input isn't valid Base64 — for example it contains characters outside the Base64 alphabet, or the length and padding are wrong. The tool ignores spaces and line breaks automatically, but genuinely malformed input will show an error rather than a wrong result.