I was recently confused when I needed to upload a jpg photo to a website. After transferring the photo that I took on my phone to my computer, I learned that the image was in the HEIC (
There are three simple steps below that outline how to convert an HEIC file to a JPG file on Mac. There is also a bonus step that shows you how to convert a directory of HEIC files to JPGs.
Step 1: Install Homebrew
Open up your terminal by clicking on your spacebar and the command key at the same time, then type in terminal, and then click on Terminal.app to open it up.
If you’re not used to using your Terminal, it may seem a little intimidating and may make you nervous, but don’t worry this is completely safe. Homebrew is a package manager for macOS, in other words, it installs the stuff you need that Apple didn’t install. You can learn more about Homebrew here.
Once Terminal has opened, run the following command inside of it:
mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
The `mkdir` command above is creating a directory called homebrew, the `curl` command is getting the compressed homebrew repository from GitHub, and the `tar` command is decompressing that file and placing the contents in the newly created homebrew directory.
Step 2: Install Imagemagick
Now that homebrew has been installed, run the following command in terminal to install the imagemagick package as well:
# install imagemagick on your computer using the homebrew package manager
brew install imagemagick
Step 3: Run magick command
And lastly, run the following command in terminal to convert a single HEIC file to a JPG. *Important note* make sure example_image.HEIC (in the command below) references the file name of the HEIC image that you want to convert, and example_image.jpg (in the command below) references the new file name.
# convert an HEIC image to a jpg image
magick convert example_image.HEIC example_image.jpg
Bonus Step: Convert Directory of HEIC files to JPG’s
If you would like to convert a directory of HEIC files to JPGs, navigate to the directory that you want to convert using the cd
command. For example, if your files live in a directory called iPhonePics, you would first navigate into that directory by running the following command:
cd iPhonePics
If you want to move into the parent directory of your current directory, run the following command cd ../
. Once you’ve navigated to the directory with all of your HEIC files, simply run the following command in your terminal app:
# convert any HEIC image in a directory to jpg format
magick mogrify -monitor -format jpg *.HEIC