Base64 Encode & Decode

Type text to encode it to Base64, or paste a Base64 string to decode it back to text. You can also drop a file to convert it to a Base64 data URL.

Drop a file here or click to upload

Any file type supported

Features

Text encode / decode
File to Base64
Base64 to file download
Auto-detect input
Show encoded size

How to Use

1. Pick Encode or Decode at the top.

2. Type or paste your input on the left, OR drop a file into the upload zone.

3. Click Process — the result appears on the right.

4. Click Copy to copy the result.

About this tool

Base64 turns any bytes into 64 safe text characters so binary data can travel through places that only accept text: JSON payloads, email bodies, data URLs, or HTTP headers. Every three bytes become four characters, which is why encoded data is about a third larger than the original. This tool encodes text as UTF-8 first, so accented letters, Chinese, Arabic and emoji survive a round trip intact. Drop a file to get it as a Base64 data URL you can paste into CSS or HTML, and paste an encoded string to turn it back into readable text. If you paste something that already looks like Base64 while in Encode mode, the tool switches to Decode for you.

Frequently Asked Questions

Is Base64 a form of encryption?
No. Base64 is an encoding, not encryption: anyone can reverse it without a key. Never use it to hide passwords, tokens, or personal data. It only makes binary data safe to transport as text.
Why is the encoded output larger than my input?
Base64 represents every 3 bytes with 4 characters, so the output is roughly 33% bigger, plus up to two "=" padding characters at the end. The Ratio line shows the exact size difference for files.
Does it handle non-English text and emoji?
Yes. Text is converted to UTF-8 bytes before encoding and decoded back from UTF-8, so characters such as é, 中文, العربية or 🎉 come back exactly as they were typed.
What is a data URL, and when should I use one?
A data URL embeds a file directly in text, like data:image/png;base64,iVBOR…. It is convenient for tiny icons in CSS or HTML emails, but large images are better served as separate files because data URLs cannot be cached on their own.
Why does decoding fail with "Invalid Base64 string"?
The input contains characters outside the Base64 alphabet, has been truncated, or uses the URL-safe variant with - and _ instead of + and /. Remove line breaks or quotes around the string, and replace - and _ before decoding if needed.

Related Tools