In this article, we’ll show how easy it is to convert HEIC images to JPEG or PNG format a command-line tool. This method is simple and efficient way to convert individual or multiple HEIC images quickly.
The best way to convert HEIC to JPEG or PNG is ✨magic✨ once you have the correct tool: ✨ImageMagick✨
Summary
Use ImageMagick to convert the HEIC to JPEG or PNG with the following commands:
- To convert a single HEIC image to JPEG or PNG:
magick .\IMG_2025.HEIC out.jpg
(orout.png
) - To convert multiple HEIC images to JPEG:
magick *.HEIC convertedImages/out.jpg
- To specify quality for JPEG conversion:
magick .\IMG_2025.HEIC -quality 85% out.jpg
- To strip EXIF metadata from the image:
magick .\IMG_2025.HEIC -strip out.jpg
- To resize the image:
magick .\IMG_2025.HEIC -resize 50% out.jpg
If you don’t have ImageMagick installed, see Install ImageMagick.
Read on to see different ways to do the conversion. I will provide troubleshooting tips and alternatives.
Background HEIC
HEIF (High Efficiency Image File Format) is a container format storing images and image sequences.
HEVC (High Efficiency Video Coding) encoded images are known as HEIC.
HEIC images are what iPhone default image format. iPhone can save in RAW format if you were wondering 🤔
Convert HEIC images to JPEG and other formats - Recommended Method
Install ImageMagick
To get started, you need to install ImageMagick on your system. Check out installation guide to Install ImageMagick if not installed.
Convert a single HEIC image to JPEG
The conversion of a single image to JPEG is simple. Input HEIC image, output JPEG (PNG or other format) and bit of magick ✨:
magick .\IMG_2025.HEIC out.jpg
A few notes:
- Older version must use
magick convert
but this is deprecated in v7. - Changing the output file extension will change the output format.
- Common output formats are
JPEG
,BMP
,GIF
,TIFF
, and evenPDF
📜. If we want a JPG or GIF or any other image format we change the extension, for example to convert to PNG:
# Convert HEIC to PNG
magick .\IMG_2025.HEIC out.png
# Convert HEIC to BMP
magick .\IMG_2025.HEIC out.bmp
# Convert HEIC to TIFF
magick .\IMG_2025.HEIC out.tif
# Convert HEIC to PDF
magick .\IMG_2025.HEIC out.pdf
Convert a Multiple HEIC images to JPEG
If you have multiple images in bulk you can use *.HEIC
and it will convert all the HEIC images in the directory. Additionally you can give it an output directory, in this case convertedImages
. The directory must exist before ImageMagick can output to it.
cd directoryWithHEICs
mkdir convertedImages
magick *.HEIC convertedImages/out.jpg
Output:
convertedImages/out-0.jpg
convertedImages/out-1.jpg
etc.
If the directory wasn’t created first you’d get an error like:
magick.exe: unable to open image 'convertedImages/out.jpg': No such file or directory @ error/blob.c/OpenBlob/3596.
Convert a Single HEIC Image to JPEG
We can convert to JPEG format. JPEG is a lossy format so we can (optionally) specify the quality with -quality N
:
magick .\IMG_2025.HEIC -quality 95 out.jpg
Couple things to keep in mind about JPEG format:
- Quality range is 1 to 100, percent
%
isn’t required after the number. - If you don’t give
-quality
argument then the default JPG quality is92%
. - JPEG is a lossy format. Even at
100%
it will lose quality, although not noticeably. - JPEG
-quality 1%
for potato mode 🥔😜
Convert a Single HEIC Image to JPEG and Strip EXIF Metadata
If we want to share the image, we can strip out the EXIF metadata from the image with -strip
. EXIF metadata includes Camera information (e.g., Camera maker
, Camera model
F-stop
), Advanced Photo information (e.g., Brightness
), and GPS information (Latitude
, Logtitude
, Altitude
).
magick .\IMG_2025.HEIC -strip stripped.jpg
To Read the EXIF Metadata
If you want to read the EXIF metadata or check if it was stripped:
magick identify -verbose .\IMG_2025.HEIC
The EXIF metadata lines will start with exif:
.
Convert a single HEIC image to JPEG and resize
If the image is large we can resize the image with -resize X%
magick .\IMG_2025.HEIC -resize 1% out.jpg
Convert HEIC - Alternative Methods
iCloud - “Most Compatible” Download
I don’t recommend the of downloading the “Most Compatible” version on iCloud Photos, because the image loses much of its quality and reduced in size. However, it is a fine alternative if you are not comfortable using the command line or can’t install ImageMagick.
Microsoft Paint
MS Paint (checked with Paint 11.2406.42.0
) can convert the HEIC to other formats like: BMP
, JPEG
, GIF
, TIFF
, PNG
, HEIC
.
This method is fine alternative if you have a few images to convert or can’t install ImageMagick.
Final Notes
Potential Error with ImageMagick
If you see an invalid input error like the one below, update ImageMagick to the latest version. There was a known issue with iPhone 15 Pro on iOS 18. As of now ImageMagick version 7.1.1-38
has the fix.
convert: Invalid input: Unspecified: Metadata not correctly assigned to image (2.0) `.\IMG_2025.HEIC' @ error/heic.c/IsHEIFSuccess/138.
convert: no images defined `out.jpeg' @ error/convert.c/ConvertImageCommand/3362.
Happy Magick
ing 🧙♂️🪄🧙🪄