Skip to main content
Z Graph & Pathfinding

Pathfinding Visualizer

Watch graphs get traversed and shortest paths get found

Free No signup Runs in your browser

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

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.