Image to Base64 (and back)
Embed small images straight into your HTML, CSS or JSON with no extra requests. Drop one or more files and copy the result in the format you need; you can also paste a Base64 string to recover the image.
Processed 100% in your browser
How can I verify this?
Your files are never uploaded: they are processed on your device. Check it yourself: load the page, turn off your WiFi and the tool keeps working. Or open your browser’s developer tools (F12), go to the Network tab, and see that no file leaves your device.
Ctrl + Enter runCtrl + C copy result
How to use
- 1Drop one or more images (JPG, PNG, WebP, GIF, SVG, AVIF).
- 2Choose the format: data URI, raw Base64, <img> tag, CSS or Markdown.
- 3Copy each image’s code with one click.
- 4For the reverse, switch to “Base64 → Image”, paste the text and download the image.
Use cases
- Inline small icons and logos in CSS or HTML to save requests.
- Insert images into HTML emails or templates.
- Send images inside JSON in APIs.
- Recover the image from a data URI found in a web page’s code.
Frequently asked questions
When should I use Base64 for an image?
For very small images (icons of a few KB) you want to avoid downloading separately. For large photos it does not pay off: Base64 is 33% bigger and is not cached separately by the browser.
What is a data URI?
A URL that contains the encoded file itself, shaped like data:image/png;base64,… It can be used in an image’s src attribute or in CSS url().
Are my images uploaded?
No. The conversion runs in your browser; images never leave your device.
Can I paste Base64 without the prefix?
Yes. We detect the image type from its signature (JPG, PNG, GIF, WebP, SVG) even without the data: prefix.