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.

✓ Free ⚡ Instant 🔒 100% private
Text to encode 0 chars
Base64 result

      

🔒 Everything runs in your browser — nothing is uploaded, including files you encode. Tip: press Ctrl+Enter to convert.

Advertisement

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

  1. Pick a modeEncode → Base64 or Decode → Text.
  2. Paste your text or Base64 on the left (or click Load sample). It converts as you type.
  3. To encode a file, click 📎 Encode a file and choose any file.
  4. Tick URL-safe for Base64URL output, or Data URI to wrap it as a data: URI you can embed in HTML or CSS.
  5. 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?
Yes. It’s completely free with no sign-up, and all encoding and decoding happen in your browser with JavaScript. Your text and any files you encode are never uploaded to a server.
Does it handle emoji and non-English text?
Yes. The tool encodes text as UTF-8 before converting to Base64, so emoji, Hindi, Arabic, accented characters and any other Unicode are handled correctly in both directions — unlike a plain btoa() call, which breaks on non-Latin1 characters.
What is the difference between Base64 and URL-safe Base64?
Standard Base64 uses + 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?
Yes. Click Encode a file and pick any file — an image, PDF or document — to get its Base64 string, optionally as a data: URI for embedding. When decoding, use Download to save the decoded bytes back as a file.
Is Base64 a form of encryption?
No. Base64 is just an encoding — anyone can decode it instantly, as this tool shows. It provides no security at all, so never use it to hide passwords or sensitive information. Use real encryption for that.
Advertisement