This is a simple tool to help visualize the route packets take to a questionable degree of accuracy. Try it out yourself: http://tracemap.imjoseph.com/

Table of contents
Open Table of contents
Project Goal
It is amazing to me that thanks to the internet I am able to access websites and servers from across the globe. You can ping any public IP and you just sent a packet possibly thousands of Kilometers. It’s for this reason I really enjoy using Traceroute (or Tracert depending on who you ask). By using Traceroute you can see hops on the path to a destination IP.
On its own Traceroute is cool, but when using a online IP geolocator I found myself wanting to map an entire traceroute. I wanted it to be simple, just paste your Traceroute output in and viola you’ve got a map.
Design
To simplify the process of aggregating data and fetching geolocation data I created my own API. The API is still a work in progress and I have a lot of tweaking to do before I am happy enough to do a full write up about it.
The Traceroute output is parsed automatically and the IPs are pulled one from each line. The IPs are then passed to the API and their data is returned. part of this data is the IP’s (Lat, Lon), I then used leafletjs to place points on the map.
Many IPs will share a location for one reason or another so often points on the map end up stacked. To get around this I used the OverlappingMarkerSpiderfier library to allow viewing of overlapping points.

Each hop is then given a drop down where you can drill down and view all the returned data from the API.

The last useful feature that was most important to me was the option to include your own public IP. By checking the Include my own public IP as starting point box Traceroute Map will call the APIs /self endpoint which returns the IP info on the source IP. It places it as the second hop assuming the first hop is your private gateway IP. By using your hosts public IP as the first hop you get results like this traceroute from Vancouver to www.youtube.com:

Thoughts on IP Geolocation
This whole project is built on pretty shaky ground. IP geolocations are often self reported at a prefix level and some IP location databases default to Company HQ’s for a location. There are some approaches to Geolocation that use latency to triangulate IP’s location but I that is not what I used for this project. More on latency based IP triangulation here.
So for now I would not count on this project for exactness, just a rough approximation. As an example of it going well here is the location of BCIT with respect to its IP geolocation:

Project Links
- Try it Yourself: http://tracemap.imjoseph.com/
- Leafletjs: https://leafletjs.com/
- Spiderfier plugin: https://github.com/jawj/OverlappingMarkerSpiderfier-Leaflet
- paper on IP Geolocation: https://doi.org/10.1016/j.comnet.2025.111721