heic

How HEIC conversion works without uploading your photos

Learn how HEIC conversion works in browser using WebAssembly and libheif-js, with zero uploads to any server. Your photos stay private and local.

Published
April 25, 2026
Reading time
11 min read
Author
TinyPixel

TL;DR

  • HEIC conversion runs entirely in the browser using WebAssembly. Your photos never leave your device.
  • libheif compiled to WASM handles the proprietary HEIC decode; the browser canvas API handles JPG, PNG, or WebP encoding.
  • On a typical 3 MB HEIC, client-side conversion finishes in 800 ms to 1.5 s. Round-tripping through a server takes 2 to 3 s best case.
  • Decoding a 12 MP HEIC needs roughly 100 to 200 MB of working memory, which is why mobile browsers process one image at a time.
  • You can verify any converter is truly client-side by watching the Network tab in dev tools while you convert a file.

If you have ever tried opening an HEIC file on a Windows PC or sharing it with someone on Android, you have probably run into the same wall. Apple's High Efficiency Image Container format saves a ton of storage space, but most of the world still expects a JPG or PNG. That leaves a lot of people searching for how HEIC conversion works in browser tools that will not make them send their personal photos off to some mystery server.

The good news is that modern browser technology actually makes this possible. You can convert HEIC files entirely on your own computer without uploading anything. The process is faster, more private, and surprisingly straightforward once you understand what is happening under the hood.

Why upload-free conversion matters

Most online image converters work the old fashioned way. You pick a file, your browser sends it to a server, the server does the conversion, then you download the result. This creates three problems that nobody wants to deal with.

First, you are trusting a company with your actual image data. That might be fine for a random stock photo, but it gets uncomfortable fast when the photo is your kid's birthday, a sensitive document scan, or anything you would rather not have sitting on someone else's hard drive.

Second, the round trip takes time. A 5 MB HEIC file needs to upload, get processed, and download again. On a slower connection that can stretch to minutes. If you need to convert ten or twenty images, you are now committed to a long wait.

Third, those servers cost money to run. That usually means ads, file size limits, daily quotas, or requests to create an account. The whole experience gets worse because the conversion model itself is expensive to operate.

Client-side conversion flips this completely. Your browser does the work using your own computer's processing power. No upload, no download of converted files, no server storage. Just your file going in and a JPG or PNG coming out, entirely on your machine.

What makes browser-based HEIC conversion possible

The key technology here is WebAssembly, often shortened to WASM. This is a binary instruction format that lets browsers run code written in languages like C, C++, or Rust at near-native speed. It is not some experimental feature. Every major browser has supported it for years.

For HEIC files specifically, developers can compile the same open source libraries that desktop applications use into WebAssembly modules. The most important one is libheif, which implements the actual HEIF and HEIC decoding logic. When you visit a site like https://tinypixel.app/ to convert an HEIC to JPG, your browser downloads a compiled version of this library. From that point on, everything happens locally.

Think of it like this. Instead of sending your photo to a photo lab, the lab equipment gets delivered to your house, does the job, and then disappears. You never gave away the original.

The actual pipeline, step by step

Let me walk through what really happens when you drop an HEIC file into a browser-based converter. This is not marketing speak. This is the actual technical flow.

Step 1: File access through the File API

When you select a file through an input element or drag it onto a webpage, the browser creates a File object. Critically, this object is just a reference to data already on your computer. Nothing has been transmitted anywhere. The site can read the file's metadata like name and size, but the actual pixel data is still local.

Step 2: Reading into memory

The JavaScript code uses a FileReader or newer methods to pull the raw bytes of the HEIC file into browser memory. These bytes are exactly what you would see if you opened the file in a hex editor on your desktop. Still no network transmission. The data exists only in your browser's allocated memory space.

Step 3: Handing off to libheif-js

Here is where WebAssembly enters. The libheif library, compiled to WASM, exposes JavaScript-friendly functions. The raw HEIC bytes get passed into this module. The WASM code then parses the HEIC container structure, extracts the encoded image data, and performs the actual HEVC decoding.

HEIC files use HEVC (H.265) compression for the image data itself. This is what makes them so much smaller than equivalent JPG files with similar visual quality. Decoding HEVC is computationally intensive, which is why it helps to have the optimized C implementation running through WASM rather than trying to write a decoder from scratch in JavaScript.

The output of this stage is pixel data in a raw format that the rest of the system can understand, typically as RGB or YCbCr values in a memory buffer.

Step 4: Canvas-based encoding

Once the pixels are decoded, the browser's native capabilities take over. The code creates an HTML Canvas element, draws the decoded image data onto it, and then uses the canvas's built-in encoding methods to produce the desired output format.

For output to JPG, this means calling canvas.toBlob() with 'image/jpeg' and the desired quality setting. For PNG, it is the same method with 'image/png'. For WebP output, you can use https://tinypixel.app/heic-to-webp which works the same way. The canvas API has highly optimized native encoders that browsers have spent years perfecting.

This two-stage approach, decode via WASM then encode via canvas, is elegant because it plays to each technology's strength. libheif handles the complex proprietary HEIC format that browsers do not natively understand. The browser's canvas handles the standard output formats that browsers understand extremely well.

Step 5: Download trigger

The final step is creating a download link from the resulting blob and prompting you to save the file. Again, this is entirely local. The converted image was never a network request away. It existed in your browser's memory and now exists on your hard drive.

