FASTA vs. GenBank vs. TSV: Converting Between Sequence File Formats
6 min read · Updated July 10, 2026
A collaborator sends you a plasmid as a GenBank record, but the alignment tool you need to run only accepts FASTA. Or you have forty annotated records and need one column of GC content in a spreadsheet, not forty flat files. Converting between formats is mechanical once you know what each one actually stores, and what gets kept or dropped in each direction. This guide covers FASTA, GenBank and TSV, what happens when you convert between them, and how to pull a CDS or protein out of an annotated record.
What each format actually stores
FASTA is the simplest and most universal sequence format: a single header line starting with ">" followed by the raw sequence, wrapped or unwrapped. It carries no annotation at all — no gene boundaries, no strand information, nothing but the letters themselves. That's exactly why most alignment, search and primer-design tools accept FASTA as their baseline input: they only need the sequence, and FASTA guarantees there's nothing else to parse.
GenBank (.gb/.gbk) is the annotated flat-file format. Beyond the raw sequence in its ORIGIN block, it carries a FEATURES table listing genes, CDS regions, promoters, primer-binding sites and other elements, each with explicit coordinates (for example CDS 1..723, or CDS complement(100..822) if the feature reads off the reverse strand). You reach for GenBank specifically when the annotation is the point — tracking where a CDS starts, where a tag ends, where a promoter sits relative to your insert.
Tab-separated (TSV) output is different again: one row per sequence record, with columns like id, length, GC% or other computed values. Neither FASTA's header-plus-sequence block nor GenBank's LOCUS/FEATURES/ORIGIN structure is tabular, so neither drops cleanly into a spreadsheet or a script that expects rows and columns — TSV exists to bridge that gap.
Converting FASTA to GenBank
Because FASTA never had annotation to begin with, converting it to GenBank can't invent any. What you get by default is an unannotated GenBank shell — a LOCUS line and an ORIGIN block with your sequence, and little or nothing in the FEATURES table. If you need real annotation in the output (a CDS at specific coordinates, a source organism, a gene name), you have to supply that yourself as part of the conversion; the tool can only arrange what you give it, not guess where your coding region starts.
Converting GenBank to FASTA
This direction is simpler because you're removing information, not adding it. Converting GenBank to FASTA strips the FEATURES table and keeps only the raw sequence, typically using the LOCUS or DEFINITION line to build the FASTA header. That's the right move whenever the downstream tool only reads FASTA and doesn't care about feature coordinates — BLAST-style searches, most aligners, and many primer or oligo tools all fall into this category. The tradeoff is permanent for that file: once you've dropped the FEATURES table, you'd need to go back to the original GenBank record to recover it.
Extracting a CDS or protein sequence from a GenBank record
This is the practical route from "a full annotated gene or plasmid record" to "just the coding sequence or its protein," without manually counting bases against the FEATURES table by hand — a step that's easy to get off by one base, especially across a complement-strand feature.
- Find the CDS feature you want in the FEATURES table and note its coordinates, e.g. CDS 145..912 or CDS complement(145..912).
- Slice exactly that coordinate range out of the ORIGIN sequence — this gives you the coding sequence on its own, separate from the rest of the plasmid or contig.
- If the feature is marked complement(), reverse-complement the sequence you just sliced out — the coordinates describe positions on the sequence as written in ORIGIN, and complement() means the gene actually reads on the opposite strand.
- Optionally translate that CDS using the standard codon table if what you actually need is the protein sequence, not the nucleotides.
Choosing a format for the task in front of you
- Keep working sequences in GenBank whenever annotation matters — cloning design, feature-aware analysis, anything where you need to know where the CDS or promoter actually sits.
- Convert down to FASTA when a tool only needs the raw sequence and has no use for feature coordinates.
- Extract to TSV when you need many records' worth of one or two computed values — length, GC%, accession — in a table a spreadsheet or script can consume directly.
Converting without doing it by hand
SeqBench's Format Converter handles these conversions directly: FASTA, GenBank and TSV in either direction, plus pulling out just the CDS or translated protein sequence from a GenBank record's FEATURES table, complement strand included. If you're starting from an accession rather than a local file, Sequence Fetcher retrieves the GenBank or FASTA record for a given accession before you convert or extract from it. And if you want to see the feature coordinates laid out on a map before you extract anything, GenBank Viewer renders the annotated record as a linear or circular map with its feature table alongside.
Frequently asked questions
How do I convert a GenBank file to FASTA?
Strip the FEATURES table and keep only the header (usually built from the LOCUS or DEFINITION line) and the raw sequence from the ORIGIN block — that's what any GenBank-to-FASTA conversion does under the hood.
Can I convert a FASTA file to GenBank with real annotation?
Not automatically — a FASTA file never had feature coordinates to begin with, so conversion alone produces an unannotated GenBank shell unless you supply the CDS or gene coordinates yourself.
How do I extract just the CDS from a GenBank file?
Read the CDS feature's coordinates from the FEATURES table, slice that range out of the sequence, reverse-complement it if the feature is marked complement(), and translate it if you need the protein rather than the nucleotides.
What format should I use to get sequence stats into a spreadsheet?
Export to TSV — one row per record with columns like id, length and GC%, which drops directly into a spreadsheet or script, unlike FASTA or GenBank's per-record block structure.
Related references
Quick reference for FASTA, FASTQ, GenBank and related formats.
SAM/BAM flags, VCF, BED and GFF/GTF columns and coordinate systems.
Reference table of common cloning and protein expression vectors with backbone size, origin of replication, copy number, selection marker, promoter and fusion tags.
Related tools
Convert between FASTA, GenBank and tab-separated formats, and extract CDS or protein sequences.
Paste a GenBank record and see an annotated circular or linear map with a feature table.
Paste a GenBank, RefSeq or UniProt accession and get the FASTA or GenBank record.