Takeoutfix Guides Open Takeoutfix

Guide

Google Photos Takeout is missing the GPS locations

In Google Photos a photo shows a place on the map. After exporting with Takeout and importing elsewhere, it has none. In most cases the location is in the Takeout, in the photo's JSON file, and can be written back.

Where a Takeout photo's location can be: inside the file, in geoDataExif, or only in geoData when it was added in Google Photos. Inside the photo GPSLatitude GPSLongitude Kept by Takeout when the camera recorded it. JSON: geoDataExif The place that was in the file when uploaded. Same as the photo, unless Google stripped it. JSON: geoData Where Google Photos says it was, including a place you added or changed by hand. Only here: lost on import unless written into the file.
Three places a location can live in a Takeout. Photo apps only read the first.

Why the location goes missing

Photos that had GPS from the camera usually keep it, because Takeout exports the original file. If a photo's geoData is 0.0, 0.0, the export has no place for it, and no tool can restore one.

Check one photo first

Open the JSON next to a photo that lost its place (for IMG_1234.jpg it's IMG_1234.jpg.supplemental-metadata.json, IMG_1234.jpg.json, or a cut-off name like IMG_1234.jpg.suppl.json) in a text editor and look for:

"geoData": { "latitude": 38.7115, "longitude": -9.1302, "altitude": 0.0, ... }

Non-zero numbers mean the location is there to restore.

Write it back free with ExifTool

Install ExifTool, extract all zip parts into one folder, work on a copy, and run from the folder that holds Takeout:

exiftool -r -P -tagsfromfile "%d%F.supplemental-metadata.json" \
  "-GPSLatitude<GeoDataLatitude" "-GPSLatitudeRef<GeoDataLatitude" \
  "-GPSLongitude<GeoDataLongitude" "-GPSLongitudeRef<GeoDataLongitude" \
  "-GPSAltitude<GeoDataAltitude" \
  --ext json -overwrite_original -progress "Takeout/Google Photos"

Run it a second time with "%d%F.json" for files with the older JSON name. The Ref tags take the sign of the number, so a negative latitude becomes South and a negative longitude West. -P keeps each file's modified date, in case you already set it from the JSON.

The command also copies 0.0, 0.0 for photos Google has no place for, which puts them in the sea off West Africa. Clear those afterwards:

exiftool -r -P -if 'defined $GPSLatitude and $GPSLatitude# == 0 and $GPSLongitude# == 0' -gps:all= \
  --ext json -overwrite_original "Takeout/Google Photos"

The same limits apply as for dates: cut-off JSON names, duplicates like IMG_1234(1).jpg and edited copies aren't matched by these commands (see where the commands fall short). This writes EXIF GPS, which photos use; videos keep their location in a different place, so they need separate handling.

Without the command line

Takeoutfix reads geoData first, then geoDataExif, skips 0, 0, and writes the location into photos and MP4 or MOV videos (larger videos and other formats get an .xmp file beside them), along with the date and caption. Add your zip parts to Takeoutfix; the free scan shows how many files will get a place before you pay anything, and 100 photos and videos are fixed free so you can check them on a map in your own photo app.

The Takeoutfix free scan of the sample library: 18 of 20 files found their JSON, every file dated the export day now, May 2016 to August 2021 after the fix.
The free scan, run on the sample library. Before paying you see how many files found their JSON and the date range they'll carry.

Related guides

Takeoutfix matches every photo and video in your Takeout to its JSON, writes the date, place and caption back into the files, and files a fixed copy by year and month. It runs in your browser and nothing is uploaded. The scan is free, and so is fixing 100 photos and videos from your own library to check the result. The whole library is $9, once.

Scan your Takeout free