No description
  • PowerShell 100%
Find a file
2026-04-21 15:22:17 +02:00
example - Cleanup 2026-04-21 15:22:17 +02:00
README.md - Cleanup 2026-04-21 15:22:17 +02:00
Update-GoogleTakeoutPhotoMetadata.ps1 New Version 2026-04-20 10:03:29 +02:00

PowerShell: Google Takeout photo metadata fixer

This repo contains a PowerShell script that embeds Google Takeout sidecar JSON metadata into your image files (EXIF/XMP) using ExifTool.

What it does

Update-GoogleTakeoutPhotoMetadata.ps1:

  • Recursively scans a folder for Google Takeout sidecar files:
    • photo.jpg.supplemental-metadata.json
    • photo.jpg.suppl.json
    • photo.jpg.json
  • Pairs each sidecar to its image and writes metadata with ExifTool:
    • Date/time: DateTimeOriginal, CreateDate, ModifyDate
    • GPS: latitude/longitude (and altitude if available)
    • Text: description/title (writes to common EXIF/XMP + Windows XP fields)
  • Skips files it cant use (missing image, invalid JSON, no usable fields, etc.)
  • Prints a per-file summary for updates and a final total.

Requirements

  • Windows PowerShell 5.1+ (or PowerShell 7+ should also work)
  • ExifTool for Windows (exiftool.exe)
    • Install from https://exiftool.org/
    • Either put exiftool.exe on your PATH, or pass -ExifToolPath.

Usage

Run on a Takeout folder

.\Update-GoogleTakeoutPhotoMetadata.ps1 -RootPath "D:\Takeout\Google Photos"

Dry run (no writes)

.\Update-GoogleTakeoutPhotoMetadata.ps1 -RootPath "D:\Takeout\Google Photos" -DryRun

If ExifTool is not on PATH

.\Update-GoogleTakeoutPhotoMetadata.ps1 -RootPath "D:\Takeout\Google Photos" -ExifToolPath "C:\Tools\exiftool\exiftool.exe"

Notes / behavior details

  • Timestamp source: prefers photoTakenTime; falls back to creationTime.
  • Timezone: written as UTC (Unix timestamps from Takeout are interpreted as UTC).
  • Sidecar variants:
    • When processing *.supplemental-metadata.json or *.suppl.json, if a plain *.json also exists, the script merges missing fields from the plain JSON (time, geo, title, description).
  • No backup files: ExifTool runs with -overwrite_original_in_place (no *_original files).
  • Supported image types: common formats like JPG/PNG/TIFF/HEIC/WebP/GIF and several RAW formats (see scripts $ImageExtensions).

Example data

The example/ folder contains sample images and *.supplemental-metadata.json sidecars you can use to test the script on a small subset.