Base64 Encode / Decode
Free Base64 encoder and decoder. Convert text or files to Base64 and back instantly in your browser — Unicode-safe, with URL-safe and data-URI options.
🔒 Everything runs in your browser — nothing is uploaded, including files you encode. Tip: press Ctrl+Enter to convert.
Free Base64 Encode & Decode Tool
This free online Base64 encoder and decoder converts text to Base64 and back instantly. It’s fully Unicode-safe, so emoji and non-English text encode correctly, and it can also turn any file into Base64 (and decode Base64 back into a downloadable file). Everything runs in your browser — your text and files never leave your device.
How to encode or decode Base64
- Pick a mode — Encode → Base64 or Decode → Text.
- Paste your text or Base64 on the left (or click Load sample). It converts as you type.
- To encode a file, click 📎 Encode a file and choose any file.
- Tick URL-safe for Base64URL output, or Data URI to wrap it as a
data:URI you can embed in HTML or CSS. - Use Copy or Download to save the result, and Swap to flip the output back into the input.
What is Base64, and when is it used?
Base64 is a way of representing binary data (or any text) using only 64 safe ASCII characters
— A–Z, a–z, 0–9, + and /.
It lets you move data through systems that only handle text, such as email (MIME), JSON payloads, URLs and HTML
attributes, without it getting corrupted.
You’ll see Base64 used to embed small images directly in CSS or HTML as data: URIs, to send
files inside JSON APIs, in JWT tokens, and in basic HTTP authentication headers. Note that Base64 is
encoding, not encryption — it’s easily reversible and offers no security, so never
use it to protect passwords or sensitive data. The URL-safe variant swaps + and
/ for - and _ so the result is safe inside URLs.
Frequently asked questions
Is this Base64 tool free and private?
Does it handle emoji and non-English text?
btoa() call, which breaks on non-Latin1 characters.What is the difference between Base64 and URL-safe Base64?
+ and /, which have special meaning in
URLs. URL-safe Base64 replaces them with - and _ and usually drops the =
padding, so the string can be placed in a URL or filename safely. Tick URL-safe to use it.Can I convert a file or image to Base64?
data: URI for embedding. When decoding, use
Download to save the decoded bytes back as a file.