PHYLIP to FASTA Converter

Paste a PHYLIP multiple-sequence alignment — sequential or interleaved, strict or relaxed taxon names — and get standard FASTA back. Runs entirely in your browser, nothing is uploaded.

Try:
FASTA output

What this tool does

Convert a PHYLIP multiple-sequence alignment into standard FASTA, right in your browser. Paste the alignment — the count header plus the body — and the tool works out whether it is sequential or interleaved, whether the taxon names are strict 10-column or relaxed whitespace-delimited, and writes one >name record per taxon. Nothing is uploaded: it runs locally, works offline, and needs no sign-up.

The two PHYLIP layouts

Every PHYLIP file opens with a count header — the number of taxa and the number of aligned sites, e.g. 3 12. What follows comes in one of two shapes.

LayoutBody shape
SequentialEach taxon's whole sequence is written out (possibly wrapped over several lines) before the next taxon begins.
InterleavedThe first block holds every taxon's name plus the first chunk of its sequence; each later block appends the next chunk, in the same taxon order.

Taxon names come in two shapes too. Strict PHYLIP puts the name in columns 1–10 and starts the sequence at column 11, with no separator required — which is why classic PHYLIP truncates names at ten characters. Relaxed PHYLIP (the RAxML / PhyML convention) uses the first whitespace-delimited word as the name, so names can be any length.

Leave both selectors on Auto-detect and the tool tries each candidate parse and keeps the one whose sequences match the site count in the header. Force a specific layout or name style when you know your file and want the parse pinned.

Options

OptionWhat it does
Body layoutAuto-detect (default), Sequential, or Interleaved.
Taxon name styleAuto-detect (default), Strict (columns 1–10), or Relaxed (first word).
FASTA line widthWrap each sequence at this many characters. Default 60, the conventional FASTA width; 0 writes one long line per sequence.
Uppercase residuesNormalise the sequence case (acgtACGT).
Strip gapsRemove the alignment gap characters - and ., turning the aligned FASTA into unaligned sequences. Off by default, so gaps survive untouched.
TolerantConvert anyway when the file disagrees with its own header — wrong taxon count, wrong sequence length, or unexpected residue characters. Off by default, so mismatches are reported instead.

Worked example

An interleaved alignment of three taxa over twelve sites:

3 12
Alpha     ACGT
Beta      ACGA
Gamma     TCGA

ACGTACGT
ACGTACGT
ACGTACGT

With FASTA line width set to 0, each taxon's two chunks are joined into one record:

>Alpha
ACGTACGTACGT
>Beta
ACGAACGTACGT
>Gamma
TCGAACGTACGT

The same alignment written sequentially — Alpha's twelve sites, then Beta's, then Gamma's — produces exactly the same FASTA, because Auto-detect recognises both bodies.

Now a gapped alignment with Strip gaps switched on:

2 10
Alpha     AC--GTAC-T
Beta      ACGTGT--CT
>Alpha
ACGTACT
>Beta
ACGTGTCT

Limits and edge cases

FAQ

Do I need to know whether my file is sequential or interleaved?

No. Leave Body layout on Auto-detect and the tool parses the file both ways and keeps the reading whose sequence lengths match the site count in the header. Force one of the two only if you want the parse pinned, or if a badly-formed file is being read the wrong way.

Why did my long taxon names get cut to ten characters?

That happens when the Taxon name style is forced to Strict, where the name is defined as columns 1–10 of the line. Modern relaxed PHYLIP writers (RAxML, PhyML) allow longer names separated by whitespace — pick Relaxed, or leave the selector on Auto-detect, which prefers the relaxed reading whenever it produces sequences of the declared length.

Are gap characters preserved?

Yes, by default. - and . pass through unchanged, so the FASTA output is still a valid alignment with the same columns. Turn on Strip gaps when you want unaligned sequences instead — for example to feed a BLAST search or re-align with different settings.

What does the site-count error mean?

The header declares how many aligned sites each sequence should have. If a taxon comes out shorter or longer, the file is usually truncated, mis-wrapped, or in a layout that does not match the forced selector. The message names the taxon and gives both the parsed and the declared count, so you can find the offending block. Tolerant converts anyway if you just want the sequences out.

Is my alignment uploaded anywhere?

No. The conversion runs entirely in your browser using WebAssembly. Your sequences never leave your device, and the page keeps working offline once it has loaded.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool phylip-to-fasta "3 12
Alpha     ACGT
Beta      ACGA
Gamma     TCGA

ACGTACGT
ACGTACGT
ACGTACGT"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/phylip-to-fasta/?phylip=3%2012%0AAlpha%20%20%20%20%20ACGT%0ABeta%20%20%20%20%20%20ACGA%0AGamma%20%20%20%20%20TCGA%0A%0AACGTACGT%0AACGTACGT%0AACGTACGT&layout=auto&name_style=auto&wrap=60&uppercase=true&remove_gaps=true&tolerant=true

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.