Skip to content
Convertto

Base64 Encoder & Decoder

Encode and decode Base64 with automatic direction detection, plus file and data-URI support.

To encode or decode Base64, paste your text — the direction is detected automatically, so valid Base64 is decoded and anything else is encoded. Files can be encoded too, producing a ready-made data URI. Encoding is UTF-8 safe, so emoji and non-Latin scripts survive the round trip.

Runs in your browser
Direction
Detected automatically
Inputs
Text or any file up to 25 MB
Variants
Standard and URL-safe (base64url)
Overhead
Roughly 33% larger than the source
Privacy
Runs entirely in your browser — nothing is uploaded
Cost
Free, unlimited, no sign-up

Frequently asked questions

Is Base64 encryption?

No. Base64 is an encoding, not encryption — anyone can decode it instantly. It exists to move binary data through text-only channels, not to protect it.

What is base64url?

A variant that replaces + with - and / with _ and drops padding, so the result is safe inside URLs and filenames. JWTs use this variant.

How does auto-detection decide?

It checks whether the input is syntactically valid Base64 and whether decoding it produces mostly printable characters. Plain text that happens to look like Base64 fails that second test and is encoded instead.

Why is my Base64 bigger than the file?

Base64 represents every three bytes as four ASCII characters, so output is always about 33% larger. That is the cost of making binary data safe for text-only channels.

How to use the base64 encoder & decoder

  1. 1Choose the input.
  2. 2Enter or paste your text or base64.
  3. 3Select your file — the file stays on your device and is never uploaded.
  4. 4Choose the direction.
  5. 5Turn "URL-safe (base64url)" on or off as needed.
  6. 6Press Run, then download the result when it is ready.

Sources & specifications

Embed this tool

Put the working base64 encoder & decoder on your own site. It runs in your visitors' browsers exactly as it does here — free, no account, nothing uploaded.

Share this tool

Last updated

More encoders & decoders