Skip to content
Really Cool Online Tools logoReally Cool Online Tools

DEV-002

Base64 Encoder & Decoder

Base64 represents binary data using 64 printable ASCII characters. It is how binary content travels safely through systems that were designed for text, such as email, JSON fields and data URLs.

  • Free
  • No signup
  • Private · runs locally

How to encode and decode Base64

  1. Choose the Encode or Decode tab.
  2. Paste your text or your Base64 string into the input.
  3. The result appears immediately as you type.
  4. Copy the output with one click.

What Base64 is for - and what it is not

Base64 is an encoding, not encryption. Anyone can decode it instantly, as this page demonstrates. Never use it to hide passwords, tokens or personal data.

It exists because some channels only reliably carry text. Email attachments, inline images in CSS as data URLs, certificates and binary values inside JSON all rely on it.

The cost is size: encoded output is about 33% larger than the input, because every three bytes become four characters. The trailing = signs are padding that keeps that grouping intact.

This tool handles the full Unicode range correctly, so accented characters and emoji encode and decode without corruption.

What this handles, and what it refuses

Encoding takes your text as UTF-8 first, so accented characters, Greek, Japanese and emoji all survive a round trip. Encoders that skip that step fail on anything outside ASCII, which is the usual cause of a string that decodes into question marks.

Decoding strips whitespace before it starts, so Base64 that arrived wrapped across many lines, as it is in a PEM certificate or an email header, can be pasted exactly as you found it. Missing padding is tolerated too: aGVsbG8 decodes as happily as aGVsbG8=.

URL safe Base64 is refused, and deliberately so. That variant swaps + and / for - and _, which is a different alphabet, and the browser's decoder rejects it rather than guessing. Replace - with + and _ with / and it will decode.

This is a text tool. Decoding an encoded image or an encoded zip produces the raw bytes interpreted as text, which is unreadable, because the result has nowhere to become a file. Use it for strings, tokens and fields, not for attachments.

Reading a token is not breaking it

A JSON Web Token is three Base64 segments separated by dots, and the first two decode into plain JSON that anyone can read. Pasting the middle segment here shows you the claims, the expiry and the issuer, which is often the fastest way to find out why a request is being rejected.

That is not an attack and it is not a weakness. The signature in the third segment is what makes a token trustworthy, and it is verified with a key you do not have. What it does mean is that a token is not a hiding place: anything you put in one is readable by whoever holds it, so personal data does not belong there.

Note the segments are URL safe Base64, so strip the dots and translate the alphabet as described above before decoding one here.

Frequently asked questions

Is Base64 encryption?

No. It is a reversible encoding with no key and no secret. It provides no security whatsoever.

Why does my Base64 string end with = signs?

Base64 works in groups of three bytes. When the input length is not a multiple of three, = characters pad the final group.

Why does decoding fail?

Usually the string was truncated, had characters added by line wrapping, or uses URL-safe Base64 where - and _ replace + and /. Check the string is complete and unmodified.

Other tools people use alongside the Base64.

Browse all developer tools or see every tool.