viewhack

Google Maps Timeline viewer: your places, trips and days

Drop the Timeline export from your phone (Timeline.json), or Google Takeout's Records.json, a Semantic Location History month file or the whole Takeout ZIP. Pick any day to see where you were, when you arrived and left, how you travelled and how far, with the route drawn. Then save the whole history, or one day, as GPX, KML or CSV.

The file is read on your device, in a background worker, a few megabytes at a time. Nothing is uploaded, and no map is loaded.

What it shows

Getting the file

Android phone
Since Google moved Timeline onto the phone (announced December 2023), the history lives on the device. Open the phone's Settings › Location › Location services › Timeline, then Export Timeline data; it saves Timeline.json. The menu names vary a little between phone makers.
iPhone
In the Google Maps app: your profile picture › Your Timeline › the ⋯ menu › Location and privacy settings › Export Timeline data. Menu names differ a little between app versions. It saves location-history.json, a list of the same visits and trips with points written as geo:48.137100,11.575400.
Google Takeout
An export made at takeout.google.com with “Location History (Timeline)” ticked holds Records.json (every raw position fix, often hundreds of megabytes), Settings.json and, in exports made before the move to the phone, a Semantic Location History folder with one file per month (2019/2019_JULY.json). Drop the ZIP as it is: the page finds those files inside without unpacking the rest.

The exports, and what this reads in each

FileHoldsPlace namesHow it is recognised
Timeline.json (Android)semanticSegments: visits, trips (activity, distance in metres) and path points with local times and their UTC offset; rawSignals: recent position fixes; userLocationProfile: which places are Home and Workno: Google place IDs and coordinates only; Home and Work are named from the profilea top-level "semanticSegments" list
location-history.json (iPhone)the same visits, trips and paths, with every number as textno: place IDs and coordinatesa top-level list whose first item has startTime, endTime and a visit, activity or timelinePath
Semantic Location History (Takeout, one file a month)timelineObjects: placeVisit and activitySegment entries with distance, activity type and a simplified raw pathyes, with the addressa top-level "timelineObjects" list
Records.json (Takeout)every raw fix: latitudeE7, longitudeE7 (degrees × 107), a timestamp, accuracy and Google's guess of the activityno, and no visits or trips either: they are worked out herea top-level "locations" list of fixes with latitudeE7
Takeout .zipany of the above under Takeout/Location History (Timeline)/ or the older Location History/as for the files insideZIP entries in those folders, read from the ZIP's own directory

How the figures are worked out

Distance
For a trip, the distance Google wrote into the file (distanceMeters or distance). Google measured it along the way it thinks you went, so a 15.3 km drive can join two places 3.4 km apart in a straight line. Where a trip has no distance, it is measured here along its recorded points by the haversine formula (the earth as a sphere of radius 6,371,008.8 m), and marked “measured along the path”.
Days and times
The on-device exports carry each segment's UTC offset, so days and times are local to where you were, even abroad. Takeout files store UTC only; there the time zone of the device you are reading on is applied, so a trip in another time zone shows at your home time.
Stays from Records.json
Records.json has no visits. When nothing else in the export gives them, a visit is any run of fixes all within 150 m of their centre for 10 minutes or more (two such stays at the same spot less than an hour apart are one), and a trip is the fixes from the end of one stay to the start of the next, measured along them and named after the activity Google guessed most often on the way. Google's own Timeline used a richer model, so its visits will not match these one for one.
Top places
Visits are grouped by Google place ID, else by name and address, else by coordinates rounded to about 100 m. A visit nested inside another (a shop inside a shopping centre, hierarchyLevel 1) is not counted twice.
Large files
The file is never read into memory whole: it is sliced into 4 MB pieces and each visit, trip or fix is parsed on its own. A generated 110 MB Records.json (400,000 fixes) is parsed in under two seconds on the desktop machine this page is tested on, so a 500 MB one takes several seconds there, and longer on a phone, which may also run short of memory for the result.

A worked example

The page is tested with a made-up two-day export written in all four shapes. On Saturday 2 March 2024 it holds Home from 07:00 to 08:30, a 1.2 km walk to Café Frischhut (20 min), 50 minutes there, a 15.3 km drive to work (30 min), work until 17:00, then 8 km by bike home, where the visit runs until 10:00 the next morning; on Sunday a 2.5 km walk to the Englischer Garten and an hour and a half there. The page lists Saturday as 4 visits, 3 trips and 24.5 km, and Sunday as 2 visits (the night at home is on both days), 1 trip and 2.5 km; the top place is Home with 17 h 50 min over 2 visits. Saved as GPX, the two days are 5 waypoints and 4 tracks of 5 points each, and the GPS track viewer reads them back with the same first and last coordinates. From the same days written as raw Records.json fixes, the page works out the same 5 stays and 4 trips by itself, each stay within a few minutes of the real one.

What this cannot do