🔐

Base64 Encoding Explained (With Real Examples)

Developer · 7 min read · Published March 2025

What Base64 is, why it exists, where it is used, and when you should never use it.

What Base64 actually does

Base64 converts binary data into a string of 64 safe characters (A–Z, a–z, 0–9, +, /). It does not encrypt anything.

Common uses

Embedding small images in CSS/HTML, sending binary in JSON, JWT tokens, email attachments, Basic Auth headers.

The cost

Base64 increases data size by about 33%. Never use it for large files in HTML.

Live example

"Hello" in Base64 is SGVsbG8=. Try it in our free Base64 Encoder or Decoder.

Not encryption

Anyone can decode Base64 instantly. Never use it to "hide" passwords or secrets.

Try our free tools
Browse 85+ free tools → or check our free AI tools directory.

More Developer Guides

Processing…

Please wait a moment