Change the Location and File Format for Mac Screenshots

Store Screenshots as JPG, TIFF, GIF, PNG, or PDF Files

Woman using laptop
Cultura RM/Flynn Larsen/Collection Mix: Subjects/Getty Images

The Mac has the ability to take screenshots with just a keyboard shortcut or two. If you want a few more advanced capabilities, you can use the built-in Grab application (located at /Applications/Utilities) to take screenshots.

But neither of these screenshot options provides an easy way for you to specify your preferred graphics file format for screenshots. Luckily, you can use Terminal, an application included with OS X, to change the default graphics format.

Supported Image Formats

The Mac captures screenshots using PNG as the default image format. This versatile format is popular, and provides for lossless compression, preserving the quality of the image while still creating compact files.

But PNG may not be the best format for everyone, especially if you use your screenshots in documents outside of the web, where PNG is widely used. You can convert PNG using most graphics editors, including the built-in Preview app. But why take the time to convert a screenshot when you can just tell your Mac you want to save screenshots in a different format?

The Mac can take screenshots in PNG, JPG, TIFF, GIF, and PDF formats. What's missing is a simple way to set which format to use. After all, screenshots are usually taken using keyboard shortcuts, so there's no application you can set preferences in, and no preference pane within the System Preferences for setting the screenshot defaults.

Terminal to the Rescue

As is the case with many of OS X's system defaults, you can use Terminal to change the default file format for screenshots. I’m going to show you in detail how to change the default screenshot format to JPG, and then provide you with a slightly simplified version for the four remaining image formats.

Change Screenshot Format to JPG

  1. Launch Terminal, located at /Applications/Utilities.
  2. Type or copy/paste the following command into the Terminal window. The command is all on a single line, but your browser may display this page with the Terminal command broken into multiple lines. While you can type in the command, the simplest thing to do is to take advantage of one of the Mac’s copy/paste secrets: place your cursor on any word in the command line below and triple-click. This will select the entire line of text, at which point you can paste the text into Terminal without fear of making a typo.
    defaults write com.apple.screencapture type jpg
  3. After you enter the text into Terminal, press the return or enter key.
  4. The default screenshot format has been changed, however, the change won’t take effect until you restart your Mac, or, since we have Terminal open, tell the system user interface server to restart. We can do this by issuing the Terminal command below. Don’t forget the triple-click trick.
    killall SystemUIServer
  5. Press the enter or return key.

Change Screenshot Format to TIFF

  1. The process for changing to the TIFF image format is the same as the method we used above for JPG. Just replace the Terminal command with:
    defaults write com.apple.screencapture type tiff
  1. Don’t forget to press enter or return, as well as to restart the system user interface server, just as you did for JPG.

Change Screenshot Format to GIF

  1. Use the following Terminal command to change the default format to GIF:
    defaults write com.apple.screencapture type gif
  2. Press enter or return. Be sure to restart the system user interface server as we did in the first example, above.

Change Screenshot Format to PDF

  1. To change to the PDF format, use the following Terminal command:
    defaults write com.apple.screencapture type pdf
  2. Press enter or return, and then restart the system user interface server.

Change Screenshot Format to PNG

  1. To return to the system default of PNG, use the following command:
    defaults write com.apple.screencapture type png
  1. Press enter or return; you know the rest.

Bonus Screenshot Tip: Set the Location Where Screenshots Are Saved

Now that you know how to set the screenshot format, how about stopping the screenshot system from dumping the images onto your desktop, where they tend to clutter things up?

Once again, Terminal comes to the rescue with another secret command. And since you're now a pro at using Terminal for basic commands, I’m going to just give you the command and a tip or two:

defaults write com.apple.screencapture location ~/Pictures/Screenshots

The command above will cause the screenshot utility to save the screenshots to a folder named Screenshots that I created in my Pictures folder. I chose that location because Pictures is a special folder that Apple includes in the Finder sidebar, so I can quickly navigate to it.

You can change the location to be anyplace you like. The easiest way to get the location path correct is to take advantage of a Terminal secret: any Finder item you drag into Terminal is converted to the actual path name.

  1. So, simply create a folder in the Finder where you wish to have your screenshots stored, and then enter the screenshot location command below in Terminal, without the ~/Pictures/Screenshots text that was in my personal example:
    defaults write com.apple.screencapture location
  2. Now drag the folder you created in the Finder to Terminal, and the path will be appended to the end of the command. Press enter or return, and your new location for saving screenshots will be set.

By setting the default screenshot graphics format to one of the file formats you use the most, and setting the location for saving the screenshots to, you can really streamline your workflow.