A small icon as a CSS background
icon.png (1.2 KB)background-image: url("data:image/png;base64,iVBORw0KGgo…");Embed small images directly in HTML, CSS, JSON or email templates as Base64 data URIs — or turn a Base64 string from an API response or stylesheet back into an image you can see and save. Both directions run entirely in your browser.
icon.png (1.2 KB)background-image: url("data:image/png;base64,iVBORw0KGgo…");The image type is detected from the data itself, so a wrong or missing MIME type doesn’t matter.
"avatar": "data:image/jpeg;base64,/9j/4AAQSkZJRg…"A JPG preview with its dimensions, ready to download as image.jpgBase64 turns binary image data into plain text, so an image can live inside an HTML, CSS or JSON file without a separate request. That suits small icons, tiny placeholders and HTML emails. The trade-off is size: Base64 text is about 33% larger than the original file, and embedded images can’t be cached separately by the browser, so larger images are better served as normal files.
No. Encoding and decoding happen locally in your browser; nothing is uploaded.
A data URI is text in the form data:[type];base64,[data] that browsers treat like an image URL. You can use it in an <img> src attribute or a CSS url() value.
Base64 only uses letters, digits, +, / and = (or - and _ in the URL-safe variant). Copying from logs or JSON sometimes adds quotes, escaped characters or cuts the text short. Make sure you copied the complete value.
PNG, JPG, WebP, GIF, BMP, AVIF and SVG, in both directions.
Everything you need. One simple place.
Free, fast online tools for text, PDFs, images, data and everyday maths. Every tool runs entirely in your browser, so your files stay on your device.
© 2026 Toolora. All rights reserved.
Built for speed and privacy