How to convert HEIC to WebP offline

Convert a HEIC photo to WebP on your device using ImageMagick. Check the output format and dimensions before sharing.

Run these commands in a terminal on your own device using an ImageMagick build with HEIC read support. This page provides the instructions and FileTypeKit can inspect the result locally.

Check support and convert

  1. Run the first command and find HEIC with an r in its mode. For WebP output, check that WEBP has a w.
  2. Put a copy of your photo in the working folder. Change the filenames to match your input and a new output. [0] selects one image from the HEIC container.
  3. Compare the reported dimensions and open the output to check orientation and color.
magick identify -list format
magick "photo.heic[0]" -auto-orient -quality 82 "photo.webp"
magick identify "photo.heic" "photo.webp"

Tested with ImageMagick 7.1.2-36 on Windows. An 80 × 64 HEIC produced an 80 × 64 WebP.

What to verify in WebP

Use WebP for web images. The example uses lossy compression at quality 82. Add -define webp:lossless=true before the output filename if you need lossless encoding of the decoded image.

Keep the HEIC original for auxiliary images, HDR and metadata. Check what survives in the exported copy if these matter to your workflow.

If your decoder can export PNG but lacks WebP support, create PNG first and use FileTypeKit’s PNG to WebP converter.

ImageMagick format and delegate reference · Identify the output file · HEIC format reference