google-photos-fixer
v1.0.0
Published
Fix dates and GPS in your Google Photos Takeout export. Embeds JSON metadata into photos and videos using ExifTool.
Maintainers
Readme
📷 google-photos-fixer
Fix wrong dates and missing GPS in your Google Photos Takeout export — in one command.
The Problem
When you export your photos from Google Photos using Google Takeout, the dates and GPS coordinates are not stored inside the photo files. Instead, Google puts them in separate .json sidecar files sitting next to each photo. This means:
- Photos appear with wrong dates when imported into Apple Photos, Windows Photos, Lightroom, or any other app
- GPS locations are lost
- Edited photos (with
-editedsuffix) lose their metadata entirely
google-photos-fixer reads all those JSON files and writes the correct metadata back into your photos, permanently and reliably.
✨ Features
- 🖱️ Interactive wizard — just run it with no arguments, answer 3 questions, done
- 📅 Fixes DateTimeOriginal, CreateDate and ModifyDate
- 📍 Restores GPS coordinates (latitude, longitude, altitude)
- ✏️ Handles edited photos (
-edited,-edytowano,-EFFECTS, and more) - 📦 Supports both Takeout formats (old
.jsonand new.supplemental-metadata.json) - 🎬 Works with photos and videos: JPG, PNG, HEIC, MP4, MOV, and more
- 🔍 Dry-run mode — preview what would happen without touching files
- ⚡ Fast — parallel processing (8 workers by default)
- 🪶 Zero dependencies — only Node.js built-ins + ExifTool
- 🪟🍎🐧 Cross-platform: Windows, macOS, Linux
Requirements
Install ExifTool
| Platform | Command |
|---|---|
| Windows | winget install OliverBetz.ExifTool |
| macOS | brew install exiftool |
| Linux | sudo apt install libimage-exiftool-perl |
Windows users: ExifTool bundled with ShareX is also detected automatically.
Installation
Option A — Run directly (no install needed)
npx google-photos-fixerOption B — Install globally
npm install -g google-photos-fixer
gpfOption C — Clone and run
git clone https://github.com/MajkiHA/google-photos-fixer.git
cd google-photos-fixer
node bin/cli.jsUsage
🖱️ Interactive Wizard (recommended for beginners)
Just run with no arguments — the program will guide you through every step:
gpf ╔══════════════════════════════════════════════════════╗
║ google-photos-fixer v1.0.0 ║
║ Fix dates & GPS in your Google Photos Takeout ║
╚══════════════════════════════════════════════════════╝
Step 1/4 — Checking ExifTool...
✔ Found: C:/Program Files/ExifTool/exiftool.exe
Step 2/4 — Google Photos Takeout folder
> Input folder path: C:\Downloads\Takeout\Google Photos
Step 3/4 — Output folder
> Output folder path: C:\Photos-Fixed
Step 4/4 — Scanning files...
┌─────────────────────────────────────┐
│ Files found : 13044 │
│ With metadata : 11675 │
│ Without metadata : 1369 │
│ Output folder : C:\Photos-Fixed │
└─────────────────────────────────────┘
Start processing? [Y/n]:⌨️ Command Line (for advanced users)
# Basic usage
gpf --input "C:/Takeout/Google Photos" --output "C:/Photos-Fixed"
# Preview without copying files
gpf --input ./Takeout --output ./Output --dry-run
# Custom exiftool path
gpf -i ./Takeout -o ./Output --exiftool "D:/tools/exiftool.exe"
# Adjust parallel workers
gpf -i ./Takeout -o ./Output --concurrency 4| Flag | Description | Default |
|---|---|---|
| -i, --input | Google Photos folder | required |
| -o, --output | Output folder | required |
| -e, --exiftool | Path to exiftool binary | auto-detected |
| -c, --concurrency | Parallel workers | 8 |
| --dry-run | Preview, no files written | false |
| -v, --version | Show version | |
| -h, --help | Show help | |
How It Works
- Scans the input folder recursively for media files
- Pairs each file with its JSON sidecar (handles both Takeout formats)
- Copies the file to the output folder (originals are never modified)
- Reads the JSON: date taken, GPS, description
- Writes the metadata into the copy using ExifTool
Takeout/
Google Photos/
My Album/
photo.jpg ← copied to Output
photo.jpg.json ← read for metadataSupported File Types
| Type | Extensions |
|---|---|
| Photos | .jpg .jpeg .png .gif .webp .bmp .tiff .heic .heif |
| Videos | .mp4 .mov .avi .mkv .m4v .3gp .wmv .mts .m2ts |
Known Limitations
| Issue | Explanation | |---|---| | AVI files | ExifTool cannot write metadata to RIFF AVI format. Files are copied, metadata skipped. | | Corrupted MP4s | Some Takeout exports contain slightly malformed MP4 files. They are copied successfully; only metadata embedding fails. | | Files without JSON | A small number of files may lack a JSON sidecar. They are copied as-is with their original embedded metadata (if any). |
Troubleshooting
ExifTool not found
Install ExifTool (see Requirements) or pass its path with --exiftool.
Photos still show wrong dates after import Some apps (iCloud, Google Drive) ignore EXIF dates. Try importing directly into the app from the Output folder, not syncing via a cloud folder.
"Access denied" on Windows Run the terminal as Administrator, or choose an output folder where you have write permissions.
License
MIT © MajkiHA
☕ Support
If this tool saved you hours of work, consider buying me a coffee!
🇵🇱 Polski / Polish
Problem
Gdy eksportujesz zdjęcia z Google Photos przez Google Takeout, daty i lokalizacje GPS nie są zapisane w plikach zdjęć — trafiają do osobnych plików .json. Przez to po imporcie zdjęcia mają złe daty i brak lokalizacji.
google-photos-fixer odczytuje te pliki JSON i zapisuje poprawne metadane bezpośrednio w plikach zdjęć.
Instalacja
# Opcja 1 — bez instalacji
npx google-photos-fixer
# Opcja 2 — globalnie
npm install -g google-photos-fixer
gpfWymagane: Node.js 18+ i ExifTool
- Windows:
winget install OliverBetz.ExifTool - macOS:
brew install exiftool - Linux:
sudo apt install libimage-exiftool-perl
Użycie
Uruchom bez argumentów — program przeprowadzi Cię krok po kroku:
gpfLub z argumentami:
gpf --input "C:/Takeout/Google Photos" --output "C:/Zdjecia-Naprawione"Co robi program
- Skanuje folder wejściowy w poszukiwaniu zdjęć i filmów
- Paruje każdy plik z odpowiednim plikiem JSON
- Kopiuje plik do folderu wyjściowego (oryginały nigdy nie są modyfikowane)
- Wpisuje poprawną datę, GPS i opis do kopii przez ExifTool
Obsługiwane formaty
Zdjęcia: JPG, PNG, HEIC, WebP i inne
Filmy: MP4, MOV, MKV i inne
Obsługuje oba formaty Takeout: .json i .supplemental-metadata.json
Obsługuje zdjęcia edytowane: -edytowano, -EFFECTS itp.
☕ Jeśli narzędzie Ci pomogło — postaw kawę!
