Base64 Encode / Decode

Encode text to Base64 and decode Base64 to text, with UTF-8 support and an optional URL-safe alphabet. Accepts unpadded input. Free, in your browser.

Input
Result

About Base64 Encode / Decode

The Base64 Encode Decode tool turns text into Base64 and back, with full UTF-8 support, so accents and emoji survive the trip.

URL-safe option

Tick URL-safe to use - and _ instead of + and /, which is what tokens and URLs need.

Missing padding is fine

Base64 without the = signs at the end is decoded too.

Not encryption

Anyone can decode Base64, so never use it to hide passwords or secrets. It exists to carry special characters through systems that expect plain text.

Good for

Developers inspecting API payloads, building data URLs or reading the parts of a token.

Private

Everything runs in your browser. Your code and data are not uploaded.

How Base64 works

It reads your data three bytes at a time and writes them as four characters from a set of 64: A-Z, a-z, 0-9, + and /. That is why Base64 is about a third larger than the original.

Line breaks

Email (MIME) wraps Base64 at 76 characters per line. Decoders normally ignore those line breaks.

How to use Base64 Encode / Decode

  1. Type or paste your text, or the Base64 to decode.
  2. Tick URL-safe alphabet if you need - and _.
  3. Press Encode or Decode.
  4. Copy the result or download it.

Related guide: Base64 Explained: What It Is and When to Use It

Help & FAQ

What does the Base64 Encode Decode tool do?

It converts text to Base64 and Base64 back to text, using UTF-8.

Does it handle accents and emoji?

Yes. The text is encoded as UTF-8, so Wörld and the emoji in the test came back correctly after decoding.

What is the URL-safe alphabet?

A variant that uses - and _ instead of + and /, so the result can sit in a URL or token. In the test YT8+Yn5+ became YT8-Yn5-.

Does it accept Base64 without = padding?

Yes. In the test SGVsbG8 decoded to Hello.

What does This is not valid Base64 text mean?

The input has characters that are not Base64, or it decodes to bytes that are not text in UTF-8.

Can it decode images or files?

No. It decodes to text only. For pictures use the Image to Base64 and Base64 Image Viewer tools.

Is Base64 encryption?

No. It is a reversible encoding that anyone can decode. Do not use it to protect secrets.

Why is the Base64 longer than our text?

Base64 turns every 3 bytes into 4 characters, so the output is about a third larger.

Can we decode a JWT with it?

You can decode each part with the URL-safe option, but the JWT Decoder shows the header and payload in one step.

Why does our result end with ==?

Those are padding characters that make the length a multiple of four.

Can we open a file?

Yes. Use the Open .txt file button or paste the text.

Is our text uploaded?

No. The conversion runs in your browser.

More in Developer Tools

See all 39 in Developer Tools