Pathfinding Visualizer
This grid pathfinding visualizer shows how the classic search algorithms explore a maze. Paint walls with the mouse, drag the start and goal, then run breadth-first search, Dijkstra’s algorithm, greedy best-first or A* and watch cells light up in the order they are visited before the shortest path is traced back. A weighted-terrain brush and a choice of heuristics (Manhattan, Euclidean, Chebyshev) let you see exactly why A* usually reaches the goal after touching far fewer cells than Dijkstra while still finding an optimal route.
Runs 100% in your browser — simulations are computed locally on your device.
Read the full guide to this tool
Notes
- Breadth-first search and Dijkstra guarantee the shortest path; greedy best-first is fast but can return a longer route.
- A* adds a heuristic estimate of the remaining distance to Dijkstra’s cost-so-far, so it explores toward the goal and expands fewer cells.
- A* only stays optimal when the heuristic never overestimates the true remaining distance (an admissible heuristic).
- Runs 100% in your browser — simulations are computed locally on your device.