HEIC is the file format Apple has chosen to use as the default image format on iPhones for the past few generations. It has a lot going for it, and it includes some very useful features that are just not possible with JPG.
But the catch is that HEIC photos are still nowhere near as widely compatible as JPG. So if you’re sending photos to a friend or sharing images online, there’s a risk they won’t be able to open HEIC photos.
There are a bunch of different ways to convert HEIC to JPG, and I’ve covered several here before.
The method I’m focusing here is on using ImageMagick, specifically on Mac.
A drawback of ImageMagick is that it’s a command-line tool, so there’s no fancy graphical user interface. And while that can make it intimidating to use at first, with the right commands it’s ultra-reliable, quick, and efficient. Even better, you can combine it with other productivity tools that are part of macOS, like Folder Actions, which lets you make drop folders for automatically converting any image files you drop into it.
Table of Contents
Why Use ImageMagick?
When you’re managing a large photo library, efficiency and automation are key. ImageMagick provides the tools to convert, modify, and optimize images in bulk through the command line. It’s a free, cross-platform software that is ideal for processing large batches of images.
On Mac, the built-in SIPS toolkit has similar functionality for this task, and I’ve previously covered that. For basic conversion of HEIC to JPG, there’s really not much in it between using ImageMagick and SIPS. They both handle this task easily.
But if you’re already using ImageMagick in your workflow, it might make sense to use it for this to maintain consistency. For example, I have a series of drop folders set up (convert to AVIF, convert to WebP, resize for email, etc), and I use ImageMagick for many of those. So for consistency’s sake, I’ve set up my HEIC conversion folder with ImageMagick rather than SIPS.
But there is an argument for using SIPS, if only because it’s already baked into macOS. And one area where I have found the SIPS version to be a little better is in attaching folder actions. I find that attaching SIPS scripts to a folder can often go more smoothly than using ImageMagick. But I’ve found a simple solution to that which has been working well for me. I have a more detailed version here, but the gist is to create the Folder Action through Automator and attach as a shell script. I’ve found this to be more reliable for ImageMagick folder actions than the more manual method of attaching an AppleScript file through Finder Services.
How to Check for HEIC Support
Before you start converting HEIC images to JPG, you’ll need to ensure ImageMagick is installed with HEIC support.
Newer Homebrew-installed versions of ImageMagick include HEIC support. But if you’re running an old version, it might be pre-HEIC.
Run this command to check for HEIC support in your ImageMagick installation:
magick identify -list format | grep HEIC
If HEIC is supported, you should see it listed in the command output. Something like this:

How to Update ImageMagick
If HEIC support isn’t included, update ImageMagick using Homebrew:
brew update
brew upgrade imagemagick
The first line updates Homebrew first, to make sure it’s drawing on its latest list of resources.
Once that’s done, the second line updates ImageMagick itself to the latest version in Homebrew’s repository.
After updating, recheck HEIC support, and you should get it showing up.
Converting HEIC to JPG with ImageMagick
I’ll start with the most basic operations and build up to more capable ones.
Simple Conversion of a Single File
You can convert individual HEIC image files to JPG format with this command:
magick input.heic output.jpg
Replace input.heic
with your file’s name and output.jpg
with the desired new file name.
Basic Batch Conversion
More usefully, you can convert multiple HEIC images in the same folder to JPG format with this command:
for file in *.heic; do magick "$file" "${file%.*}.jpg"; done
This script will save the converted JPG versions alongside the original HEIC files.
Separating JPGs to an Output Directory
A variation on that is to place the output JPG files in a separate subfolder:
mkdir -p JPG
for file in *.heic; do magick "$file" "JPG/${file%.*}.jpg"; done
In this case, the output folder is called “JPG”. You can call it whatever you like, but if you change it, there are two things to watch:
- Replace the name in both the first line and then in the location part towards the end of the second line
- If you use a folder name with a space in it, you’ll need to wrap it in quote marks. Here’s an example”
mkdir -p "Output Folder"
for file in *.heic; do magick "$file" "Output Folder/${file%.*}.jpg"; done
Adjusting Compression
ImageMagick uses default settings for JPG compression, but you can adjust this with the -quality
option. For example, for an individual image:
magick input.heic -quality 75 output.jpg
If using the batch commands above, just add something like -quality 75
to the command.
A quality setting of 92, which is the ImageMagick fallback default, is often a good balance for retaining image quality in JPG photos, but it’s quite high, and you can obviously make this significantly lower if getting a small filesize is a higher priority. 1
Automating HEIC to JPG Conversion with macOS Folder Actions
This is where things really start coming together from a workflow standpoint. You can combine ImageMagick with macOS’s Folder Actions to make dropped folders (aka watched folders). It means that any images you drop into the folder will be converted to JPG automatically.
You can then save that folder on your Desktop or in some other convenient location.
Create a watched folder to auto-convert images to JPG using macOS’s Folder Actions with Automator:
- Create a Folder Action in Automator.
- Use “Run Shell Script” with
Pass input
asas arguments
. - Set the Shell to
/bin/zsh
. - Insert the script to convert HEIC to JPG.
For example, this is what I used for my HEIC-JPG drop folder.

Yes, there are ways to simplify it. But it also does a few other things in addition to simple conversion. It automatically converts all HEIC images (and only HEIC images) dropped or copied into the HEIC-JPG drop folder to JPG at a quality setting of 90 and then moves the input files to Trash (where you can recover them if need be). It then takes things a step further by calling up ExifTools to strip out all the metadata. 2
There are a bunch of ways you can modify and customize this. You could have it recursively process folders or do other tasks at the same time, like adding a watermark or border. But if you’d like to use it as a starting point, here’s a version you can copy and paste.
for f in "$@"
do
# Extract the file extension
ext="${f##*.}"
# Define the output file path with the .jpg extension
outfile="${f%.*}.jpg"
# Check if the file extension is HEIC
if [[ "$ext" == "heic" ]]; then
# Convert the HEIC file to JPG using ImageMagick
/usr/local/bin/magick "$f" -quality 90 "$outfile"
# Use ExifTool to strip all metadata including color profile from the converted JPG
/usr/local/bin/exiftool -all= -icc_profile:all= -overwrite_original "$outfile"
fi
done
Related Posts
- The way that ImageMagick handles JPG default quality settings is like this: “The default is to use the estimated quality of your input image if it can be determined, otherwise 92.” You can find more information in the ImageMagick documentation.[↩]
- The stripping of the metadata can technically be done by ImageMagick, but I find ExifTools more reliable and thorough for it. And since I’m getting the HEIC from my iPhone, and my iPhone saves all sorts of metadata I don’t want to share publicly, I want to be sure it’s gone.[↩]