Dijkstra's Algorithm Visualizer — Interactive Pathfinding
Interactive Dijkstra pathfinding on a grid — draw walls, move start/goal, generate mazes, step through the search. Runs in your browser.
Click & drag on the grid to draw walls · drag the green and red squares to move start / goal · then press Play.
Pseudocode
Time · Space
How to use
- 1 Draw walls by clicking and dragging on the grid; drag the green start or red goal to move them.
- 2 Press Play to watch Dijkstra expand outward from the start in order of distance.
- 3 Use Maze for instant obstacles, or Step through one node at a time.
- 4 When the goal is reached, the shortest path is highlighted in gold.
Why use this tool
- See Dijkstra explore cells in increasing distance order — the classic uniform-cost search.
- On an unweighted grid every edge costs 1, so Dijkstra finds the shortest path.
- Compare its broad exploration with A*, which uses a heuristic to head toward the goal.
- Runs entirely in your browser. No signup, no uploads.
Frequently asked questions
What is Dijkstra's algorithm?
Dijkstra's algorithm finds the shortest path from a start node to all other nodes in a weighted graph with non-negative edge weights, always expanding the closest unvisited node first.
What is the time complexity of Dijkstra's algorithm?
With a binary-heap priority queue it is O(E log V), where V is the number of vertices and E the number of edges.
How is Dijkstra different from BFS?
On an unweighted graph they explore the same way and both find shortest paths. Dijkstra generalizes BFS to weighted graphs by ordering the frontier by total distance instead of by hop count.
How is Dijkstra different from A*?
A* adds a heuristic estimate of the remaining distance to the priority, so it explores toward the goal and usually visits far fewer nodes while still finding the shortest path.
What is Dijkstra's Algorithm Visualizer?
A Dijkstra's Algorithm Visualizer animates shortest-path search on a grid: the algorithm repeatedly expands the closest unvisited cell, exploring outward by distance until it reaches the goal, then highlights the shortest path. You can draw walls and move the start and goal.
Dijkstra's Algorithm Visualizer is a free algorithm utility by Zerethon Tools. Interactive Dijkstra pathfinding on a grid — draw walls, move start/goal, generate mazes, step through the search. Runs in your browser. Runs entirely in the browser — no signup, no upload.
- Category
- Algorithm
- Pricing
- Free
- Privacy
- Browser-based
- Signup
- Not required
Privacy
Your data never leaves your browser unless explicitly stated. Dijkstra's Algorithm Visualizer runs entirely client-side — no server upload, no logging, no tracking of your input.
Related tools
A* Pathfinding Visualizer
Interactive A* pathfinding on a grid with a Manhattan heuristic — draw walls, move start/goal, generate mazes, step through the search. Runs in your browser.
Open toolBreadth-First Search (BFS) Visualizer
Interactive breadth-first search on a grid — draw walls, move start/goal, generate mazes, step through the level-by-level expansion. Runs in your browser.
Open toolDepth-First Search (DFS) Visualizer
Interactive depth-first search on a grid — draw walls, move start/goal, generate mazes, step through the deep-dive exploration. Runs in your browser.
Open toolBubble Sort Visualizer
Animated bubble sort with step controls, speed, custom input, live comparison/swap counters and pseudocode. Runs entirely in your browser.
Open toolBuild, share, and grow on Zerethon Social
Free signup. Earn points, collect achievements, and connect with creators worldwide.