Base64 Encoder & Decoder

Convert text to Base64 and back as you type. Emoji and every language work correctly, and decoded images or other files are recognised so you can preview or download them.

Encode or decode Base64

Updates as you type · UTF-8 safe.

Base64

Encoding options

Decoding accepts standard and URL-safe Base64, missing padding, line breaks and data URIs (data:…;base64,…).

How to use it

  1. Choose Encode or Decode at the top.
  2. Type or paste in the left box; the result appears on the right immediately.
  3. To encode a file (for example an image for a data URI), click "Encode a file". It is read on your device, not uploaded.
  4. Use Swap to turn the result into the next input, or Copy and Download to take it with you.

Good to know

Unicode done right
Text is converted to UTF-8 bytes before encoding, so "नमस्ते" or "😀" round-trip exactly. (The browser's built-in btoa() fails on these characters.)
URL-safe Base64
Base64URL replaces + and / with - and _ so the result can sit in URLs and file names. JWTs use it without padding. The decoder accepts both forms automatically.
Base64 is not encryption
Anyone can decode Base64. It only makes binary data safe to send as text; it does not hide it.

Frequently asked questions

Why is the Base64 output longer than my text?

Base64 uses 4 characters for every 3 bytes, so the result is about 33% larger. Non-English characters take 2–4 bytes each in UTF-8, which adds a little more.

What does "decodes to binary data" mean?

The bytes are not readable text — for example an image, PDF or ZIP file. The tool shows the first bytes in hex, previews images, and lets you download the file.

What is the padding (=) at the end?

Base64 works in groups of 4 characters; = fills the last group. Many systems (including JWTs) drop it, and this decoder accepts input with or without it.

Is there a size limit?

Text of several megabytes works fine. Files up to 15 MB can be encoded.

Say hello

Let’s connect.

Have an idea, a project, a collaboration — or just want to say hello? I read every message.

Write to me