Free · No upload · Runs in your browser

HEIC to Base64 Converter

Also covers .heif — same family, one page.

Drop a .heic or .heif file and get a Base64 string you can paste into HTML, CSS, JSON, or an email template. Everything runs in your browser with the FileReader API — the photo is never uploaded.

100% client-side. Your iPhone photo never leaves your device.

Drop a HEIC here

or click to browse · .heic and .heif both work

What is HEIC (and why it needs converting)

HEIC is the container Apple uses by default for photos taken on iPhone and iPad. It is efficient — the same picture usually takes roughly half the space of a JPEG — but that efficiency comes from a codec most tools outside Apple's ecosystem cannot render. Chrome on Windows, most email clients, and many CMS upload pipelines cannot display a .heic file at all.

Base64 sidesteps the compatibility question entirely. A Base64 string is just text: ASCII characters that describe the file byte for byte. Once a photo is encoded, nothing downstream has to understand HEIC, decode a codec, or fetch a separate asset. The text is the image. You are not converting HEIC to another image format — you are turning it into transportable text.

How to convert a HEIC photo to Base64

Step 1 — Pick the photo

Drag your .heic file onto the drop zone, or click to browse. Files are read with FileReader.readAsDataURL(), which means the bytes are base64-encoded locally in memory. Nothing is sent anywhere.

Step 2 — Choose the output shape

Which Base64 shape to copy
You need it forUse
An API or JSON body that documents "Base64, no prefix"Raw Base64 — no data: prefix
An <img> tagdata URIdata:image/heic;base64,…
A stylesheetCSS backgroundbackground-image: url("data:image/heic;base64,…")
A quick checkCopy / download — prefer copy when the string is long

Step 3 — Paste it

For HTML use the full data URI inside src. For CSS, wrap the same data URI in url(). For a JSON payload, check what the receiving API wants — several require the prefix stripped. See Image to Base64 for API.

Why no preview shows for HEIC (and why that's fine)

Chrome, Edge, and Firefox cannot render HEIC, so the tool cannot draw a thumbnail the way our PNG or JPG converters do. We deliberately do not fake one. Encoding a file to Base64 is a byte-for-byte read — it never requires the browser to decode the image, which is exactly why a HEIC converter can work in Chrome while a HEIC editor cannot. The same trade-off applies to our TIFF to Base64 converter. Safari can show a preview because it decodes HEIC natively.

How big does Base64 make a HEIC photo?

Base64 maps every 3 bytes of binary into 4 characters, so the encoded text is always about 33% larger than the file itself, plus a short data: prefix.

HEIC size vs Base64 overhead
HEIC fileBase64 textSensible?
20 KB~27 KBYes — icons, avatars
80 KB~107 KBBorderline — small inline assets
400 KB~533 KBNo — link the file instead
2 MB (typical iPhone photo)~2.7 MBNo — never inline this

A full-resolution iPhone photo is almost never a good inline asset. Base64 is for small, always-needed graphics — and for cases where there is no alternative.

When to embed a photo as Base64 — and when not to

Embed when the constraint forbids an external file: single-file HTML, email signatures and templates (see Base64 Image Email Signature), CMS/CRM string fields, or generated CSS.

Don't embed when the image is large, reused across pages, or you need SEO/accessibility signals from a separate asset.

HEIC vs JPG vs WebP for embedding

If you control the source photo, format choice matters more than encoding. A JPEG at the same visual quality is typically 2–4× larger than a HEIC but is universally portable; WebP is smaller than JPEG and widely supported in current browsers. HEIC gives you the smallest original file — and thus the smallest Base64 output — but nothing but Apple products will render the result. Given the 33% expansion, converting a HEIC to WebP or JPG before encoding is the right move for any photo you intend to actually display. Use HEIC-to-Base64 when you must carry the original bytes; use JPG to Base64 or WebP to Base64 when you only need small, portable inline output.

Troubleshooting

The string is cut off

Base64 output is tens of thousands of characters; terminals and chat clients truncate silently. Copy carefully, or re-encode and paste in one shot. A valid string contains only A–Z a–z 0–9 + / and possibly = padding at the end.

The browser strips the data URI

Several Markdown renderers, CMS sanitizers, and code-hosting previews remove data: URIs for security. That is a policy decision, not a malformed string — test in the final target.

The email client blocks it anyway

Outlook desktop and the Gmail app have their own restrictions on inline data. See Base64 not showing in Outlook and Gmail signature Base64 not working.

An API rejects the prefix

If the endpoint documents "Base64 string", send the raw section only — strip everything through the comma in data:image/heic;base64,. The API payload guide covers the pattern.

Frequently asked questions

Is my HEIC uploaded anywhere?

No. The file is read locally with FileReader and encoded in memory. There is no server-side conversion step and no storage.

What MIME type does HEIC use?

image/heic for .heic files and image/heif for .heif. The data URI prefix follows from that: data:image/heic;base64,….

Why is there no preview for HEIC?

Chrome, Edge, and Firefox cannot render HEIC, so this tool does not fake a thumbnail. Encoding does not require decoding. Safari can show a preview because it decodes HEIC natively.

Can I convert several photos at once?

Yes — drop multiple files one after another and copy each result in turn. For a broader walkthrough, see How to Convert an Image to Base64.

Will converting to Base64 make my photo smaller?

No. It makes it about 33% larger. Base64 is a transport encoding, not a compression step.

Does it work on iPhone and iPad?

Yes — it runs in mobile Safari and Chrome. Safari can show a preview; Chrome typically cannot, since only Safari decodes HEIC natively.

Does the EXIF data stay in the string?

Yes. The original bytes are encoded verbatim, so EXIF, colour profile, and orientation travel with the string — including location data if present.