Image to Base64
Turn an image into a data URL for inlining, or decode a data URL back into an image.
Processing: This tool runs entirely in your browser. Your input and any file you open stay on your device — nothing is uploaded to a server.
How to use the image to base64
- Choose an image to encode, or paste a data URL to decode.
- Copy the data URL, or the ready-made img tag or CSS.
- Keep it for small assets — link to anything larger.
About this tool
A data URL embeds an image directly in your CSS or HTML, saving a network request. That is a genuine win for a small icon, a single-file document or an email template where external images are blocked.
It is a loss for anything larger. Base64 inflates the data by about a third, the image can no longer be cached separately from the page, and it blocks whatever file it sits inside from finishing. Over roughly 5–10 KB, a normal image file is the better choice — and the tool warns when the result crosses 100 KB.
The reverse direction takes a data URL and gives you the image back as a file, which is handy when you find one embedded in someone else's stylesheet.
Common uses
- Inlining a small icon in CSS.
- Embedding an image in a single-file HTML document.
- Recovering an image from a data URL in someone else's code.
Frequently asked questions
- How much larger does Base64 make an image?
- About 33% larger, plus the data URL prefix. That overhead is the price of avoiding a separate request.
- When should I inline an image?
- For assets of a few kilobytes that appear on every page, or where external files are blocked, as in some email clients. Larger images are better linked.
Related tools
Base64 Encoder & Decoder
Encode text to Base64 or decode Base64 back to text, with UTF-8 and URL-safe support.
Image Compressor
Reduce image file size with an adjustable quality setting and an instant before/after comparison.
SVG to PNG Converter
Rasterise SVG markup or a file to PNG, JPG or WebP at any scale.
Favicon Generator
Generate every favicon size from one image, including favicon.ico and the head snippet.