Shortest Path Teaching Tool
Find the shortest route through a network. Compare the fewest steps with the lowest cost and see how the route is chosen.
Why can the fewest-hop route differ from the cheapest route?
A direct connection can cost more than several short steps. Choose start and destination nodes to compare Dijkstra’s lowest-cost path with the fewest-hop path. Block unavailable locations, inspect the selected route and settled distances, and export the route with your graph.
Make the connections.
On your deviceImport graph JSON
Use directed: true or false, a nodes array with unique IDs, and edges with source and target IDs.
Keyboard: focus a node and use arrow keys to move it; hold Shift for larger steps. Labels and notes are available in the editor below.
Find a route
Hold Command or Control to choose several blocked locations. Start and destination must remain available.
Nodes & notes
Deleting a node also deletes its connections. Undo restores both. Keep at least one node.
Connections
Three simple steps
How to use Shortest Path Teaching Tool
Open a graph project or edit nodes and connections in the workspace.
Explore the graph and choose the relevant analysis or layout controls.
Export the diagram, data tables or an editable project.
Common questions
Good to know
Understand the result.
Keep the original.
Is this tool free, and are my files uploaded?
This tool is free with no account required. The work happens in your browser. Your input and files are not sent to a processing server.
What are the limits and details?
This uses your authored graph and nonnegative edge costs. Directed edges are one-way, and blocked nodes cannot be traversed. The route planner is for graph exercises and game maps; it does not provide real-world street navigation or live travel conditions.
Limits: 500 nodes, 2,000 edges and 500,000 project characters. Expensive operations run in a cancellable 30-second browser worker.