Base64 Encoder & Decoder

Encode text or a file to Base64, or decode Base64 back to text or the original file. The result updates as you type.

  • Runs on your device
  • No sign-up
  • Free, no watermark
Loading the Base64 converter…

How to use the Base64 Converter

  1. 01Choose Encode or Decode. Switching keeps what you typed.
  2. 02To encode, type or paste text, or choose a file. To decode, paste Base64 or a data: URL.
  3. 03The result appears as you type. For a file, turn on Output as data: URL if you want a ready-to-use data: link.
  4. 04Copy the result or download it. Press Swap to send text output back the other way.

Good to know

Runs on your device

Text and files are converted by your browser. Nothing is uploaded.

Files as well as text

Encode any file up to 50 MB, or get it as a data: URL ready for HTML or CSS.

UTF-8 safe

Accented letters, Hindi, emoji and other non-English text encode and decode correctly.

Files come back as files

If decoded Base64 isn't text, you can download it, with a preview for images. SVG images are previewed above their code.

Frequently asked questions

What is Base64?

A way of writing binary data with 64 plain characters (A–Z, a–z, 0–9, + and /). It's used to embed images in HTML or CSS and to send data through systems that only handle text.

Is Base64 a form of encryption?

No. It's an encoding, not encryption, and anyone can decode it. Never use it to protect passwords or secrets.

Are my text and files uploaded?

No. Encoding and decoding happen in your browser, and nothing you enter or choose leaves your device.

Why is the Base64 bigger than the original?

Base64 uses 4 characters for every 3 bytes, so encoded data is about a third larger than the original.

Which kinds of Base64 can it decode?

Standard Base64, the URL-safe variant that uses - and _, text broken over several lines, Base64 without = padding, and full data: URLs such as data:image/png;base64,…

Is there a size limit?

Files up to 50 MB can be encoded. Very long output is shortened on screen to keep the page responsive, but Copy and Download always give you all of it.

Related tools