Join the Official Discord

Base64 decode and encode

Paste Base64 to decode it, or type text to encode it. Both boxes update live.

What Base64 is

Base64 writes any data using 64 characters that survive anywhere: A–Z, a–z, 0–9, + and /. Every three bytes of input become four characters of output, and one or two = signs pad the end when the input doesn't divide evenly. Email attachments, data URLs and web tokens all use it.

It isn't encryption. There's no key, and the tool above decodes anything that's valid Base64. Puzzle setters like it because it makes a short message look like a long, technical string.

Recognising it

  • Upper and lower case letters and digits, mixed with no obvious pattern.
  • A length that's a multiple of 4.
  • Often ends in = or ==.
  • English text encodes to recognisable starts. Anything beginning VGhl starts with “The”, and SGVsbG8 is “Hello”.

Text, UTF-8 and URL-safe Base64

Text is converted to UTF-8 bytes before encoding, so accents, other alphabets and emoji all round-trip correctly. The decoder accepts the URL-safe alphabet (- and _ in place of + and /) and missing padding without being told. Tick the URL-safe box to produce it.

If the decoded result is still gibberish, it's probably another layer. Try the cipher identifier on the output. Base64 wrapped round ROT13 or hex is a common combination.

Questions

How do I recognise Base64?

A mix of upper and lower case letters, digits, + and /, a length that's a multiple of four, and often one or two = signs at the end.

Is Base64 encryption?

No. It's an encoding: a way of writing any data using 64 safe characters. There's no key, and anyone can decode it.

What is URL-safe Base64?

A variant that uses - and _ instead of + and / so the result can sit in a web address. The decoder here accepts both kinds automatically.

Why does my decoded text look like garbage?

The original probably wasn't text. It may be an image or compressed data, or another layer of encoding. Try the cipher identifier on the output.

More cipher tools

See all cipher tools →