Base64 Encoder / Decoder

Encode text to Base64, decode Base64 strings, convert images to Data URIs, and preview Base64 images β€” all in your browser

Mode

How Base64 Encoding Works

What is Base64?

Base64 represents binary data using 64 safe characters (A–Z, a–z, 0–9, +, /) as defined in RFC 4648. Every 3 bytes become 4 characters, so output grows about 33%. It is encoding, not encryption β€” anyone can decode it instantly, so never use it to protect passwords or secrets.

Common uses

  • Email attachments (MIME), inline image data URIs, binary payloads in JSON
  • HTTP Basic auth headers, and each segment of a JWT

URL-safe variant

Because `+` and `/` clash with URL syntax, URLs use the Base64URL variant (RFC 4648 Β§5) with `-` and `_`. JWTs use this form. If decoding fails, check for missing `=` padding or a URL-safe alphabet first.

Frequently Asked Questions

Related Tools

Sources & References

Content last reviewed: 2026-08-22