Files & formats guide
What is Base64?
Updated 2026-08-25
Base64 is a way to write binary data using a safe subset of ASCII text characters.
On A2Z Edit, Image to Base64 and Base64 to Image help you move between files and strings in the browser.
Steps
- Start with an image file when you need a string for code.
- Encode with Image to Base64.
- Paste the text into HTML, CSS, or JSON as required.
- Decode with Base64 to Image when you need a file again.
- Avoid Base64 for large media meant for CDNs.
Why it matters
Understanding Base64 prevents shipping huge inlined photos by accident.
Tips
- Expect about a 33% size increase versus raw bytes.
- Great for tiny icons; poor for multi‑megabyte photos.
- Keep originals—Base64 round-trips should not replace backups.
Frequently asked questions
Is Base64 encryption?
No. Anyone can decode it. It is encoding, not secrecy.
Why do APIs use it?
Text-friendly transports and JSON fields cannot always carry raw binary.
Base64 in email?
Attachments often use related encodings under the hood.
Related tools
Related guides
How to convert an image to Base64Encode an image as a Base64 data string for CSS or HTML embeds.Best image format for websitesPractical format choices for faster websites: WebP, JPG, and PNG.How to convert Base64 to an imageDecode a Base64 string or data URL back into an image file.Best image format for transparencyUse PNG or WebP when you need alpha transparency—not JPG.
More how-tos: Guides