Base64 Encoding Explained (With Real Examples)
What Base64 is, why it exists, and when you should (and shouldn't) use it.
Base64 encodes binary data as safe ASCII text — 3 bytes become 4 characters. It exists because email, URLs and JSON can't always carry raw binary safely.
The quick version
echo -n "Hello, Vizo Tool!" | base64
# SGVsbG8sIFZpem8gVG9vbCE=// Decode in the browser
const decoded = atob("SGVsbG8sIFZpem8gVG9vbCE=");
console.log(decoded); // "Hello, Vizo Tool!"Where you'll meet it
- Email attachments (MIME)
- Data URLs: `data:image/png;base64,...`
- JWT payloads (base64url)
- Storing small binaries in JSON
Try the encoder / decoder
When NOT to use it
The 33% tax
Base64 inflates data by ~33%. Never base64 large files into JSON — use real uploads or blob storage instead.
- Small assets (icons) as data URLs: fine.
- Large images in JSON: avoid — use URLs.
- Passwords: never base64 — it's not encryption.
FAQ
Frequently asked questions
Encode or decode now
Text, files and images — instant, private, in your browser.
Amar Lodhi
Founder, Vizo Tool
Written by Amar Lodhi, who builds fast, private, browser-based tools that save people time.
Guides like this, once a week. No spam.
Join readers learning image tricks, dev workflows and SEO — practical, ad-free, unsubscribe anytime.
Related articles
JSON Formatter Guide: Beautify, Minify & Validate
Pretty-print, minify and validate JSON in seconds — plus the error messages that save you hours of debugging.
How to Generate QR Codes for WiFi, WhatsApp & Payments
Everything from menu QR codes to contactless payments, with colors, logos and high-res downloads.
SQL Formatting Best Practices Every Developer Should Know
Consistent SQL formatting makes reviews faster and bugs obvious. Learn the conventions teams actually use.
Guides like this, once a week. No spam.
Join readers learning image tricks, dev workflows and SEO — practical, ad-free, unsubscribe anytime.
Comments0