Home / Guides / ExifTool batch date fix

Batch-Fix Photo Dates with ExifTool: The Commands That Work

ExifTool is the free, proven power tool for fixing photo dates in bulk. It runs from a terminal, and if you're comfortable there, you may not need anything else. Here are the exact commands for the common jobs, plus the mistakes that catch people.

Install

On Windows, download ExifTool from exiftool.org and rename exiftool(-k).exe to exiftool.exe so it runs as a normal command-line program. On a Mac, brew install exiftool does it. On Linux, your package manager almost certainly has it.

Set every photo in a folder to one date

This is the command most people looking for "exiftool change date taken" actually want. It sets every photo in a folder to a single date and time:

exiftool "-AllDates=1988:07:01 12:00:00" C:\Scans\1988-lake-trip

The exiftool AllDates tag is a shortcut that writes three fields at once: DateTimeOriginal (the "date taken" that photo apps sort by), CreateDate, and ModifyDate. Setting all three in one go is almost always what you want, which is why AllDates is the tag to reach for rather than any single date field.

By default, ExifTool keeps every original as a backup file ending in _original next to the corrected one. Do not add -overwrite_original until you have checked the results and are sure the command did what you meant.

Shift dates by an offset

Scanner stamped everything with today's date, but the photos are really from 36 years earlier? You don't have to set each date by hand; an exiftool batch change can shift every date by the same offset:

exiftool "-AllDates-=36:0:0 0:0:0" C:\Scans

The offset format is years:months:days hours:minutes:seconds. The example subtracts 36 years from every photo in the folder; use += instead to shift dates forward. Add -r to recurse into subfolders as well.

Merge Google Takeout JSON dates

Google Takeout exports strip the real dates out of many photos and park them in sidecar JSON files instead. ExifTool can read each photo's matching JSON file and write the timestamp back into the photo:

exiftool -r -d %s -tagsfromfile "%d/%F.json" "-DateTimeOriginal<PhotoTakenTimeTimestamp" "-FileModifyDate<PhotoTakenTimeTimestamp" --ext json C:\Takeout

Honest caveat: this one-liner only matches the simple NAME.jpg.json naming pattern. Takeout also produces .supplemental-metadata.json variants, truncates long filenames, and handles duplicates with a (1) quirk that puts the suffix in different places on the photo and the JSON. Those cases need extra scripting, and there can be a lot of them. Our guide to Google Takeout JSON files explains exactly what's in those files and why the names don't always line up.

The gotchas

Where PhotoDate fits

If those commands look fine to you, use ExifTool. It's excellent, it's free, and it has earned its reputation. We're building PhotoDate for everyone else: the same result, but with a visual timeline of your photos, batch selection, and a preview before anything is applied, with nothing to install and nothing uploaded. It runs in your browser and your photos never leave your computer. Early access is free.

Frequently asked questions

Does ExifTool overwrite my original photos?

Not by default. ExifTool renames each original to a backup ending in _original and writes the corrected file in its place, so you can roll back. Adding -overwrite_original turns that safety net off, so leave it out until you have verified the results.

Why did the date not change in Windows Explorer?

It probably did change. Explorer's default "Date" column usually shows the file-modified date, not the embedded date taken. Add the "Date taken" column in Explorer, or open the photo in a photo app, and you should see the new date.

What is the ExifTool date format?

YYYY:MM:DD HH:MM:SS, with colons in the date part as well as the time, for example 1988:07:01 12:00:00. ExifTool expects colons in the date, so writing it with dashes like 1988-07-01 will not work.

Want the same fix without the terminal?

Join the free early access and batch-fix photo dates on a visual timeline, with a preview before anything is applied.

Join free early access

Related guides

How to fix the dates on scanned photos Google Takeout JSON files explained