Newick vs NEXUS
Newick and NEXUS are the two text formats you meet most often when moving phylogenetic trees between programs. The short version: Newick is one tree on one line, and NEXUS is a container that holds that same tree plus the data and settings around it.
The one-line summary
A Newick file is a tree, written as nested parentheses ending in a semicolon. A NEXUS file is a document that contains a tree (in a TREES block) alongside other blocks for the taxa and data. Crucially, the tree inside a NEXUS file is written in Newick, so the two are not rivals so much as one nested inside the other.
What each one stores
| Newick | NEXUS | |
|---|---|---|
| Basic unit | One tree, one line | A document of labelled blocks |
| Multiple trees in one file | One per line | Yes, all in the TREES block |
| Taxon list and data matrix | No | Yes (TAXA, DATA / CHARACTERS blocks) |
| Analysis settings | No | Yes (in dedicated blocks) |
| Branch lengths and support | Yes | Yes (same Newick syntax, inside TREES) |
| Typical extension | .nwk, .newick, .tree | .nex, .nexus |
| Best for | Moving a tree quickly | Carrying trees plus data and settings |
When to use Newick
Use Newick when the tree is the only thing you need to move. It is compact, almost every program reads it, and you can paste it straight into a viewer. If someone asks for "the tree" and nothing else, send Newick. The Newick format guide walks through the syntax.
When to use NEXUS
Use NEXUS when the tree needs to travel with its data or its analysis settings, when you want several trees and their shared taxon list in one tidy file, or simply when the program you are feeding requires it. MrBayes, PAUP* and Mesquite all expect NEXUS. The NEXUS format guide breaks down the blocks.
Converting between them
Because a NEXUS tree is Newick inside, converting is mostly wrapping or unwrapping:
- NEXUS to Newick: find the TREES block and copy the string in parentheses that ends in a semicolon. That string is your Newick tree. Watch for a TRANSLATE table: if the tree uses numbers, swap each one back for its taxon name first.
- Newick to NEXUS: place the Newick string inside a TREES block under a
#NEXUSheader. A tool can add the TAXA block and tidy the formatting for you.
Doing it in this tool
This tool imports Newick and exports both Newick and NEXUS. So it doubles as a converter:
- Newick to NEXUS: paste your Newick into Import Newick, then choose Export → NEXUS.
- NEXUS to a figure: copy the Newick string out of the file's TREES block, paste it into Import Newick, and the tree is drawn. From there, export an SVG or PNG, or re-export as Newick or NEXUS.
Build yours in the browser, no signup, no install.
Open the cladogram maker