Image to Base64 converter
Developers and designers often need an image as text: an icon embedded in CSS, a logo inside an HTML email signature, or a picture sent in a JSON API. This image to Base64 converter turns any PNG, JPG, WebP, GIF or SVG into a Base64 data URL and gives it to you ready to paste — as a plain string, an <img> tag, a CSS background or Markdown. It also works in reverse: paste Base64 to preview and download the image. All processing happens in your browser.
How to use it
- Choose or paste an image.
- Pick the output format you need.
- Copy the code into your HTML, CSS, JSON or email template.
Example
A 3 KB PNG icon becomes about 4 KB of Base64 text — fine to inline in a stylesheet and save a network request. A 2 MB photo would become nearly 2.7 MB of text, so for photos, compress first with theimage compressor or keep them as files. For other encodings, see the developer tools, and convert images between formats with the image converter.