Takeout JSON

What Are the JSON Files in Google Takeout Photos?

What the .json file next to each photo in a Google Takeout export contains, why it is there, and whether it is safe to delete.

You unzipped your Google Photos export and half the files are not photos. Next to every picture sits a .json file with a name like IMG_3391.HEIC.supplemental-metadata.json. You did not ask for them, most programs cannot open them, and there are thousands.

They are not junk. They hold the dates and locations that Google did not write into your pictures.

Why Google adds them

Google Photos stores what it knows about a photo in its own database: when it was taken, where, which album it is in, whether you starred it, and any date or location you corrected by hand. The image file itself may or may not carry that information in its EXIF block. Screenshots and chat images usually do not. Edits you made in Google Photos never do.

When you export, Google gives you the image file more or less as it was uploaded. It does not write its database back into each file. Instead it dumps the database entry into a small text file beside the image. That text file is the sidecar, and JSON is just the format it is written in.

What is inside one

Open one in Notepad, TextEdit or any code editor. A typical sidecar looks like this, trimmed a little:

{
  "title": "IMG_3391.HEIC",
  "description": "",
  "imageViews": "12",
  "creationTime": {
    "timestamp": "1690120442",
    "formatted": "Jul 23, 2023, 2:34:02 PM UTC"
  },
  "photoTakenTime": {
    "timestamp": "1689929130",
    "formatted": "Jul 21, 2023, 9:25:30 AM UTC"
  },
  "geoData": {
    "latitude": 48.8583,
    "longitude": 2.2945,
    "altitude": 35.0,
    "latitudeSpan": 0.0,
    "longitudeSpan": 0.0
  },
  "geoDataExif": {
    "latitude": 48.8583,
    "longitude": 2.2945,
    "altitude": 35.0
  },
  "url": "https://photos.google.com/photo/...",
  "googlePhotosOrigin": {
    "mobileUpload": {
      "deviceType": "IOS_PHONE"
    }
  }
}

The fields that matter:

photoTakenTime is the date the picture was taken, as Google Photos displayed it. The timestamp is seconds since 1 January 1970, UTC. If you fixed a date inside Google Photos, this field has your fix. This is the one to use.

creationTime is when the file was uploaded to Google. For a photo taken and backed up the same day they match. For a scan of a 1985 print uploaded in 2021, they are decades apart.

geoData is the location as Google Photos knew it, including any place you set by hand. geoDataExif is the location that was in the file's own EXIF when uploaded. When a photo has no location, both hold zeros: 0.0, 0.0, a spot in the Atlantic Ocean. Treat all zeros as "unknown", not as a real place. More on that in restoring GPS from Takeout.

description is the caption you typed, if any. people lists names you tagged, when present. favorited is true for starred photos. title is the original filename, which is useful because Takeout sometimes shortens the actual filename.

The album files

Each album folder also has one metadata.json that describes the album itself, not a photo. It has the album title, and sometimes a date and a shared-album flag. It is small and harmless. Tools that import albums, such as immich-go, read it.

Why they are named oddly

Older exports named the sidecar IMG_3391.HEIC.json. From 2024 the name became IMG_3391.HEIC.supplemental-metadata.json. Google also cuts long sidecar names off at 46 characters, so a Pixel photo ends up with a partner called PXL_20230721_092530123.jpg.supplemental-m.json. When two photos share a name, the counter goes on the sidecar in a different spot: IMG_3391(1).HEIC pairs with IMG_3391.HEIC.supplemental-metadata(1).json. The details are in supplemental-metadata.json explained.

Can you delete them?

Yes, but only after you have used them. If you delete the sidecars first, the dates and locations they contain are gone. Your photos will show the download date forever, and there is no way to get the information back except running Takeout again.

If your photos all have good EXIF already, the sidecars add little. You can check with exiftool: exiftool -r -if 'not $DateTimeOriginal' -filename . prints every photo missing an EXIF date. If the list is empty, delete away.

For most libraries the list is not empty. The safe order is: merge the sidecar data into the photos, check a few, then delete the .json files. Immich, PhotoPrism and some other self-hosted tools can read Takeout sidecars directly during import, so if that is your destination, keep them until the import is done.

Putting the data back into the photos

You can do this with exiftool, which reads the sidecar and writes EXIF tags. The command and its pitfalls are in merging JSON metadata into photos. Free scripts such as GooglePhotosTakeoutHelper wrap the same idea.

Takeout JSON Metadata Fixer does it as a desktop app on macOS, Windows and Linux.

It reads each sidecar, writes photoTakenTime into the photo's EXIF, sets the file dates to match, and writes the GPS coordinates when they are real rather than zeros. It knows both sidecar naming styles, the truncated names and the (1) counters, so it does not skip files a filename pattern would miss. Optionally it renames and sorts the photos into folders, and it can write fresh .json sidecars alongside the output for Immich or PhotoPrism. Everything runs on your computer. The first 500 photos are free.

Frequently asked questions

Is there one JSON per photo?

Usually. Photos that appear in several albums have a copy of the sidecar in each album folder. A few photos have no sidecar at all, most often Live Photo clips and files from very old uploads. Those keep whatever date is in the file.

Can Google Photos itself read them back?

No. If you upload the folder back to Google Photos, it ignores the sidecars and uses the EXIF in the files. This is why people who move between two Google accounts also lose dates.

Are the timestamps in my time zone?

No. They are UTC instants. A tool converts them to a local time when writing EXIF, using your computer's zone. Check that your computer is set to the zone where most photos were taken.

Do the JSON files take much space?

A few hundred bytes to a couple of kilobytes each. Ten thousand of them is roughly 10 MB. Space is not the reason to delete them; clutter is.