Takeout JSON

Google Takeout Duplicates and "-edited" Files, Sorted Out

Why a Google Takeout export has more files than your library, what the -edited copies and album duplicates are, and how to merge without keeping two of everything.

Google Photos said you had 31,000 items. The Takeout folder has 58,000 files, and that is after deleting the .json sidecars. Some photos appear three times. Others come in pairs, one plain and one ending in -edited.

None of this is corruption. It is how Takeout represents albums and edits. Once you know the pattern, you can decide what to keep.

Where the extra files come from

There are three sources of duplication.

Album copies. Takeout gives you a folder per year, Photos from 2019, containing every photo. It also gives you a folder per album, containing a copy of each photo in that album. A photo in two albums appears three times: once in its year folder and once in each album folder. The album folders exist so you can rebuild your albums. They are copies, not links.

Edited versions. When you crop, rotate or apply a filter in Google Photos, it keeps the original and stores the edit separately. Takeout gives you both: IMG_2201.JPG is the original, IMG_2201-edited.JPG is the version you saw in the app. There is one sidecar, named after the original. The edited copy has no sidecar of its own, so a metadata tool that does not know the convention leaves it undated.

Name clashes. Two different photos with the same filename, say from two phones, both called IMG_0001.JPG, land in one folder with a (1) on the second. These are not duplicates, just unlucky names. The sidecar for the second is IMG_0001.JPG.supplemental-metadata(1).json, with the counter in an odd place. See supplemental-metadata.json explained.

Decide what you want first

For most people the answer is: the year folders, plus the edited versions where they exist, and nothing from the album folders.

The year folders hold every photo exactly once. That is your library. The album folders add nothing you do not already have, only the album membership, which lives in each album's metadata.json. If you care about albums, import them into a tool that rebuilds them, such as immich-go for Immich, or recreate the handful that matter by hand.

For the edited pairs, ask what you looked at in Google Photos. If you cropped and straightened a photo, the edited version is the one you wanted. Keeping both gives you a near-duplicate forever. Keeping only the edited one loses the original pixels. Many people keep both and accept it; others keep the edited copy and archive the originals in a separate folder.

Removing duplicates by hand

Skipping the album folders is easy: only copy the Photos from YYYY folders onward. A folder view sorted by name shows the pattern immediately.

For exact duplicates across folders, use a hash-based tool. On a Mac, dupeGuru and Gemini are common. On Windows, dupeGuru and AllDup. On Linux, fdupes -r . lists identical files, and rdfind -deleteduplicates true . removes them. These compare file contents, so two copies of the same photo with different names are still caught. They will not catch an original and its edited version, which differ in pixels.

For the -edited pairs, a shell loop can move the originals aside:

for f in *-edited.*; do orig="${f/-edited/}"; [ -f "$orig" ] && mv "$orig" originals/; done

Do the date merge before any of this. Once the dates are inside the files, the .json sidecars can go, and the edited copy can borrow the original's date before you move anything.

Merging without duplicates, with the app

Takeout JSON Metadata Fixer takes a different approach that avoids most of this, on macOS, Windows and Linux.

When it writes organized photos into a destination folder, it keeps a record of every source file it has already written there, by content hash. If the same file turns up again, from an album folder, from a second Takeout part, or from a re-run next month, it is skipped. Album copies fall away without you sorting folders by hand, and the count of skipped duplicates appears in the run summary.

Edited copies are handled by name. IMG_2201-edited.JPG finds the sidecar for IMG_2201.JPG and gets the same date and GPS. Both files are kept, so nothing you might want is discarded; the edited one has "edited" in its name so you can filter for it later. Name clashes with (1) are matched to their own sidecar and kept as separate photos, which they are.

The same mechanism lets you add a second export, from another account or a later date, into a library the app already organized, without creating a second copy of everything you had. The first 500 photos are free. For merging two libraries from any source, see merging two photo libraries without duplicates.

Checking the result

Count the images in your organized folder and compare with the item count Google Photos showed. Expect the organized count to be a little higher if you kept edited versions and Live Photo clips, since Google counts a Live Photo as one item and you have two files. If it is roughly double, album folders slipped in.

Frequently asked questions

Are -edited files lower quality?

They are re-encoded JPEGs of the edited result, saved at high quality. For a crop or rotation the loss is negligible. The original is untouched.

Why do some photos have -edited but the edit was only a rotation?

Google Photos stores any change, including rotation, as an edit. The original file still has the old orientation. If you keep originals only, those photos come out sideways. The app straightens sideways photos on the way through; see fixing sideways photos in bulk.

Does Takeout include photos from shared albums?

Only if you saved them to your library. Photos that others shared with you and you merely viewed are not included. That gap surprises people; it is a Google Photos policy, not an export bug.

Can I use Google Photos' own duplicate detection?

Google Photos deduplicates on upload, which is why your library count was lower. Once exported, the copies are real files. Dedupe on your computer or let the organizing tool do it.