Base64 Encode / Decode
Encode text to Base64 or decode it back, with full UTF-8 and emoji support. Free, instant, and processed entirely in your browser.
Encode text to Base64 or decode a Base64 string back to readable text, with full UTF-8 support so emoji and accented characters survive the round trip. Base64 exists because many systems carry only plain ASCII: an image embedded directly in a stylesheet, a token in an HTTP header, an attachment in a mail body, or a value in a JSON payload that must not contain raw binary. It makes data about a third larger and hides nothing, which is exactly why it must never be mistaken for encryption. Encoding and decoding both run in your browser, so a token or a key you paste here is never transmitted.
How to use Base64 Encode / Decode
- Paste the text or Base64 string you want to convert.
- Click "Encode" to convert text to Base64, or "Decode" to reverse it.
- Copy the output with the "Copy" button.
- Encode and then decode the same value to confirm a round trip if you are checking a string that was produced elsewhere.
Who it is for
Base64 Encode / Decode is for moving binary or unusual text through a channel that only carries plain characters: an image embedded in a stylesheet, a token in a header, an attachment in a mail body, or a string that keeps getting mangled by encoding.
How it works
- Text is converted to and from Base64 with full UTF-8 support, so emoji and accented characters survive a round trip.
- Encoding and decoding both happen in the browser, which matters for a token or a key that should not be pasted into a server.
- A round trip is lossless: decode(encode(x)) returns the original exactly.
What it cannot do
- Base64 is not encryption and not compression — it makes data about a third larger and hides nothing from anyone who looks.
- A truncated or padded string decodes incorrectly; missing padding at the end is a common cause of a failed decode.
- Binary files are better handled by a dedicated tool than by pasting their Base64 into a text box.
- Line breaks inside a Base64 string are tolerated, but other characters are not.
Frequently asked questions
What is Base64 used for?
Base64 encodes binary or text data into a plain-ASCII string so it can travel safely through systems that expect text, such as email, data URLs, and JSON payloads. It is a transport encoding, not a security measure.
Is Base64 encryption?
No, and this is the mistake worth avoiding. Base64 is a reversible encoding with no key: anyone who receives the string can decode it in one step. It protects data from being mangled by a text-only channel, not from being read.
Does it support emoji and accents?
Yes. The tool is UTF-8 safe, so characters like é, ñ, and 😀 encode and decode correctly without corruption. Encoding in one character set and decoding in another is the usual cause of mojibake in other tools.
Why do I get "not valid Base64"?
The input contains characters that are not part of the Base64 alphabet, or its length is wrong. Make sure you pasted the complete, unmodified string — a truncated copy is the most common cause, and a line break in the middle is usually harmless.
Why is the encoded output longer than the input?
Because Base64 represents every three bytes as four ASCII characters, which is an increase of about a third. That overhead is the price of making binary safe for a text channel.
Should I paste a password or private key here?
It is safe in the sense that nothing is uploaded, but Base64 offers no protection: the value sits in the page and on your clipboard. Treat any encoded secret as still exposed.