Application icon

Binary Tree Visualization

Tree Input

Tree input is a string that represents the structure of the binary tree. It consists of space-separated 32-bit signed integer values and the alphabet 'N' (case-insensitive) indicates a NULL node.


The values are essentially the result of level order traversal of the resulting binary tree. To indicate a null node the alphabet 'N' (case-insensitive) is used. Null nodes have no children so they are skipped when rendering the next level (children of the current level) of the binary tree.


Some Examples:


First Example

1 2 3

Second Example

1 N 3

Third Example

1 N 3 4 5



Hover on node

Sometimes, the value of a node is too large to fit inside the node. Hover on any node to expand it and make the full value visible. In mobile devices, click on a node to expand it.

Hover preview


  Recenter Button

When the tree is generated, press this button to scroll the view to the root node if lost.



About the project

Here is the repository of the project. If you like my work, please leave a star ⭐️