Concepts

Base64 encoding, explained simply

What Base64 is, why it exists, when to use it, and why it is not encryption.

By The Editorial Team · Published 2026-03-02

Base64 turns binary data into plain ASCII text using 64 safe characters. It exists so binary can travel through channels that expect text — URLs, JSON strings, email, data URIs.

It grows your data

Base64 encodes 3 bytes as 4 characters, so encoded output is about 33% larger than the original. Use it when you need text-safety, not to save space.

It is not encryption

Base64 is fully reversible with no key. Never use it to “hide” secrets — anyone can decode it instantly.

Common uses

  • Embedding small images in CSS/HTML as data: URIs.
  • Putting binary in a JSON field.
  • Basic-auth headers (which is why HTTPS matters).

Related articles