Base64 Encoder

Encode or decode Base64 text and files, safely and locally.

Encode and decode Base64 without leaking data

Base64 shows up everywhere: data URLs in CSS, attachments in email, tokens in APIs, binary payloads inside JSON. It is not secret, but the data inside often is.

This tool runs in your browser, so a token or a private key never touches a server.

How to use it

  1. Choose Text or File.
  2. Pick a mode, encode or decode.
  3. Choose standard or URL safe alphabet.
  4. Copy the result.

For text, the conversion is instant. For files, the tool reads the bytes and returns a single string.

Standard and URL safe

Standard Base64 uses +, / and = padding. It is the default in most languages.

URL safe Base64 replaces + with - and / with _, so the value can sit inside a URL or a filename without escaping.

If you are pasting a token into a query string and it contains a plus sign, it will often be read as a space. That is the single most common Base64 bug in the wild. Use the URL safe variant there.

What Base64 is good for

  • Embedding small images directly in HTML or CSS.
  • Sending binary data through systems that only accept text.
  • Storing small payloads in JSON.
  • Basic authentication headers, which use Base64 internally.

What it is not good for

  • Security. Base64 is reversible by anyone. Use real encryption for secrets.
  • Compression. Encoding makes data about 33 percent larger, not smaller.
  • Large files. A 10 MB image becomes roughly 13 MB of text and will slow any page that includes it.

A quick sanity check

If you decode a value and get unreadable characters, you probably used the wrong alphabet or the string was truncated. Padding matters too. A Base64 string should be a multiple of four characters, padded with = if needed.

For hashing values rather than encoding them, use Hash Generator. For pretty printing a JSON payload that contains Base64, JSON Formatter is the next step.

Questions

Frequently asked

Is Base64 encryption?

No. Base64 is an encoding, not encryption. Anyone can decode it instantly. Never use it to hide passwords or secrets.

Why does my Base64 look different from another tool?

There are three common variants. Standard Base64 uses + and /. URL safe replaces them with - and _. Some systems also wrap lines at 76 characters. Check which variant your target system expects.

Does it handle emoji and non Latin text?

Yes. Text is encoded as UTF-8 first, so emoji, Arabic, Chinese and accented characters all round trip correctly.

Can I encode a file?

Yes. Choose a file and the tool produces a Base64 string you can embed in JSON, CSS or an email template.

Is my data uploaded?

No. Encoding and decoding happen in your browser.