background-image one-liner.Inlining an image as a Base64 data URI lets you embed it directly into HTML, CSS or JSON — no separate file, no extra HTTP request. That's useful for icons in emails, single-file HTML demos, or above-the-fold logos where the round-trip cost matters more than caching. The tradeoff: Base64 always weighs about 33% more than the source binary and isn't shared between pages, so larger or reused images are still cheaper as plain <img src> references.
The browser's FileReader.readAsDataURL() reads your file into a complete data:image/...;base64,... string in one pass. Nothing is sent to a server — the bytes never leave your device — which makes this safe for internal screenshots, logos under NDA, or any image you wouldn't paste into a third-party service. The tool also reports both sizes so you can judge whether the inline version is small enough to be worth using.
data: URI ready for <img src>background-image: url(...)Inline a small icon (under ~2 KB) when saving the extra HTTP request matters more than caching — typical examples are above-the-fold logos, email signatures, or single-file HTML demos. For anything larger or anything reused across pages, a normal <img src="file.png"> is cheaper because the browser can cache it.
Base64 encodes 3 binary bytes as 4 ASCII characters, so the output is always around 33% larger than the source. The size readout shows both numbers — useful for deciding whether the inline version is small enough to be worth it.
No — encoding happens entirely in your browser using FileReader. The image bytes never leave your device, which makes this safe for screenshots of internal dashboards, logos under NDA, or any image you wouldn't paste into a third-party service.
Yes — SVG works fine, but for SVG specifically a URL-encoded data URI is usually smaller than Base64 (since SVG is plain text). For PNG, JPG, GIF and WebP, Base64 is the right choice because the source is binary.
Pair with the Base64 Encoder/Decoder, the SVG Optimizer, or the Image Compressor for related image work.