Programming

Graph Visualizer — Nodes, Edges, BFS & DFS

Build graphs with nodes and edges, switch directed/undirected mode, and run BFS/DFS with step-by-step visited/frontier explanations.
Controls
Pick an operation, then execute and step through.
Graph (undirected)
0 nodes • 0 edges
Code-like representation
Connect the visual model to what you’d write in code.
graph
Undirected adjacency list:
Step-by-step explanation
Watch intermediate reasoning, not just the final result.
Step 0 / 0
Choose an operation and click Execute to generate steps.
Teaching notes
Short, beginner-friendly reminders.
Learning mode
A graph models relationships using nodes (vertices) and edges.
BFS explores layer-by-layer; DFS explores depth-first.
Operation history
Track what you tried and what happened.
No operations yet.

Runs in your browser

This tool processes your input on your device. Files you select are not uploaded to MuhammadLab.