Skip to content

Remove the GPS location from many photos at once on Windows, offline

Measured on a folder with a subfolder: the free script saves every JPEG again (the phone photos 30% bigger); EXIF Cleaner keeps the date and camera, with identical pixels.

We make EXIF Cleaner, the app this guide uses. The free methods come first; every step shown in EXIF Cleaner was checked in the app itself, and the screenshots come from the real app with invented sample data.

Short answer

Make cleaned copies of the whole folder and check them, rather than editing the originals. For free, a Windows PowerShell script (below) removes the GPS tags from every JPEG in a folder and its subfolders, but it saves each photo again: in our test the copies were 30% bigger and about one pixel in six changed slightly. EXIF Cleaner wrote copies without the location and with identical pixels, kept the date and camera because we asked it to, recreated the subfolder and left the originals unchanged. Neither handled HEIC photos.

Find which photos have a location

Phones store the place where a photo was taken as GPS tags inside the file, next to the date and the camera model. For one photo, File Explorer shows it under Properties, Details. For a folder, the script in our guide to what photo metadata reveals lists the latitude and longitude of every photo in a folder (run it again for each subfolder), and EXIF Cleaner marks each photo that has a position with a warning.

Our invented sample is a folder for a sofa sold online, "Sofa listing": four phone photos with a GPS position (a public square), one of them in a Bedroom subfolder, a floor plan PNG, an old photo without metadata and a HEIC file.

Method 1 (free): a Windows PowerShell script

Windows PowerShell 5.1, built into Windows 10 and 11, can open a JPEG with .NET's System.Drawing, remove its GPS tags (tag numbers 0 to 31) and save a copy. Save this as remove-gps.ps1:

