Utilrix
4 min read

What Is Base64? Encoding and Decoding Explained

A plain-English guide to Base64 — what it is, when to use it, and how to encode or decode text safely in your browser.

Base64 is a way of representing binary data using only 64 printable ASCII characters (A–Z, a–z, 0–9, + and /). It isn't encryption and it isn't compression — it's a reversible encoding that lets data survive systems that only handle text.

When you'd actually use Base64

  • Embedding a small image or font directly in HTML or CSS as a data URI.
  • Putting binary data inside JSON or XML, which are text-only formats.
  • Encoding credentials for HTTP Basic Auth headers.
  • Reading the payload of a JWT, whose three parts are Base64URL-encoded.

Important: Base64 is NOT secure. Anyone can decode it instantly. Never use it to "hide" passwords or secrets — it only changes the format, not the visibility.

How to encode or decode Base64

  1. Open the Base64 Encoder / Decoder.
  2. Paste your text to encode it, or paste Base64 to decode it back to plain text.
  3. Copy the result — it all happens in your browser, so nothing is sent anywhere.
Try the Base64Encode text to Base64 or decode Base64 back to plain text.

One gotcha: standard Base64 uses + and /, while the "URL-safe" variant used in JWTs and query strings swaps those for - and _. If a decode looks wrong, that difference is usually why.