Base64 Encoder and Decoder

Encode text to Base64 or decode it back. Remember that anyone can decode Base64; it hides nothing.

What is Base64?

Base64 is a group of binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation.

Your data stays in your browser

This tool runs on JavaScript inside your browser. Nothing you add here is uploaded to our server, so it works for confidential data too. How we handle data

  • No upload
  • Processed on your device
  • No account

What is Base64 encoding?

A way of writing any data using only 64 safe characters: A to Z, a to z, 0 to 9, + and /. It exists because some systems, like email, URLs, JSON and HTTP headers, can choke on raw binary or special characters. Base64 makes the data about a third bigger but guarantees it arrives intact.

Where will I run into Base64?

  • HTTP Basic Auth headers, which are just username:password in Base64
  • Data URLs that embed small images directly in HTML or CSS, which is also a neat way to get images into HTML to PDF without them being blocked
  • The middle part of a JWT token, which is your token's claims in Base64URL
  • Email attachments and API payloads carrying files

Is Base64 encryption?

No, and it's worth saying loudly. Anyone can decode it in a second, right here. Never treat Base64 as a way to hide a password or a secret. One more thing to know: this tool handles standard Latin text. Emoji and scripts like Urdu or Arabic will give an error with the encoder.

Encoding works in your browser, so nothing is uploaded. If you're cleaning up a link, the URL Encoder is the right tool. Decoded something that turned out to be JSON? Tidy it with the JSON Formatter.

Questions people ask

How do I decode a Base64 string?

Open the Decode tab, paste the string and click Decode to Text.

Is Base64 the same as encryption?

No. It's an encoding, not a lock. Anyone can turn it back into the original.

Why does my Base64 string end with = or ==?

That's padding. Base64 works in blocks of 3 bytes, and = fills in when the data doesn't divide evenly.

Why do I get an error when encoding emoji or Urdu text?

The browser's built-in Base64 functions only handle Latin characters. Plain English text, numbers and code work fine.

Can I decode a JWT token here?

You can decode its middle section (the payload) by pasting just that part. JWTs use Base64URL, so replace - with + and _ with / if it fails. The JWT Decoder does all of that for you and can verify the signature too.

Related tools