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. The selected file is encoded locally with FileReader; this conversion does not upload the photo.

The converter reads and encodes the selected file locally. It does not upload the file for conversion. Advertising and usage events may still make network requests; see the Privacy policy. Copying the output into another service shares the file when you send it there.

Drop a HEIC here

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

What is HEIC (and why it needs converting)

HEIC stores images in a container that requires a compatible decoder to display. Encoding its bytes as Base64 changes how they are transported, not the image format.

Base64 preserves the original HEIC bytes; it does not convert them to PNG or JPEG. Preview and display depend on the browser, operating system, file encoding, and receiving service. Encoding can succeed even when a preview is unavailable. For broad web compatibility, convert the image to PNG or JPEG with a suitable tool before encoding.

How to convert a HEIC photo to Base64

Step 1 — Pick the photo

The converter reads and encodes the selected file locally. It does not upload the file for conversion. Advertising and usage events may still make network requests; see the Privacy policy. Copying the output into another service shares the file when you send it there.

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 URI — data:image/heic;base64,…
A stylesheetCSS background — background-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)

Base64 preserves the original HEIC bytes; it does not convert them to PNG or JPEG. Preview and display depend on the browser, operating system, file encoding, and receiving service. Encoding can succeed even when a preview is unavailable. For broad web compatibility, convert the image to PNG or JPEG with a suitable tool before encoding.

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?

The converter reads and encodes the selected file locally. It does not upload the file for conversion. Advertising and usage events may still make network requests; see the Privacy policy. Copying the output into another service shares the file when you send it there.

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?

Base64 preserves the original HEIC bytes; it does not convert them to PNG or JPEG. Preview and display depend on the browser, operating system, file encoding, and receiving service. Encoding can succeed even when a preview is unavailable. For broad web compatibility, convert the image to PNG or JPEG with a suitable tool before encoding.

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?

Base64 preserves the original HEIC bytes; it does not convert them to PNG or JPEG. Preview and display depend on the browser, operating system, file encoding, and receiving service. Encoding can succeed even when a preview is unavailable. For broad web compatibility, convert the image to PNG or JPEG with a suitable tool before encoding.

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.