Convert to Base64
{{ encodingError ? 'Couldn’t encode this file' : 'Encoding your file…' }}
{{ encodingError || imageToBeConverted.name }}
{{ imageToBeConverted.name }}
{{ outputNote }}
{{ copyStatus }}
How to convert images to Base64
1. Choose an image
2. Convert to Base64
3. Copy Base64
Data URL or raw Base64
Switch between a full data URL and Base64-only output.
Copy in one click
Copy the Base64 output straight to your clipboard.
Preview before copying
Check the preview to confirm the conversion.
Includes MIME prefix
Data URL output includes the correct MIME prefix.
JPG is encoded
The universal tool re-encodes images as JPG first. PDF pages also become JPG images, with multi-page results packaged as a ZIP.
Frequently Asked Questions
How do I use the Base64 output?
Paste the data URL into an image tag or CSS background, or copy the raw Base64 for APIs.
Why is the Base64 string long?
Base64 encodes binary data, so the string is larger than the original file.
Can I copy the output?
Yes. Use the copy button to place the output on your clipboard.
Does this encode my original file byte for byte?
No. This universal converter first creates a JPG result, then encodes that result. Transparency and metadata are not preserved. For PDFs, each page becomes a JPG and multi-page results are packaged as a ZIP before encoding.
What happens with multi-page PDFs?
Each PDF page is rendered as a JPG. The JPG files are packaged as a ZIP, and the ZIP is returned as a Base64 data URL.
What happens if a HEIC file contains several images?
The HEIC decoder exports the first image only. That image is converted to JPG and then encoded as Base64; additional images in the HEIC container are not included.