What is an AVL Tree Visualizer?
An AVL tree visualizer shows how a self-balancing binary search tree stores values. Like a normal BST, smaller values go left and larger values go right. Unlike a plain BST, an AVL tree rotates nodes to keep the height balanced.
This tool builds an AVL tree from an insertion-order array, shows the balance factor for each node, and records rotations that happen during insertion.
For the full tree and algorithm set, browse the Data Structure Visualizers hub.
How to use this AVL tree visualizer
- Paste an insertion-order array such as
[30, 20, 10, 25, 40, 50]. - Click Build AVL to insert each value with AVL balancing.
- Search for a value to highlight the lookup path.
- Insert or delete values to see the tree rebuild with balance restored.
- Compare the rotation log with the final tree shape.
AVL rotations
AVL trees use four rotation cases: left-left, right-right, left-right, and right-left. These rotations keep the height difference between the left and right subtree of each node within one.
If you want to compare an unbalanced search tree against this page, use the Binary Search Tree Visualizer. To compare AVL balancing with red/black color rules and recoloring, use the Red Black Tree Visualizer.
If you want shape-based input without automatic search ordering, use the Binary Tree Visualizer.