How the Base64 Image Converter Works
AnyTool encodes images with FileReader.readAsDataURL, which yields the full data:<mime>;base64,… URI with the correct MIME type, and decodes with atob plus Uint8Array and Blob to render and download the original image. It emits ready-to-copy snippets — raw Base64, the data URI, an HTML <img> tag, a CSS background-image rule, and a Markdown image — and reports byte size, Base64 length, the ~33% overhead, and pixel dimensions. Pasting raw Base64 with no data: header triggers magic-byte sniffing to infer the MIME type so the image still renders.
- Bidirectional encode and decode on one page
- Output as Base64, data URI, HTML, CSS, and Markdown
- Size, ~33% overhead, and pixel-dimension readout
- Magic-byte MIME sniffing for headerless Base64
- No fixed size cap beyond browser memory
