Post

Strip Metadata from Your Photos

Use a tool like exiftool to strip metadata from your photos before posting them.


Strip Metadata from Your Photos

Introduction

If you take photos with an iPhone, the software captures a lot of information including the GPS coordinates of the photo’s location. This is fine for travel photos, but if you’re posting photos you took at home and don’t want to give away the location of where you live, you should remove the GPS coordinates.

Example

For example, this is a selfie I took on top of the Fremont Bridge in Portland, Oregon, USA, during the Providence Bridge Pedal on August 11, 2024.

Selfie looking north from the Fremont Bridge in Portland, Oregon, USA Selfie looking north from the Fremont Bridge in Portland, Oregon, USA

I opened this photo using the macOS Preview app, clicked on Tools > Show Inspector, and in the window that appeared clicked on GPS. Very precise GPS coordinates are available, and the Preview app even provides a zoomable map to show the location of the coordinates.

The photo's GPS coordinates displayed by the macOS Preview app The photo’s GPS coordinates displayed by the macOS Preview app

You can copy the coordinates, Latitude: 45° 32’ 15.522” N, Longitude: 122° 41’ 0.528” W, reformat them to standardize them as (45° 32' 15.522", -122° 41' 0.528"), and paste them into the Apple Maps application on a macOS computer to view the location on a map.

Apple Maps screenshot showing the photo's GPS coordinates Apple Maps screenshot showing the photo’s GPS coordinates

And you can do the same with the Google Maps website.

Google Maps screenshot showing the photo's GPS coordinates Google Maps screenshot showing the photo’s GPS coordinates

ExifTool

It is possible to remove the GPS coordinates from a photo’s metadata one photo at a time, but I wanted to find software that would do this for a batch of photos. I did some Kagi searches for recommendations for such software, and a good article I found was How to Install ExifTool on Mac from the Have Camera Will Travel website.

ExifTool, by Phil Harvey, is free software available for Windows and macOS. I used homebrew to install ExifTool on my M4 MacBook Pro.

1
$ brew install exiftool

ExifTool is a command line tool. To remove the metadata from three photos I had used in a post on my blog at conradhalling.com, I used these commands:

1
2
$ cd ~/src/conradhalling/conradhalling.com/assets/img/2025-03-23
$ exiftool -all= -overwrite_original pansies.png snow_on_2025-02-09.png crocuses.png
This post is licensed under CC BY 4.0 by the author.