Takeout JSON

How to Organize Photos by Year and Month Folders

Why Year/Month folders work for most photo libraries, the alternatives, and how to sort thousands of photos into them by hand or with a tool.

You have a folder with ten thousand photos in it. Some came off a phone, some from a camera card, some from an old Google Photos export. Finding the pictures from one holiday means scrolling past everything else. You want folders, and you want them to make sense in ten years.

Why the pile happens

Phones and cameras do not care about folders. They write files into one place, with names like IMG_4821.JPG or DSC_0042.JPG, and start again from zero when the counter runs out. Copy three devices into one folder and you get name collisions, duplicate numbers and no order at all.

Cloud services hide this by showing you a timeline built from metadata. The moment you leave the service, or copy the files to a drive, the timeline is gone and the pile is what remains.

The case for Year/Month

Year/Month is the structure that survives. A folder called 2019 with 07-July inside it is readable by a person, sorts correctly in every file manager, and needs no software to understand. It works on a NAS, on a USB stick, in Finder, in Explorer, in a terminal.

It also matches how people remember. You rarely know the exact day of a photo, but you usually know the year, and often the season. A month folder holds a few hundred photos at most for a heavy phone user, which is a size you can still scroll.

Two-digit months with the name attached (07-July rather than July) matter more than they look. Plain month names sort alphabetically: April, August, December. The number in front keeps them in calendar order.

Alternatives, and when they fit

Year/Month/Day gives one folder per day. It suits event photographers and people with very large libraries, but for a family library it produces thousands of tiny folders, many holding one or two photos.

Year only is the opposite. Fine for a small library of a few hundred photos a year. Past a couple of thousand a year the folders get too big to browse.

Year/Location puts a folder per place under each year: 2019/Paris, 2019/Berlin. Good for people who travel a lot, but it needs GPS data in the photos, and photos without a location have nowhere obvious to go. There is more on this in /blog/photos-by-location-folders.

Location/Year flips that around for people who return to the same places every year and want Lake House/2018, Lake House/2019.

Keeping your existing folders is a real option too. If you already have albums as folders and only want the dates fixed and the names tidied, do not throw the structure away.

What the folders should be built from

This is the part that goes wrong most often. The folder a photo lands in has to come from the date the photo was taken, which lives inside the file as EXIF DateTimeOriginal. It must not come from the file's modified date. The modified date changes every time a file is copied, downloaded or edited, so a sort by modified date puts a 2012 photo into the 2026 folder. The difference is explained in /blog/exif-date-taken-vs-file-modified.

If your photos came from Google Takeout, the EXIF date is often missing or wrong, and the real date sits in a .json file beside each photo. Sort those by EXIF and you will get one giant folder for the download day. Fix the dates first, then build folders. See /blog/google-takeout-photos-wrong-date.

Doing it by hand

For a few hundred photos, a file manager is enough. Sort by "Date taken" (Windows Explorer has this column, Finder shows it under Get Info and in the Photos-style gallery view), select a month's worth, and drag them into a new folder. It takes an afternoon and you will make a few mistakes.

For more than that, use a tool. On any platform, exiftool can do the whole job in one command:

exiftool -r "-Directory<DateTimeOriginal" -d "%Y/%m-%B" .

This reads the EXIF date from every photo under the current folder and moves each into Year/MM-Month. It is fast, free and reliable. It will not touch photos that have no EXIF date, which is the right behaviour, but it means you have to deal with those separately.

digiKam, which is free and runs on Windows, macOS and Linux, has an "Advanced rename" and can move photos into date folders during import. XnView MP can do the same through its batch rename with a {Date taken} field. Both need some setup, but both are honest tools that do exactly this job.

On Linux or macOS, a short shell loop around exiftool works too, and gives you full control over the layout.

Doing it with the app

Takeout JSON Metadata Fixer does the same job with a folder template picker instead of a command line, and it fixes the dates before it builds folders, which is the step people usually skip.

Point it at a folder, or a Takeout zip, or several zips. Pick a folder template: Year/Month, Year/Month/Day, Year, Year/Location, Location/Year, Keep my folders, or No folders. Pick a naming scheme. Run a dry run first to see what it would do without touching anything.

It reads dates in order: the Takeout .json sidecar first, then EXIF, then the file's own date as a last resort. So a Takeout export sorts by the real date, not the download date. Photos with no date at all can be given one date and one place for the whole folder, which is how you handle a box of scans.

If you organize a folder in place, it can keep the old files in an "Originals (before organizing)" folder, so nothing is lost if you change your mind about the layout.

It runs offline on macOS, Windows and Linux. The first 500 photos are free. Unlimited is a one-time $9.99 purchase.

Frequently asked questions

Should I use Year/Month or Year/Month/Day?

Year/Month for most people. Day folders only earn their keep if you shoot hundreds of photos a day or need to find a single event by date. You can always split a busy month later.

What happens to photos with no date?

By hand, they stay where they are. With exiftool, they are skipped. In the app, they fall back to the file date, or you can set one date for the whole folder before organizing.

Do I lose anything by moving photos into folders?

No. Moving a file changes its path, not its contents. EXIF, GPS and image data stay the same. Only the file's own timestamps may change on some systems, which is why the date should live inside the file.

Will Apple Photos or Immich respect my folders?

Apple Photos ignores folders on import and uses EXIF dates. Immich can import folders as external libraries and keeps the structure. PhotoPrism reads the folders as-is. In every case, the EXIF date is what the app uses to build its timeline, so the folders are for you, not for them.