Base64 to Text Decoder
Decode Base64 to readable UTF-8 text, or switch to encode mode and turn text into Base64.
Input
Output
What Is Base64 to Text?
Base64 is an encoding scheme that turns binary data into printable ASCII characters: you've probably seen it in email attachments, HTTP Authorization headers, or MIME messages. This tool does the reverse: paste a Base64-encoded string and you get the original plain text back immediately. It also works the other way: type or paste any text and get a Base64 string you can use in browser scripts, data URIs, or API payloads.
The decoder handles UTF-8 properly, so emojis, Chinese characters, and accented letters all decode correctly. The decoding is done by script in the page, so the strings you paste stay on your own computer.
How to Use This Tool
Choose Mode
Decode turns a Base64 string back into readable text, and Encode goes from text to Base64. Both directions treat the text as UTF-8, so a word like Zürich or an emoji comes through unchanged.
Paste Input
Paste into the left editor: the part after Basic in an Authorization header, an encoded email subject, a value from a log line. A data:text/plain;base64, prefix is stripped for you. Sample drops in the Basic auth pair maeve:cold-harbour-42 or its Base64 form, and Upload opens a .txt or .b64 file.
Copy or Download Result
The result shows up on the right about 300 ms after you stop typing. Input that is not Base64, or bytes that are not valid UTF-8, produce an error message there instead. Copy grabs the text, and Download writes decoded.txt or encoded.txt.
Example
Decoding the credentials from an Authorization: Basic header, which is just user:password in Base64 and no protection on its own:
Base64 Input
Text Output
Frequently Asked Questions
How does Base64 decoding work?
Base64 represents binary data using 64 printable characters (A–Z, a–z, 0–9, +, /). Each Base64 character stores 6 bits, so every 4 Base64 characters decode to 3 bytes of original data. The browser's built-in atob() function handles this conversion. This tool wraps it with UTF-8 handling so non-Latin characters decode correctly too.
Why does my Base64 string end with "=" or "=="?
The = characters are padding. Base64 works on groups of 3 bytes and turns each group into 4 characters; when the byte count does not divide evenly by 3, padding fills out the final group so the output length stays a multiple of 4. One = means 1 byte of padding was added; == means 2 bytes. The decoder handles both automatically. See the RFC 4648 spec for the full details.
Does this handle UTF-8 characters like emojis or Chinese text?
Yes. The raw atob() function only handles Latin-1, but this tool wraps it with decodeURIComponent(escape(atob(...))) to properly reconstruct UTF-8 text. So Base64-encoded strings containing emoji, Arabic, Japanese, or any Unicode text will decode correctly.
My string contains - and _ characters. Why won't it decode?
Standard Base64 uses + and / as the last two characters, which are not URL-safe. Base64url (defined in RFC 4648 §5) replaces them with - and _. If you have a Base64url string, replace - → + and _ → / before decoding, or use our dedicated Base64 URL Decoder.
Is my text kept private when I use this tool?
Absolutely. Encoding and decoding both happen in the page itself, so whatever you paste (tokens, config values, log snippets) stays local. Keep the Network tab open while it works and you'll see no requests at all.
Can I encode multi-line text or large strings?
Yes, there is no length limit imposed by this tool. The editor accepts any text you paste or type, including multi-line content. Keep in mind that very large inputs may take a moment depending on your browser's JavaScript performance.
Related Tools
Padding and alphabet rules are in RFC 4648. MDN's Base64 glossary walks through the Unicode problem that the UTF-8 handling on this page works around, and the Wikipedia article has a worked table showing how three bytes become four characters.