Batch Convert Images Between Formats with Image Magick

by Tom Harrison in

Image Magick is a command line utility for converting, editing, and composing images. Image Magick can convert your JPEGs in minutes, probably even seconds.


Let’s say you have a folder full of images in a certain format. JPEG, for argument’s sake. What would you do if you suddenly needed all of those JPEGs in the PNG format? Open them all up and manually re-save each one in Photoshop? What if there were over 1,000 files? Converting each file individually could take hours. No, what you need to do is batch convert your images.

Install Image Magick

First things first, install Image Magick. If you use a Mac or PC, just grab the latest binary release for your operating system.

Dive into the command line

Image Magick is a command line utility, meaning you use it by typing commands into the Terminal, or a DOS prompt.

Mac users should start up the Terminal: press CMD+Space and type “Terminal”. If you do not have Spotlight Search, open a Finder window, click on “Applications”, pop into the “Utilities” folder, and double-click on “Terminal”.

PC users should get a DOS prompt going. Vista users can press “Start” and type “cmd” into the search box. Everyone else, follow these instructions:

  1. Click “Start”.
  2. Click “Run”.
  3. Type “cmd” (without quotes).
  4. Press the “Enter” key.

Convert your files with Image Magick

Alright, the moment of truth has arrived. Your command prompt has you staring at a directory full of JPEGs that should be PNG files. Type:

mogrify -format png *.jpg

Press the Enter key, and Image Magick goes to work. In a few momemts, when a new command prompt appears, you will have PNG copies of your JPEG files.