
Smartphones add GPS coordinates to photos by default in many cases. When you share those images, the coordinates can reveal your home, workplace or daily routine. ExifTool removes this information quickly and precisely, without re-compressing your photos.
Why GPS metadata matters
A GPS-tagged photo can store latitude, longitude, altitude, direction and a GPS timestamp. Some websites strip metadata when you upload, but many file-sharing methods, such as email attachments, cloud links and messaging apps sending files as documents, can keep it. Removing location data yourself means you do not have to rely on each platform's behaviour.
Step 1: check whether a photo has GPS data
Start by displaying the GPS tags:
$ exiftool -gps:all photo.jpgFor a quick summary of the position, ask for the composite GPSPosition tag, and add -n to see decimal coordinates:
$ exiftool -GPSPosition -n photo.jpgLocation can also be stored in XMP. Use -a -G1 to list every location-related tag and the group it lives in:
$ exiftool -a -G1 -gps:all -xmp:all photo.jpgStep 2: remove GPS data
The most direct command deletes the EXIF GPS group:
$ exiftool -gps:all= photo.jpgTo remove GPS information from both EXIF and XMP in one step, use ExifTool's -geotag option with an empty value:
$ exiftool -geotag= photo.jpgExifTool creates photo.jpg_original as a backup. When you are confident in the result, you can skip backups with -overwrite_original:
$ exiftool -geotag= -overwrite_original photo.jpgIf you want to remove all metadata, not just location, use exiftool -all= photo.jpg. This also removes camera details, dates and copyright information, so only use it when you truly want a clean file.
Step 3: process whole folders
To clean every photo in a folder and its subfolders, add -r and choose the file types:
$ exiftool -r -ext jpg -ext jpeg -ext heic -geotag= ./to-shareA good habit is to copy the photos you plan to share into a separate folder and clean only that folder, leaving your originals untouched with their location history intact.
Step 4: verify the result
Always check your work. This command prints the file name of any image that still contains GPS latitude:
$ exiftool -r -if "$GPSLatitude" -FileName ./to-shareIf nothing is printed, no GPS latitude remains. Once satisfied, remove the backup files ExifTool created:
$ exiftool -r -delete_original! ./to-shareThe exclamation mark deletes backups without asking for confirmation, so run it only after verifying your results.
Other location clues to consider
- Text tags: fields such as City, Country or Location in IPTC or XMP can reveal places even without coordinates. Check them with
exiftool -a -G1 -iptc:all -xmp:all photo.jpg. - Videos: location may be stored in different tags or timed streams. See our video metadata guide.
- Image content: street signs, landmarks and windows can reveal locations visually, which metadata tools cannot remove.
Need ExifTool first? Get it from the download section and follow the installation guide.


