← Back to list

How We Built a 100% Client‑Side HEIC Converter — And Why Privacy Matters

If you’ve ever tried to open an iPhone photo on a Windows PC, you’ve probably run into the HEIC “surprise”. You double‑click a picture, and…

jf l · 2026-06-25 03:39 · 0 claps · 4.0 min read
#heic #heic-to-jpg #heic-to-png
Open on Medium ↗
Wiki topics: 🔒 · Cybersecurity

How We Built a 100% Client‑Side HEIC Converter — And Why Privacy Matters

If you’ve ever tried to open an iPhone photo on a Windows PC, you’ve probably run into the HEIC “surprise”. You double‑click a picture, and instead of seeing your image, you get an error message or a blank screen.

HEIC (High Efficiency Image Container) is Apple’s default photo format since iOS 11. It’s brilliant for storage — about half the size of a JPEG with better image quality and support for HDR and transparency. But there’s a catch: almost no browser can display HEIC natively. Even Safari, Apple’s own browser, doesn’t decode HEIC files directly.

This compatibility gap creates real friction. Designers receive HEIC files from clients and can’t open them. Photographers share portfolios with Windows users who see nothing. Everyday users just want to send a photo to a colleague without a technical detour.

As we built HEIC Converter, we set out to solve this problem — not by uploading files to a server, but by doing everything right in the browser.

The Privacy Problem with Most Online Converters

Most online conversion tools follow a simple model: you upload your file, their server processes it, and you download the result. This works, but it comes with a hidden cost:

  • Your files leave your device — they travel across the internet to an unknown server.
  • You have no control over what happens to your data after upload.
  • Sensitive content (passports, contracts, private photos) becomes exposed to third parties.

For many users, this is an acceptable trade‑off. But for others — especially those handling personal or confidential imagery — it’s a dealbreaker.

We wanted a different approach.

The Client‑Side Solution: HEIC Conversion in the Browser

The core idea is simple: if the browser can’t display HEIC, let the browser convert it — without ever sending the file anywhere.

This is made possible by heic2any, an open‑source JavaScript library that runs entirely in the browser. It takes a HEIC file, decodes it using WebAssembly, and outputs JPEG, PNG, or GIF — all without a single network request.

Here’s what the conversion flow looks like:

  1. User selects a HEIC file — via drag‑and‑drop or the file picker.
  2. The file is read locally — using the File API, the browser gains access to the file content.
  3. heic2any processes the file — the library decodes the HEIC container and converts it to the target format.
  4. The result is presented to the user — as a downloadable blob, never touching a server.

This approach has several advantages:

  • Zero upload time — conversion happens instantly because there’s no network latency.
  • Complete privacy — your files never leave your device.
  • Offline capability — once the page loads, the conversion works even without an internet connection.
  • No file size limits — since nothing is uploaded, you’re not restricted by server quotas.

Technical Deep Dive: Making It Work

Building a production‑ready client‑side converter involves more than just calling a library. Here are some of the challenges we encountered and how we solved them.

1. iOS File Recognition

On iPhones, when you select a HEIC file from the photo library, the browser sometimes reports the MIME type as image/jpeg instead of image/heic. This caused our initial file validation to reject valid HEIC files.

Our fix: We check both the file extension (.heic / .heif) and the MIME type. If either matches, we accept the file. This simple change made the tool work reliably on iOS.

2. Memory Management

HEIC files can be large, especially when they contain bursts or live photos. Converting multiple files in a batch can quickly exhaust browser memory.

Our fix: We process files sequentially rather than in parallel, and we release object URLs as soon as they’re no longer needed. We also implemented a progress indicator so users know exactly which file is being processed.

3. Preserving EXIF Metadata

One limitation of heic2any is that it doesn’t preserve EXIF metadata (like GPS coordinates, camera settings, or capture date). For many users, this metadata is valuable.

Our fix: We integrated exifr to read EXIF data from the original HEIC file and piexifjs to write it back into the output JPEG. This way, you get both the conversion and the metadata.

4. Error Handling That Actually Helps

When a conversion fails, a generic “something went wrong” message is useless. We implemented an error classification system that categorises failures into:

  • Format not supported — the file isn’t a valid HEIC.
  • File corrupted — the source file is damaged.
  • Out of memory — the image is too large for the device.
  • Conversion timeout — the process took too long.

Users can also export a detailed log file to help us debug issues quickly.

What We Built: HEIC Converter

All of this came together in HEIC Converter — a free, privacy‑first tool that does one thing well.

Here’s what it offers:

  • Batch conversion — select multiple HEIC files and convert them all at once.
  • PNG or JPG output — PNG for lossless transparency, JPG for smaller files with adjustable quality.
  • Custom output size — scale images to 50%, 75%, or custom dimensions.
  • Custom filename templates — use placeholders like {Original name}, {Format}, and {Date}.
  • EXIF preservation — keep your photo metadata (GPS, camera settings, capture date) in the output.
  • One‑click ZIP download — download all converted files as a single package.
  • Retry failed files — if a file fails, retry it individually without reprocessing everything.
  • Export error logs — share detailed logs to help us improve the tool.

And most importantly: nothing is ever uploaded. Every conversion happens right in your browser.

Why This Matters

The web is shifting toward client‑side processing. Technologies like WebAssembly, Web Workers, and modern JavaScript APIs make it possible to do complex work in the browser that previously required a server.

For image conversion, this shift is particularly meaningful. Photos are personal. They contain faces, places, and moments that users don’t want to share with a third‑party server. By keeping processing local, we respect user privacy while delivering a fast, reliable experience.

Try It Yourself

If you’ve ever struggled with HEIC compatibility, give HEIC Converter a try. It’s free, it works entirely in your browser, and it respects your privacy.

We’re continuously improving the tool — the latest version (v1.4) adds retry logic, detailed error messages, and log exports. If you run into any issues, the export log feature helps us fix them quickly.

Start converting: https://heicapp.com


메타데이터
post_id
2cf0d454e531
slug
how-we-built-a-100-client-side-heic-converter-and-why-privacy-matters-2cf0d454e531
url
https://medium.com/@ljf84675/how-we-built-a-100-client-side-heic-converter-and-why-privacy-matters-2cf0d454e531
canonical_url
https://medium.com/@ljf84675/how-we-built-a-100-client-side-heic-converter-and-why-privacy-matters-2cf0d454e531
author_url
https://medium.com/@ljf84675
status
ok
fetched_at
2026-07-13 06:23:13