How to Encode and Decode Base64 (Plain English)

By Daniel · Updated July 2026

Base64 turns any data into a string of 64 safe characters (A–Z, a–z, 0–9, + and /). It is not encryption — anyone can decode it. Its job is to let binary data travel safely through systems that only expect text, like email, JSON or a data URI in a web page.

When you actually need it

  • Embedding a small image directly in HTML or CSS as a data: URI.
  • Putting binary data inside a JSON payload or an HTTP header.
  • Reading the payload of a JWT, whose three parts are Base64url-encoded.

How to encode or decode

  1. Open the Base64 tool.
  2. Paste your text and choose encode or decode.
  3. Copy the result. Everything runs locally, which matters because Base64 is trivially reversible.

Why you should not paste secrets into random sites

Because Base64 is reversible, encoding a password or token does nothing to protect it. If you decode or encode anything sensitive on a website that sends your input to a server, you have just handed that server your data in a form it can read instantly. A browser-only tool avoids that entirely.

Base64url is a small variant that swaps + and / for - and _ so the string is safe inside URLs and JWTs. It decodes the same way; only those two characters differ.

Base64 Encoder & Decoder
Encode or decode Base64 text instantly and privately in your browser.
Open the tool →

Common questions

Is Base64 a form of encryption?

No. It is an encoding, not encryption. Anyone can decode it instantly, so it provides zero secrecy.

Why is Base64 longer than the original?

It represents every 3 bytes with 4 characters, so encoded data is about 33% larger than the input.

Is it safe to decode sensitive data here?

Yes — this tool runs in your browser and never sends your text anywhere.

What is Base64url?

A URL-safe variant that replaces + and / with - and _. It is what JWTs use.

Keep reading

How to Decode a JWT · How to Generate a Hash · How to Format Messy JSON