DEV Community

Cover image for How I built a 100% Private HEIC to JPG Converter in Vanilla JS
NovusTools
NovusTools

Posted on • Originally published at novustools.com

How I built a 100% Private HEIC to JPG Converter in Vanilla JS

As developers and designers, dealing with Apple's HEIC image format on the web or Windows is a constant pain. I wanted a fast, secure way to convert images without uploading my personal files to shady third-party servers, so I built a 100% private HEIC to JPG Converter.

The Approach

I built this using Vanilla JS. The most important feature is privacy: all file processing happens locally in your browser. Zero server uploads, zero delays, and complete data security.

Here is a quick look at the core logic handling the client-side file conversion:

async function convertHeicToJpg(file) {
    // Process the file entirely on the client side
    const blob = await heic2any({
        blob: file,
        toType: "image/jpeg",
        quality: 0.8
    });

    // Create a local object URL for the converted image
    const convertedUrl = URL.createObjectURL(blob);
    return convertedUrl;
}
Enter fullscreen mode Exit fullscreen mode

Try it out

You can use the live tool for free here: Free HEIC to JPG Converter

Let me know what you think or if you'd prefer PNG as an alternative output format in the comments!

Top comments (0)