Image tools
Image to Base64 Converter: Data URI, HTML and CSS
Turn a JPG, PNG, WebP, GIF, SVG or ICO image into Base64 text, ready to paste as a data URI, an HTML <img> tag or a CSS background. Your image stays on your device and is never uploaded.
Your files stay on your device. Nothing is uploaded.
How to use the Image to Base64
- Choose or drop an image.
- Pick the format: data URI, plain Base64, HTML or CSS.
- Copy the result or download it as a text file.
Frequently asked questions
- What is a Base64 image?
- The image written out as plain text, so it can sit directly inside HTML, CSS, JSON or an email instead of being a separate file.
- What's a data URI?
- Base64 text with a short label in front, like data:image/png;base64, so web pages know what kind of file it is. Paste it anywhere an image address goes.
- Does Base64 make images bigger?
- Yes, about a third bigger. It's best for small icons and logos; for large photos, linking to the file loads faster.
- Are my images uploaded?
- No. Your image is converted on your device and never leaves it.
Related tools
- SVG to PNGConvert an SVG logo, icon or drawing to a PNG image at exactly the size you need, sharp at any width, with a transparent or white background. Your file stays on your device and is never uploaded.
- Favicon GeneratorCreate a favicon for your website from a letter, an emoji or your logo. You get favicon.ico, the PNG sizes, a home-screen icon and the code to paste into your site. Your files stay on your device and are never uploaded.
- Compress ImageMake photos and images smaller in seconds. Choose a quality level, see the new file size before you download, and compress up to 20 images at once. Your images stay on your device and are never uploaded.
- JSON FormatterPaste JSON to check that it's valid, then format it with clear indentation or minify it to one line. If something is wrong, you see the line and column of the mistake. Your data stays on your device.