Home▸Algorithms & AI▸2D Pathfinding Grid — A*, Dijkstra & BFS Visualizer (2D)

2D Pathfinding Grid — A*, Dijkstra & BFS Visualizer

A real 2D grid pathfinding visualizer: draw walls, drag start/end, generate a maze and watch A*, Dijkstra and BFS expand their open/closed sets step by step with a correct heuristic and edge relaxation, then compare visited counts and path length.

Algorithms & AI2DEasy60 FPS📱 Mobile-adapted⇄ 3D version
2d-pathfinding ↗ Open standalone

This 2D companion to the 3D Pathfinding simulator runs the exact same graph-search algorithms — A*, Dijkstra, Greedy Best-First and BFS — on a flat top-down grid drawn with plain 2D canvas fills instead of a WebGL texture quad. The open set, closed set, heuristic and edge relaxation are all real: nothing here is a pre-baked animation of a path, the frontier expands one popped node at a time exactly as the algorithm dictates, so a slower or buggier heuristic visibly explores more cells before it reaches the goal.

⚙ Under the hood

A real 2D top-down companion to the 3D Pathfinding simulator: A*, Dijkstra, Greedy Best-First and BFS run as genuine graph search over a grid, with a real open/closed set, a min-heap priority queue, an admissible Manhattan or Euclidean heuristic for A*, and real edge relaxation for Dijkstra — not a scripted animation. Draw walls with click or drag, place start and end, generate a recursive-backtracker maze, then run or step through the search and watch the frontier expand cell by cell until the shortest path lights up.

pathfinding visualizationA* algorithmDijkstraBFSgreedy best-firstgraph searchgrid algorithmcanvas 2dmaze solving

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)