ChatDiagram
Tools/Binary tree generator

Binary tree generator.

Create a binary tree by describing its root and each left and right child. Use the generator to visualize binary search trees, expression trees, decision trees and examples for traversal practice.

Organisation ChartEnter to send

Free account, no card · Export SVG, PNG or PDF

See it work

Binary tree examples.

Same tool, four requests. Every drawing below is a real render.

What you type
Create a binary search tree from the insertion order 50, 30, 70, 20, 40, 60, 80 and 10, with 50 as the root and every smaller value on the left branch.
Then tryInsert 65 into the tree.Add 75 as the left child of 80.
Organisation chart: Binary search tree
Organisation chart · Reingold-Tilford tidy tree · schematex-orgchart

Rather start from a finished drawing? Browse 111 org chart templates →

The drawing

What a binary tree is.

A binary tree is a tree data structure in which each node has at most two children: a left child and a right child. The meaning of those children depends on the application.

In a binary search tree, left values are smaller and right values are larger. In an expression tree, internal nodes are operators and leaves are operands. The same branching shape supports many algorithms.

Standard
Reingold-Tilford tidy tree
Engine
schematex-orgchart
Editable
Double-click text, drag nodes
Export
SVG · PNG · PDF
Organisation chart: What a binary tree is
Who uses it

Who uses binary trees.

Organisation chart: Computer science studentsComputer science students

Small trees for learning insertion, traversal and recursive algorithms.

Organisation chart: Software developersSoftware developers

Expression trees that show how parsers preserve grouping and precedence.

Organisation chart: Support teamsSupport teams

Two-way decision paths for basic troubleshooting.

How it works

How to make a binary tree in three steps.

01

Describe it

One paragraph is enough to start.

“Create a binary search tree from the insertion order 50, 30, 70, 20, 40, 60, 80 and 10, with 50 as the root and every smaller value on the left branch.”
02

See the drawing

Drawn by the right engine.

Organisation chart: Binary search tree
03

Say what changes

Every edit keeps a version.

Insert 65 into the tree.
V2 · DRAWN FROM V1, NOTHING RETYPED
FAQ

Common questions

What is a binary tree?

A binary tree is a tree where each node has no more than two children, conventionally called left and right.

What is a binary search tree?

A BST is a binary tree where every left-subtree value is smaller and every right-subtree value is larger than its node.

Does insertion order affect a BST?

Yes. Different insertion orders can produce different valid shapes from the same values.

What are tree traversals?

Traversals are orders for visiting nodes, including preorder, inorder and postorder.

Related tools

Other drawings for the same work.

Create a binary tree now.

Free account, no card. Describe the structure and see it in under a minute.

Open the editor