Free methods first

Your photos already know which countries you have been to

Written 21 September 2026  ·  by Aki Takashima, Shiori Studio

Almost nobody keeps a list of the countries they have been to. Almost everybody has ten years of photos. Every photo taken with location services on carries the coordinates where it was taken, written into the file by the camera — so the list already exists, scattered across your library, and the work is only extraction.

This page is the whole method: the free two-minute version on the phone, the free command-line version that produces a real list of countries and dates, and the failure modes, which are the interesting part and the reason your first answer will be wrong.

First, check whether your photos carry locations at all

Open any photo in Photos and swipe up. If there is a map under the photo, that file has coordinates in it. If there is no map, it does not — and no tool, mine included, can invent one.

Things that typically have no location: screenshots, images saved from messaging apps and the web, photos taken while Location Services was off for the camera, and photos where the location was manually removed on sharing. Things that usually do: photos and videos from the iPhone camera itself, and from most modern cameras with a phone connection.

The two-minute version, on the iPhone

Photos → Library → the menu button → Show Map. Apple documents this in the iPhone User Guide, including the one limit that matters: only pictures and videos with embedded location data are included.

You now have a world map of pins, which is genuinely satisfying and answers roughly nothing. It will not tell you how many countries there are, when you were in each of them, or which trip each pin belonged to. For that, you have to get the numbers out.

The version that gives you an actual list of countries

This runs on a Mac or a PC, takes about fifteen minutes the first time, costs nothing, and never uploads a photo anywhere. Three steps.

Step 1

Export the originals

In the macOS Photos app, select everything (Edit → Select All) and use File → Export → Export Unmodified Original. Export to an empty folder. It is important to export the unmodified original: edited exports can be re-encoded, and re-encoding is where location data goes missing.

If your photos are already in folders on a disk, skip this step entirely.

Step 2

Pull the coordinates out with ExifTool

ExifTool is free, reads every format you are likely to have, and does not modify anything when you only read. One command turns a folder of photos into a CSV of coordinates and dates:

exiftool -r -m -q -f -n \
  -if '$gpslatitude' \
  -p '$gpslatitude,$gpslongitude,$datetimeoriginal' \
  ~/Desktop/photo-export > coords.csv

-r walks subfolders, -if skips files with no GPS, -n prints plain decimal degrees instead of the pretty format, and -f prints a dash where a file has no original date rather than dropping the line. On a library of tens of thousands of files this takes minutes, not hours, and produces something like:

33.9850,-118.4695,2026:08:31 14:06:22
35.6595,139.7005,2025:04:02 09:11:47
-
Step 3

Turn coordinates into country names, offline

You do not need an API key, and you should not send ten thousand of your coordinates to a web service to find out. A local lookup is enough:

pip install reverse_geocoder
import csv, collections
import reverse_geocoder as rg          # offline: ships its own dataset

rows = [r for r in csv.reader(open("coords.csv")) if len(r) >= 2]
pts  = [(float(r[0]), float(r[1])) for r in rows]
hits = rg.search(pts, mode=1)

days = collections.defaultdict(set)    # country code -> set of dates
for row, hit in zip(rows, hits):
    stamp = row[2] if len(row) > 2 else "-"
    day   = stamp[:10].replace(":", "-") if stamp != "-" else None
    days[hit["cc"]].add(day)

for cc, d in sorted(days.items(), key=lambda kv: -len(kv[1])):
    print(f"{cc}\t{len(d)} day(s) with photos")

That prints your countries, ordered by how many days you have photographic evidence of being there. It is the honest version of the number people put in their bio.

Five things that make that answer wrong

The first three will show up in your CSV today. All five are the reason this problem is harder than it looks.

1. The lookup above finds the nearest town, not the country you were standing in

reverse_geocoder matches your coordinate to the closest populated place in its dataset. Ten kilometres from a border, or anywhere offshore, the closest town can be in the next country. The fix is a real point-in-polygon test against an administrative boundary file — the Natural Earth admin-0 dataset is the usual free choice — but be aware that the low-resolution versions cut corners on exactly the coastlines and enclaves where you needed precision.

2. Photos taken in the air produce countries you never entered

A window-seat photo at cruising altitude is a perfectly valid GPS fix over a country you flew across without landing. Nearest-town lookups happily assign it. If you want a defensible list, drop fixes that sit alone in time and space — a single point hundreds of kilometres from the day's other points, with nothing before or after it — or filter on altitude where the EXIF records it.

3. EXIF timestamps have no time zone

DateTimeOriginal is local wall-clock time with nothing attached to say which clock. Newer files also carry OffsetTimeOriginal, older ones often do not. Grouping by date is therefore wrong by up to a day at both ends of a trip — which matters enormously if you are counting days and not at all if you are counting countries.

4. Photos cluster into trips badly

The natural instinct is to split a list of dated points into trips by gaps: a new trip starts after N days away or M kilometres moved. Both thresholds break. A day with no photos in the middle of a holiday splits one trip into two or three. A layover becomes a country visit. A weekend at home in the middle of a long stay abroad splits everything again.

5. Your own city drowns everything

Most people's photos are overwhelmingly taken where they live. Unless you exclude a home radius, the output is a list where the interesting entries are buried under thousands of points from within five kilometres of your front door.

If you would rather do it on the phone, in code

There is a detail in Apple's PhotoKit worth knowing if you are writing this yourself rather than running a script: PHAsset exposes an asset's location directly, so you can walk an entire library and read coordinates and dates without decoding a single image. It is why a photo import can finish in seconds on a phone and why it does not need the photo contents at all.

The other half of that is permission. With limited library access — the "Selected Photos" option — you see only what the user picked, and your reconstruction will silently under-report. Apple's own privacy guidance for photo apps is the place to start if you are building this.

If you would rather not run any of this

Disclosure. I make Driftlog, an iPhone app that does the above and then keeps going: it reads the location data in your existing photos to rebuild past trips, and it records the countries, regions and cities you pass through from now on while the app is closed, using the phone's coarse significant-location signal. One-time $6.99, no subscription, no ads, no account; the free version records your home country in full and names the rest. iOS 17 and later.

The limits, in the same breath: it reads photo metadata only, never the image; photo import needs Photos access set to All Photos and can only see photos that carry location; it records places, not routes; live recording needs Location set to Always with Precise Location on; a coordinate leaves the phone to be turned into a place name, which is the one outbound request it makes; and every failure mode on this page applies to it too — it just has my attempts at handling them built in.

See Driftlog on the App Store

What this cannot recover

Corrections welcome. If a command here does not work on your system, or a step has changed, email me at shiori.sutudio@gmail.com and I will fix the page and re-date it.