Merge Google Takeout JSON Files to Photos: Step by Step
Merge Google Takeout JSON files to photos: copy photoTakenTime and GPS from each .json into the photo's EXIF, with exiftool or an app, on Windows or Mac.
To merge Google Takeout JSON files to photos, copy photoTakenTime and geoData from each .json sidecar into the EXIF tags of the photo beside it (DateTimeOriginal, GPSLatitude, GPSLongitude). exiftool does it with one command per sidecar style; a desktop app does it in one run. Check a few photos, then the .json files can go.
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. Below are the steps by hand, the differences on Windows and Mac, and the one-click route.
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. supplemental-metadata.json explained shows real examples of both.
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 .
Running the command on Windows
Download the Windows build from exiftool.org and unzip it. Rename exiftool(-k).exe to exiftool.exe and keep the exiftool_files folder next to it. Put both in a folder that is on your PATH, or in the Google Photos folder itself.
Open Command Prompt, type cd, a space, and drag the Google Photos folder into the window. Press Enter. The command above works in Command Prompt with two changes. Put it on one line, or end each line with ^ instead of \. Replace every single quote with a double quote in the -if conditions below. In a .bat file, write every % twice: %%d/%%F.
File Explorer shows EXIF DateTimeOriginal as "Date taken" in the Details view. After the merge, add that column and sort by it to check the result. The file date matters too, because Explorer's default "Date" column falls back on it; the -FileCreateDate and -FileModifyDate arguments set both.
Running the command on a Mac
Install exiftool with the macOS package from exiftool.org, or with brew install exiftool if you use Homebrew. Open Terminal, type cd, a space, drag the Google Photos folder into the window and press Enter. Paste the command as it is.
On a Mac, -FileCreateDate sets the creation date that Finder shows. Apple Photos reads the EXIF date when you import, so import after the merge, not before. Google Photos to Mac with dates covers the import.
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". An -if condition will not help, because exiftool tests it on the photo, not on the sidecar. Filter inside the copy instead, for example '-GPSLatitude<${GeoDataLatitude;$_=undef if $_==0}', as shown in ExifTool for Google Takeout.
Step 5: The app instead
Takeout JSON Metadata Fixer does steps 1 to 4 in one run, on macOS and Windows.
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 $19.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.
How do I merge JSON files with JPG files?
Same way as any other photo: each IMG_1234.jpg gets its data from IMG_1234.jpg.supplemental-metadata.json or IMG_1234.jpg.json. The exiftool command above includes -ext jpg -ext jpeg. For a JSON that belongs to a JPG but has a shortened name, see Step 4; the name is cut at 46 characters before .json.
Is "Google Photos Takeout merge metadata" the same as fixing the dates?
Yes. Merging the metadata means writing the sidecar's date and place into the file. Once the date is inside the file, every app on every system shows the right one. Why Takeout photos show the wrong date explains why they were wrong.
Can I merge the metadata without the original zips?
Yes, if you still have the unzipped .json files next to the photos. If you already deleted the .json files, the dates they held are gone; the only way back is a new export. See Can I delete JSON files from Google Takeout?
Can I merge only some folders?
Yes. Run the command inside one album or year folder instead of the top folder. The app takes any folder too.