Convert your Android-exported Google Timeline JSON into daily GPX tracks.
Convert a Google Timeline JSON file (exported from Android) into daily GPX track files.
Each .gpx file represents a day of location history with standard GPS <trk> data, compatible with tools like Kashmir 3D, Garmin BaseCamp, or QGIS.
- ✅ Supports
semanticSegmentsformat used in Android timeline exports - 📆 Automatically splits data into daily tracks
- 🗂️ Outputs one
.gpxfile per day - 🧭 GPX 1.1-compliant output
- 🐍 Lightweight, no external dependencies
This tool accepts a JSON file exported from the Android "Timeline" export feature (not from Google Takeout). Example top-level keys expected:
{
"semanticSegments": [...],
"rawSignals": [...],
"userLocationProfile": {...}
}python tl2gpx.py <Timeline.json> <output_directory>Example:
python tl2gpx.py Timeline.json gpx_outputTimeline.json: Your exported timeline JSON filegpx_output: Directory where GPX files will be saved
After running the script, you’ll get:
gpx_output/
├── 2023-08-01.gpx
├── 2023-08-02.gpx
├── ...
Each file contains a <trk> element with GPS <trkpt> entries and timestamps.
- Load tracks into Garmin devices or BaseCamp
- Analyze or overlay paths in QGIS
This project is licensed under the MIT License. See LICENSE for details.