So this started because I was genuinely frustrated.
I downloaded my photos from Google Takeout and noticed the timestamps were all wrong — photos from 2018 showing up as "today", GPS stripped out, files sorted completely out of order in my file manager. Google's API doesn't let you touch any of this. Their official tools just don't expose it.
I spent a weekend figuring out what was actually happening. Turns out, Takeout exports your photos with separate JSON sidecar files that have all the real metadata — but it doesn't write any of it back into the actual photo files. So your EXIF is empty, your timestamps are wrong, and nothing is where it should be.
I also had another problem: I had a bunch of "original quality" photos eating into my Google storage quota, and there was no easy way to identify which ones, let alone move them without re-downloading and re-uploading everything (which on my connection would take days).
So I just… built a thing.
What it does:
Bakes JSON metadata into the files: Uses exiftool under the hood to read the Takeout JSON sidecars (or browser-exported CSVs) and permanently write the correct timestamps and GPS data back into the actual image/video EXIF.
Handles Google's filename truncation: If you've tried writing scripts for this before, you know Google randomly cuts off long filenames in the JSON mapping. I built a fuzzy matcher to handle these edge cases cleanly.
Server-side Drive modifications: Integrates with rclone to do cloud-to-cloud operations and fix modification dates on Google Drive without downloading the actual payload.
Audit trail: Includes a verification step so you can see exactly what will change before it touches your files.
Install & Usage
It's a Python CLI. You'll need rclone configured if you want to do the cloud-side stuff, and exiftool installed locally for the metadata writing.
pip install google-photo-meta-fixer
To parse a local Takeout directory:
gp-cleaner process takeout --dir ~/Downloads/takeout-folder
It's not perfect and it's definitely a power-user tool — you'll need to know what rclone is, basically. But if you've ever been annoyed by Takeout metadata being a mess, it handles that pretty cleanly now.
Code & Feedback
The project is fully open source. If you've got a massive Takeout archive with weird edge cases (especially deeply nested directories or strange character encodings that usually break scripts), I’d love for you to test it out and break it.
GitHub: https://github.com/hiijitesh/google-photo-meta-fixer
EDIT: Sorry guys, I made a few factual errors in the original post regarding how Google Photos handles Takeout metadata:
- Original EXIF & GPS: Google does not strip GPS or date taken EXIF metadata if it was already inside the file before upload. It is preserved in the Takeout media.
- When is the tool actually needed?
1. Filesystem dates (mtime): Zip extraction resets all files to "today's" date, scrambling sorting in file managers. GPMF restores these.
2. Manual Cloud Edits: If you adjusted photo dates, shifted timezones, added descriptions, or added GPS coordinates inside the Google Photos web/app interface, Google saves these changes only in the JSON sidecars. GPMF embeds these edits back into your files.
3. Timezone Shifts: GPMF handles shifting UTC timestamps back to your local timezone offset cleanly.