Pathfinding Visualizer
Watch graphs get traversed and shortest paths get found
Graph and pathfinding algorithms answer two questions: can I reach this node? and what is the cheapest route? These visualizers draw the search frontier as it expands, so the difference between an uninformed search like BFS and a heuristic-guided one like A* becomes obvious.
Run each algorithm on your own grid, drop walls and weights, generate a maze, and step through to see exactly which cells get visited and why.
Browse Visualizers
Dijkstra's Algorithm Visualizer
Greedily settles the nearest node — shortest paths on weighted graphs, O((V+E) log V).
A* Pathfinding Visualizer
Dijkstra plus a heuristic that aims at the goal — far fewer nodes explored for point-to-point search.
Breadth-First Search (BFS) Visualizer
Explores level by level with a queue — shortest path on unweighted graphs, O(V+E).
Depth-First Search (DFS) Visualizer
Dives down one branch with a stack — great for cycle detection and maze carving.
Maze Generator
Generate random mazes to test the pathfinders against.
Why visualize pathfinding?
Pathfinding powers GPS routing, game AI and network design. Seeing BFS fan out evenly while A* drives straight at the goal makes heuristics click in a way pseudocode cannot — ideal for students and interview prep.
Frequently asked questions
What is the difference between BFS, DFS, Dijkstra and A*?
BFS explores level by level and finds shortest paths on unweighted graphs; DFS dives down one branch; Dijkstra finds shortest paths on weighted graphs; A* speeds Dijkstra up with a heuristic that aims toward the goal.
When should I use A* over Dijkstra?
Use A* for point-to-point pathfinding when you can estimate the remaining distance (e.g. straight-line distance) — the heuristic lets it explore far fewer cells. Use Dijkstra when you need paths to every node or have no good heuristic.