Skip to content
NMSnabbit.

Base64 Encoder & Decoder

Encode text to Base64 or decode Base64 back to text — UTF-8 safe.

Encoders & Decoders Runs in your browser

What is Base64 encoding?

Base64 maps every 3 bytes of data onto 4 characters from a 64-symbol ASCII alphabet, which is why encoded output grows about 33% larger than the input. It exists so binary data can survive text-only channels: JSON, email, data URIs, JWT segments. This encoder is UTF-8 aware, so emoji and accented characters round-trip through encode and decode without corruption.

How to use the Base64 Encode / Decode

  1. 1 Drop in plain text or an existing Base64 string.
  2. 2 Switch between Encode and Decode depending on direction.
  3. 3 Review the converted output, which refreshes as you edit.
  4. 4 Take the result with the copy button.

What you can use it for

  • Embedding images or files as data URIs.
  • Encoding tokens or credentials for testing.
  • Decoding Base64 found in JSON, JWTs or emails.
  • Moving text safely through ASCII-only systems.

Frequently asked questions

What is Base64 encoding?
A scheme that represents arbitrary bytes using 64 safe characters: A–Z, a–z, 0–9, + and /, with = as padding. Three input bytes become four output characters.
Does it support emoji and accents?
Yes. Text is converted to UTF-8 bytes before encoding, so “héllo 🙂” decodes back exactly as typed. Naive btoa-based tools throw an error on those characters.
Why does decoding fail sometimes?
The input isn’t valid Base64: stray characters, a truncated string, or a URL-safe variant using - and _ instead of + and /. Ordinary line breaks are tolerated and stripped automatically.
Can I decode JWT segments with this?
Yes. Each of a JWT’s three dot-separated parts is Base64url; paste one part at a time, swapping - and _ for + and / if decoding complains. Header and payload decode to readable JSON.

Related tools

More Encoders & Decoders

More tools like this:

All Encoders & Decoders