Base64 Encoder and Decoder

Runs in your browser: nothing is uploaded

Encoding and decoding Base64

Pick Encode or Decode and start typing or paste something in. The result updates as you go. Swap puts the result back into the input and reverses the direction, so you can confirm that a value survives the round trip.

To encode a file, perhaps a logo for an email signature or a certificate for a settings file, press or choose a file. Anything up to 20 MB is read on your own device and goes no further.

Standard and URL-safe Base64

Ordinary Base64 includes + and /, and both have a meaning of their own in a web address. URL-safe Base64 uses - and _ in their place and normally leaves off the trailing =. It turns up in login tokens, OAuth redirects and signed download links.

You do not need to tell us which kind you are decoding. We accept either, with or without padding. Tick URL-safe only when you want to produce it.

When a string refuses to decode

We say what is wrong and where to look:

  • A character that does not belong. Usually a stray space, a line break from an email, or a curly quotation mark. We give its position.
  • A value that has been cut off. Base64 is written in groups of four characters, and a single character left over means part of it went missing when it was copied.
  • Data that is not text. If the result is an image or an archive we tell you, and Download saves it as a file.

Encoding is not security

Base64 can be reversed by anyone in a second. Its job is to carry binary data through places that only expect text, such as email, JSON and HTML. A password stored as Base64 is a password stored in the open, and it should be changed.

Expect the encoded version to be about a third bigger than the original, because every three bytes become four characters.

Where it appears in day-to-day work

  • Authorization: Basic headers, which carry user:password in Base64.
  • Email attachments and embedded images.
  • Kubernetes secrets and PEM certificate files.
  • The first two parts of a JWT, which our JWT Decoder will read for you.

What happens to the things you paste

People paste tokens and credentials into Base64 decoders every day, so it is reasonable to ask where they go. With ours they go nowhere. The conversion runs in your browser, nothing is sent to us, and the text is discarded when you close the tab.

Last reviewed 15 November 2026.