Phylogenetic tree maker

Draw a phylogenetic tree from Newick text: nested clades, named leaves and optional branch lengths. We render it as a rectangular cladogram and save an editable Newick block in your Markdown.

Newick tree syntax

Newick is a standard text format for trees. A tree is written as nested parentheses ending in a semicolon. Each node is a name and an optional branch length. A leaf is just a name; a clade (an internal node) is a group of children in parentheses, with an optional name after the closing bracket. Whitespace and newlines between tokens are ignored.

You write
newick
((A:0.1,B:0.2)E:0.3,(C:0.4,D:0.5)F:0.6)root;
You get

Leaves

A leaf is just its name. Put leaves in a comma-separated list inside parentheses to make a clade, and finish the whole tree with a semicolon.

You write
newick
(Human,Chimp,Gorilla);
You get

Nested clades

A clade can hold other clades. Name an internal node by writing the name straight after its closing bracket.

You write
newick
((Cat,Dog)Carnivora,(Horse,Cow)Ungulata)Mammals;
You get

Branch lengths

Add :number after any name to give that branch a length. It shows as a small label along the branch. The picture is a cladogram, so lengths label the branches but do not change where nodes sit.

You write
newick
((A:0.2,B:0.3):0.5,C:0.9)root;
You get

Cheat sheet

Write this You get
newickFirst line — starts the tree
AA leaf named A
(A,B)A clade holding leaves A and B
(A,B)CA clade named C holding A and B
A:0.3A branch of length 0.3 to leaf A
...;End of the tree (required)
'A name'A quoted name (allows spaces and punctuation)