Convert a HEIC photo to a Base64 string or data URI
Browsers cannot embed HEIC, so this tool first converts the photo to JPG, PNG or WebP, then encodes it as Base64 or a data URI. Copy it, or save it as a text file.
Drop HEIC photos here, or pick them from your device
Stays on your device. Nothing is uploaded.
Processing on this device
How to use it
- Add a HEIC photo.
- Pick the intermediate format: JPG, PNG or WebP.
- Choose plain Base64 or a full data URI.
- Copy the text or download it as a .txt file.
What it keeps
- The visible image, in the format you chose.
- Orientation applied to the pixels.
What it removes or changes
- The photo is converted before encoding, so a lossy choice adds loss.
- Base64 text is about 33% larger than the binary image.
- Metadata is not included.
Limits
- Large photos make enormous strings. Resize the photo first for anything embedded in code or CSS.
- Some editors and email clients struggle with very long lines.
- Base64 is an encoding, not encryption or compression.
Compatibility
Data URIs work inside HTML, CSS and JSON for small images. They suit icons, thumbnails and email templates, but not big photos, because they inflate your page and cannot be cached separately.
Privacy
Conversion and encoding happen in your browser. The photo and the resulting text are not sent anywhere.
Inline Base64 or a separate image file
Inline Base64 saves a request and keeps one file self-contained, which suits tiny images and single-file HTML. For anything larger, a separate image file is lighter, caches properly and keeps your markup readable. When in doubt, only inline images that are small.
Troubleshooting
The string is too long to paste.
Resize the photo smaller, or use WebP or JPG at lower quality.
The image will not display from the data URI.
Use the full data URI including the data:image prefix, not plain Base64.
The text is bigger than the file.
That is normal. Base64 adds about a third.
Frequently asked questions
Why not encode the HEIC directly?
Browsers cannot display HEIC. The photo is converted first so the string works everywhere.
Which format should I choose?
WebP or JPG for photos, PNG for transparency.
Can I download it?
Yes. You can copy the text to the clipboard or download it as a .txt file for later use.