# remove-gps.ps1: copies of every JPEG in a folder (and its subfolders) without the GPS tags.
# Windows PowerShell 5.1, built into Windows. The originals are only read.
param([string]$Source, [string]$Target)
Add-Type -AssemblyName System.Drawing
$jpeg = [System.Drawing.Imaging.ImageCodecInfo]::GetImageEncoders() | Where-Object { $_.MimeType -eq 'image/jpeg' }
$quality = New-Object System.Drawing.Imaging.EncoderParameters 1
$quality.Param[0] = New-Object System.Drawing.Imaging.EncoderParameter ([System.Drawing.Imaging.Encoder]::Quality), 95L
$root = (Resolve-Path $Source).Path
Get-ChildItem $root -Recurse -Include *.jpg, *.jpeg | ForEach-Object {
    $out = Join-Path $Target $_.FullName.Substring($root.Length).TrimStart('\')
    New-Item -ItemType Directory -Force (Split-Path $out) | Out-Null
    $image = [System.Drawing.Image]::FromFile($_.FullName)
    try {
        $gps = $image.PropertyIdList | Where-Object { $_ -le 0x1F }
        foreach ($id in $gps) { $image.RemovePropertyItem($id) }
        $image.Save($out, $jpeg, $quality)
        "{0}: {1} GPS tags removed" -f $_.Name, @($gps).Count
    } finally { $image.Dispose() }
}

We ran it on 30 November 2026 on a copy of the sample, from the folder that holds the script and the photos:

powershell -ExecutionPolicy Bypass -File .\remove-gps.ps1 -Source "Sofa listing" -Target "Sofa listing (no GPS)"
IMG_20261105_102044.jpg: 6 GPS tags removed
IMG_20261105_101512.jpg: 6 GPS tags removed
IMG_20261105_101530.jpg: 6 GPS tags removed
IMG_20261105_101601.jpg: 6 GPS tags removed
old-photo.jpg: 0 GPS tags removed

It took 0.27 seconds. We checked the copies with Pillow: the GPS tags were gone, and the camera make and model, the date taken and the Software field were still there (the time zone tag was moved from the EXIF block to the main block of the file). The catch is that System.Drawing saves the picture again: each phone photo's copy was about 30% bigger (IMG_20261105_101512.jpg went from 235,217 to 306,435 bytes), 16.3 to 16.8% of the pixels changed, by up to 8 levels out of 255, and old-photo.jpg, which had no location, was saved again too (55,409 bytes became 83,318). The script skips PNG and HEIC files. For photos you sell or print, that second JPEG compression may matter.

Other free ways, not run here

  • File Explorer's Remove Properties and Personal Information, under Properties, Details, can save a copy with the properties removed (PCWorld). Didier Stevens found that it left some text values in the file, so check the result.
  • ExifTool, a free command-line tool, removes the GPS tags with -gps:all=, and -xmp:geotag= removes GPS tags it wrote to XMP; its geotagging page warns that deleting the geotag alone does not remove all GPS tags. Its documentation covers -r for subfolders, -o for an output folder (with %d in the name to keep the subfolders), and the _original backup it keeps unless told otherwise.

We did not run either: ExifTool was not installed on our test PC.

Method 2: clean the folder with EXIF Cleaner

EXIF Cleaner is our small Windows tool that shows what hidden information photos carry and removes it in bulk, offline. It writes cleaned copies to a separate folder, so the originals stay as they are, with a CSV report. The screenshots below come from version 1.0.0 (evaluation build) with the invented sample.

  1. Add the folder. Add folder read 7 files: 4 with a GPS location, flagged with a warning, and 1 that can't be cleaned, the HEIC file: "Not supported: HEIC files are not supported in this version".
  2. Choose what to keep. We ticked Date taken and Camera make and model. The GPS location, serial numbers, software, XMP, IPTC, comments, maker notes and thumbnails are always removed. The app says it always keeps the rotation and the colour profile, so photos look the same; our sample photos were upright and had no colour profile, so we could not check this.
  3. Set the destination and clean. With a separate destination folder, Clean ended with "Done: 5 cleaned, 1 already clean, 1 not supported" and 906 bytes of metadata removed.
EXIF Cleaner with the sofa listing folder: 7 files, 4 with a GPS location; Date taken and Camera make and model ticked; the HEIC file marked not supported.
Photos with a position are flagged; you choose what to keep. EXIF Cleaner 1.0.0 (evaluation build), tested 30 November 2026, invented sample data.
After cleaning: 5 files cleaned (four photos and the floor plan), the old photo already clean and copied, the HEIC file not supported, and 906 bytes of metadata removed.
Cleaned copies go to a separate folder, with a report. EXIF Cleaner 1.0.0 (evaluation build), tested 30 November 2026, invented sample data.

We checked the copies with Pillow. Each of the four phone photos went from 6 GPS tags to none; the make, model, date taken and its time zone were kept, and the Software field was removed. The Bedroom subfolder was recreated in the destination. All six copies had exactly the same pixels as the originals (the report's Pixels column said identical, and unchanged for the copied old photo), and each of the four phone photos' copies was 216 bytes smaller. The floor plan lost its PNG Software text (4,677 to 4,635 bytes), old-photo.jpg was copied unchanged, and the 7 original files had the same SHA-256 after the run as before it.

Keeping the date taken pays off later: our guide to renaming photos by the date taken relies on it.

How to Remove GPS Location and Metadata from Photos0:51Watch on YouTubeNothing loads from YouTube until you press play. The player then loads from youtube-nocookie.com, YouTube's privacy-enhanced mode, and connects to Google's servers. Privacy

Stop new photos getting a location

Removing the location from copies does not stop the next photo getting one. On a Windows PC, Microsoft's page on the Camera app says the app can add the latitude and longitude to a photo when it is allowed to use your location, under Settings, Privacy & security, Location (on Windows 10: Settings, Privacy, Location): turn Camera off in that list. On a phone, look for the location setting of its camera app.

Limitations

  • The PowerShell script handles JPEG only, saves every photo again and keeps the Software field.
  • EXIF Cleaner 1.0.0 does not read HEIC files; convert them to JPEG first. Its planned requirements: Windows 10 (22H2) or 11, 64-bit.
  • Metadata is only part of it: what the picture shows, such as a street sign or a house number, can give the place away too.
  • We did not run File Explorer's Remove Properties or ExifTool.

References