# Image to Base64

> Turn images into a Base64 data URI to embed them directly in HTML, CSS, email templates or JSON. No upload.

Small icons or a logo in an HTML email can be written straight into the code as a data URI, without a separate image file. The result is a text file starting with "data:image/…".

- Open in browser: https://pockettoolbox.org/en/image-to-base64
- Tool: [All-In-One File Converter](https://pockettoolbox.org/en/file-converter)
- Runs entirely in your browser; files and input are never uploaded.

## How it works

1. Drop the image in. Base64 is set.
2. Convert and open the text file. Use its content directly as src or url().

## FAQ

### Is it worth it for large images?

No. Base64 makes the data about a third larger, and the browser cannot cache it separately. It is good for icons under a few kilobytes.

## Popular tasks

- [Convert JPG to PDF](https://pockettoolbox.org/en/jpg-to-pdf)
- [Convert PNG to JPG](https://pockettoolbox.org/en/png-to-jpg)
- [Convert WebP to JPG](https://pockettoolbox.org/en/webp-to-jpg)
- [Convert Images to WebP](https://pockettoolbox.org/en/convert-image-to-webp)
- [Convert HEIC to JPG](https://pockettoolbox.org/en/heic-to-jpg)
- [Convert SVG to PNG](https://pockettoolbox.org/en/svg-to-png)
- [Convert JPG to PNG](https://pockettoolbox.org/en/jpg-to-png)
- [Convert PNG to PDF](https://pockettoolbox.org/en/png-to-pdf)
- [Convert PNG to ICO](https://pockettoolbox.org/en/png-to-ico)
- [Convert WebP to PNG](https://pockettoolbox.org/en/webp-to-png)
- [Convert HEIC to PNG](https://pockettoolbox.org/en/heic-to-png)
- [Convert HEIC to PDF](https://pockettoolbox.org/en/heic-to-pdf)
- [Convert AVIF to JPG](https://pockettoolbox.org/en/avif-to-jpg)
- [Convert BMP to JPG](https://pockettoolbox.org/en/bmp-to-jpg)
- [Convert TIFF to JPG](https://pockettoolbox.org/en/tiff-to-jpg)
- [Convert ICO to PNG](https://pockettoolbox.org/en/ico-to-png)
- [Make a Photo Black and White](https://pockettoolbox.org/en/black-and-white-photo)
- [Convert CSV to JSON](https://pockettoolbox.org/en/csv-to-json)
- [Convert JSON to CSV](https://pockettoolbox.org/en/json-to-csv)
- [Convert XML to JSON](https://pockettoolbox.org/en/xml-to-json)
- [Convert YAML to JSON](https://pockettoolbox.org/en/yaml-to-json)
- [Convert STL to OBJ](https://pockettoolbox.org/en/stl-to-obj)
- [Convert MP4 to MP3](https://pockettoolbox.org/en/mp4-to-mp3)
- [Convert WAV to MP3](https://pockettoolbox.org/en/wav-to-mp3)
- [Convert M4A to MP3](https://pockettoolbox.org/en/m4a-to-mp3)
- [Convert MP3 to WAV](https://pockettoolbox.org/en/mp3-to-wav)
- [Convert FLAC to MP3](https://pockettoolbox.org/en/flac-to-mp3)
- [Convert OGG to MP3](https://pockettoolbox.org/en/ogg-to-mp3)

---
PocketToolbox (https://pockettoolbox.org/en)
