FASTA to CSV Converter
Turn a FASTA or multi-FASTA file into a spreadsheet-ready table — one row per record with id, description, sequence and length, plus optional GC content and base counts. Runs entirely in your browser, nothing is uploaded.
What this tool does
Paste a FASTA or multi-FASTA file and get a spreadsheet-ready table back —
one row per record. By default each row carries the record's id, its
description, the full sequence and its length; wrapped sequence lines are
joined back into a single field first.
Nothing is uploaded. The parsing runs locally in your browser using WebAssembly, so it works offline and needs no sign-up.
Columns
| Column | When | What it holds |
|---|---|---|
id | always | The header text up to the first space (or the whole header, see below). |
description | header handling = split | Whatever follows that first space. |
sequence | Sequence column on | The record's sequence with all wrapped lines joined. |
length | Length column on | Number of sequence characters — gaps and ambiguity codes such as N count. |
gc_percent | GC content on | (G+C) / (A+C+G+T) × 100, two decimals, case-insensitive; N and gaps are excluded from both sides. |
a_count … other_count | Base counts on | Case-insensitive counts of A, C, G, T and everything else. |
Options
| Option | What it does |
|---|---|
| Delimiter | Comma for .csv, Tab for .tsv, or Semicolon/Pipe when your spreadsheet uses a comma as its decimal separator. |
| Header handling | Split into id + description (default), Id only (drops the description column), or Whole header line as id (keeps >gi|123|ref|NM_000.1 Homo sapiens intact in one cell). |
| Write a header row | On by default so the table opens with named columns. Turn it off for a bare data table. |
| Sequence / Length columns | Both on by default. Turn the sequence off for a names-and-metrics table. |
| GC content / Base counts | Add the extra metric columns described above. |
| Uppercase sequence | Normalises acgt → ACGT in the sequence column only. |
| Drop duplicate sequences | Keeps the first record of each identical sequence (compared case-insensitively). |
Worked example
Input:
>seq1 first sequence
ACGTACGTNN
>seq2
acgt
Default output — comma delimiter, header row, id split from description:
id,description,sequence,length
seq1,first sequence,ACGTACGTNN,10
seq2,,acgt,4
seq2 has no description, so that cell is empty. Now switch GC content and
Base counts on and the same input gives:
id,description,sequence,length,gc_percent,a_count,c_count,g_count,t_count,other_count
seq1,first sequence,ACGTACGTNN,10,50.00,2,2,2,2,2
seq2,,acgt,4,50.00,1,1,1,1,0
seq1 is 10 characters long, but its two Ns land in other_count and are left
out of the GC calculation — 4 of its 8 unambiguous bases are G or C, so
gc_percent is 50.00.
Limits and edge cases
- The input must contain at least one
>header line. Sequence data appearing before the first header is rejected with the offending line number. - Up to 50,000 records per conversion. Split a larger file and convert it in parts; very large inputs are also bounded by your device's memory.
- Fields are quoted per RFC 4180: any value containing the delimiter, a
double quote or a line break is wrapped in
"and its inner quotes are doubled. Descriptions with commas are therefore safe in CSV mode. - Blank lines are ignored,
CRLFline endings are normalised, and a header with no sequence after it yields an emptysequencecell withlength0. length,gc_percentand the base counts are computed from the original sequence, so Uppercase sequence never changes them.
FAQ
How does the tool decide what is the id and what is the description?
With the default Split into id + description setting, everything up to the first
whitespace character in the header becomes id and the remainder becomes
description. >seq1 first sequence therefore yields seq1 and
first sequence. If your identifiers contain spaces you care about, choose
Whole header line as id to keep the header in a single cell.
Can I get a TSV instead of a CSV?
Yes — set Delimiter to Tab. The columns and options are identical; only the
separator changes, and commas inside descriptions no longer need quoting. Save the
result with a .tsv extension.
What does the length column count?
Every character of the joined sequence, including ambiguity codes like N and
alignment gaps like -. That matches how most FASTA tooling reports length. If
you need the unambiguous base total instead, switch on Base counts and add
a_count + c_count + g_count + t_count.
Does it work with protein FASTA, not just DNA?
Yes. Parsing, the id/description split, length and the CSV quoting are all
sequence-agnostic. The gc_percent column is only meaningful for nucleotide
sequences, and for protein input the base counts put nearly every residue into
other_count, so leave those two options off.
Is my sequence data 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 fasta-to-csv ">seq1 first sequence
ACGTACGTNN
>seq2
acgt"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/fasta-to-csv/?fasta=%3Eseq1%20first%20sequence%0AACGTACGTNN%0A%3Eseq2%0Aacgt&delimiter=comma&header_mode=split&header_row=true&include_sequence=true&include_length=true&include_gc=true&include_base_counts=true&uppercase=true&dedupe=trueMachine-readable descriptor: tool.json — title + parameters JSON Schema for agents.
