Image to Base64
Convert an image to a Base64 data URL you can paste directly into CSS or HTML — entirely in your browser, the image is never uploaded anywhere.
Convert an image to a Base64 data URL you can paste directly into CSS or HTML. Choose an image below — it’s processed entirely in your browser and never uploaded anywhere.
How it works
Your image’s raw file bytes are read and encoded as a Base64 data: URL — lossless, since this reads the exact original bytes rather than redrawing through canvas. The result can be pasted directly as a CSS background-image value or an HTML <img src>, embedding the image inline without a separate file request.
FAQs
Why is the output so much bigger than my original file?
Base64 encoding is about 33% larger than the raw binary it represents — a necessary tradeoff for representing binary data as plain text. This is normal and expected.
When should I use this instead of just linking the image file?
Inlining is useful for small icons or images where you want to avoid an extra network request — for larger images, a normal linked file is usually better for page performance.