Why this often beats server-side conversion on speed

It sounds backwards. Your laptop or phone versus a data center full of powerful servers. How could the local approach be faster?

The answer is network latency and bandwidth, which dominate most real-world conversion tasks.

Consider a typical 3 MB HEIC file on a 20 Mbps upload connection. Uploading that file takes about 1.2 seconds. The server might decode and re-encode in 200 milliseconds. Downloading a 4 MB JPG result at 100 Mbps download takes another 0.3 seconds. Add round-trip latency, server queueing, and connection setup, and you are looking at 2 to 3 seconds best case.

With client-side conversion, the download of the WASM library happens once and gets cached for future visits. The actual conversion of your 3 MB file might take 800 milliseconds to 1.5 seconds on a modern device. There is no upload, no download of results, no server queue. For subsequent conversions, the WASM is already cached and the process can feel nearly instant.

On slower connections, the difference becomes dramatic. Someone on rural DSL with 2 Mbps upload would wait 12 seconds just to upload that single file. Their local processor can likely still complete the full conversion in under 2 seconds.

Memory and performance realities

Client-side conversion is not magic. It has real constraints worth understanding.

HEIC decoding is memory hungry. The WASM module needs enough heap space to hold the encoded file, the decoded pixel buffer, and working memory for the decoder. For a 12 megapixel image, the decoded RGB buffer alone is roughly 36 MB. Add overhead and you might need 100 to 200 MB of available memory for the process.

Mobile browsers can be aggressive about killing tabs that use too much memory. Very large HEIC files or batch conversions of many images might hit these limits. The best browser-based tools handle this by processing one image at a time and explicitly freeing memory between conversions.

HEVC decoding in WASM is also single-threaded unless the site takes extra steps to use Web Workers. This means a powerful multi-core desktop processor will not see full utilization. Even so, for individual images the performance is perfectly acceptable for interactive use.

The privacy angle is not just marketing

When I say your files never leave your device, I mean it literally. The browser's security model prevents pages from silently uploading files you selected. The File API requires explicit user action to access files, and any network request containing file data would be visible in your browser's developer tools if you wanted to check.

If you are ever uncertain whether a converter is truly client-side, you can test it yourself. Open the browser's Network tab in developer tools, perform a conversion, and watch for outgoing requests that match your file's size. A proper client-side tool will show no such upload.

For businesses handling customer photos, medical images, or any regulated data, this architectural difference matters for compliance. You are not executing a data processing agreement or wondering about a vendor's security practices. The data simply never enters their systems.

What the best tools get right

Not every site claiming browser-based conversion implements it well. Here is what separates the smooth experiences from the frustrating ones.

Progressive loading of the WASM module is important. The full libheif WASM can be several megabytes. Good sites load it in the background when you first arrive, or at least show clear progress. Waiting to download the module only after you drop a file feels broken.

Proper error handling for malformed HEIC files matters too. Apple devices sometimes produce files that push the edges of the specification, or include multiple image variants inside one container. A robust decoder should handle these gracefully rather than failing silently.

Output quality controls let you balance file size against visual fidelity. The canvas-based JPG encoder accepts a quality parameter from 0 to 1. Giving users a slider or preset options shows respect for their specific needs.

Support for related conversions is convenient. You might want https://tinypixel.app/heic-to-png for lossless output, or https://tinypixel.app/heic-to-pdf for document workflows. Having these variants available from the same underlying pipeline keeps the experience consistent.

When server-side still makes sense

I should be honest about the limitations. There are cases where uploading to a server remains the right approach.

Batch processing of hundreds of images might be better handled server-side where dedicated hardware and parallel processing can chew through a queue efficiently. Client-side tools work best for dozens of files, not thousands.

Extremely old or low-powered devices might struggle with the computational load. A 2015 budget Android phone could take uncomfortablely long to decode a large HEIC file. The server might genuinely be faster for that user.

Advanced features like automatic face detection, smart cropping, or AI-powered enhancement need resources and models that would bloat a browser download unreasonably. Those services legitimately need servers.

For the core task of format conversion, though, client-side has become the clearly better default.

The future of this approach

WebAssembly continues to evolve. The upcoming WebAssembly SIMD proposal will further accelerate image decoding by allowing parallel operations on pixel data. Threading support through Web Workers is already usable in many browsers and lets the heavy decoding happen without freezing the user interface.

Newer image formats like AVIF use the same core technologies as HEIC, just in a more open standard. The same WASM-based architecture will likely handle AVIF browser decoding as those libraries mature and get compiled for web use.

What will not change is the fundamental advantage of keeping user data local. Privacy concerns are not a temporary trend. Users are increasingly aware of where their data goes, and tools that respect that awareness will continue to earn trust.

Try it yourself

The next time you need to convert an HEIC file, you can actually watch this process happen. Open your browser's developer tools, monitor the network tab, and drop a file into a tool like https://tinypixel.app/heic-to-png. You will see no upload. The conversion completes, and a download begins, all without your photo ever traversing a network connection.

Understanding how this works matters because it lets you make informed choices about your tools. You can verify claims rather than trusting them. You can choose services architected for privacy rather than merely promising it.

The technology to process complex file formats locally in browsers has arrived. For HEIC conversion, it is no longer necessary to trade privacy for convenience. You can have both, and it is actually faster this way too.