How to Merge Takeout JSON Metadata Into Your Photos
Step by step, how to write the date and GPS from Google Takeout .json sidecars into the photo files, with exiftool or with a desktop app.
You have a folder of photos and, beside each one, a .json file holding its real date and location. The photos themselves show the wrong date. You want the information in the .json written into the photo, so you can throw the sidecars away and have a normal folder of pictures.
This is a solved problem. Here is how to do it by hand, and how to do it with a click.
What "merging" actually means
A JPEG, HEIC or PNG has a metadata block called EXIF. Cameras write the date taken there, in a tag called DateTimeOriginal, and GPS coordinates in tags called GPSLatitude and GPSLongitude. Photo apps on every platform read those tags.
The Takeout sidecar has the same information in a different container. Merging means reading photoTakenTime and geoData from the sidecar and writing them into the EXIF tags. While you are at it, you set the file's created and modified dates too, so Finder and Explorer sort correctly even in views that ignore EXIF.
Videos have no EXIF. Their date lives inside the MP4 or MOV container, in tags like CreateDate. Same idea, different tag names.
Step 1: Unzip everything into one place
Takeout splits large exports into several zips. Unpack them all into the same parent folder so the album folders merge. If an album spans two zips, half its photos and half its sidecars may be in each; they need to end up side by side. See Takeout split zip parts if you have many.
Step 2: Understand how a photo finds its sidecar
The sidecar name is the photo name plus a suffix. IMG_0042.JPG pairs with IMG_0042.JPG.supplemental-metadata.json in exports from 2024 onward, or IMG_0042.JPG.json in older ones. Two things break the simple rule. Names longer than 46 characters are cut short, so the suffix is truncated. Duplicate photos get their counter in a different place: IMG_0042(1).JPG pairs with IMG_0042.JPG.supplemental-metadata(1).json. Any tool you use must handle both, or it silently skips those files.
Step 3: Merge with exiftool
exiftool is free and runs on every platform. Install it, open a terminal in the Google Photos folder, and run:
exiftool -r -d %s -tagsfromfile "%d/%F.supplemental-metadata.json" \
"-DateTimeOriginal<PhotoTakenTimeTimestamp" \
"-CreateDate<PhotoTakenTimeTimestamp" \
"-FileCreateDate<PhotoTakenTimeTimestamp" \
"-FileModifyDate<PhotoTakenTimeTimestamp" \
"-GPSLatitude<GeoDataLatitude" "-GPSLatitudeRef<GeoDataLatitude" \
"-GPSLongitude<GeoDataLongitude" "-GPSLongitudeRef<GeoDataLongitude" \
-ext jpg -ext jpeg -ext heic -ext png -overwrite_original .
What it does: for every image, look for a file with the same name plus .supplemental-metadata.json in the same folder, and copy the listed fields across. -d %s tells exiftool the timestamp is in seconds since 1970. -overwrite_original stops it leaving a backup copy of every file.
Run it a second time with "%d/%F.json" for older-style sidecars. Then run once more for videos:
exiftool -r -d %s -tagsfromfile "%d/%F.supplemental-metadata.json" \
"-CreateDate<PhotoTakenTimeTimestamp" "-ModifyDate<PhotoTakenTimeTimestamp" \
"-TrackCreateDate<PhotoTakenTimeTimestamp" "-MediaCreateDate<PhotoTakenTimeTimestamp" \
"-FileModifyDate<PhotoTakenTimeTimestamp" \
-ext mp4 -ext mov -overwrite_original .
Step 4: Deal with what exiftool missed
Count the leftovers:
exiftool -r -if 'not $DateTimeOriginal' -ext jpg -ext heic -ext png -filename .
The list will contain the truncated names, the (1) duplicates, and photos that never had a sidecar. The truncated ones you can catch with a short script that finds the .json whose name is a prefix of the expected one. The duplicates need renaming before the pattern works. This is the part that turns a ten-minute job into an evening, and it is why community scripts such as GooglePhotosTakeoutHelper exist. They are free and do the matching for you, in a terminal.
One more catch: the GPS lines above will happily write 0.0, 0.0 into photos whose sidecar says "location unknown". Add -if '$GeoDataLatitude ne 0' or accept a cluster of photos in the Atlantic.
Step 5: The app instead
Takeout JSON Metadata Fixer does steps 1 to 4 in one run, on macOS, Windows and Linux.
Select the Takeout zips or the unzipped folder. The app pairs each photo and video with its sidecar by trying every naming style Google has used, including the 46-character truncation and the (1) counter. It writes the date into EXIF for images and into the container for videos, sets the file dates, and writes GPS only when the coordinates are real. Photos with no sidecar keep their own EXIF date, or the file date if there is none.
You can stop there, with "Keep names" and "Keep my folders", and get the same folder back with correct metadata. Or you can have it rename files by date and sort them into year and month folders at the same time. A dry run shows the plan before anything is written. The free tier covers 500 photos; unlimited is a one-time $9.99. Nothing is uploaded anywhere.
Step 6: Check, then delete the sidecars
Open a few photos from different years in your photo app and confirm the dates. Then delete the .json files. On a Mac or Linux: find . -name "*.json" -delete from inside the folder. On Windows, search the folder for *.json, select all, delete. Keep the original zips somewhere for a month in case you spot a problem.
Frequently asked questions
Does merging change the image quality?
No. Only the metadata block is rewritten. The compressed pixel data is copied byte for byte.
What if a photo already has an EXIF date that differs from the sidecar?
The sidecar reflects what Google Photos showed you, including any correction you made. In most cases that is the one you want. If you never edited dates in Google Photos, the two will match anyway.
Why does the time come out a few hours off?
The sidecar timestamp is UTC. EXIF has no time zone, so tools convert to your computer's local zone. Set your computer to the zone the photos were taken in, or accept the offset.
Can I merge only the date and skip GPS?
Yes. Drop the GPS lines from the exiftool command. In the app, GPS is written when present; if you do not want location in the filenames, choose a naming template without it.