SeqBench

Sequence File Formats — FASTA, FASTQ and GenBank

Almost all sequence data is stored as plain text in one of a few standard formats. The three you meet most often are FASTA (sequences), FASTQ (sequencing reads with quality scores) and GenBank (annotated records). Here is what each looks like and when to use it.

FASTA

The simplest format: each record is a header line starting with > and an identifier, followed by the sequence on one or more lines. No quality scores. Used for reference genomes, genes and protein sequences.

fasta
>seq1 example sequence
ATGGCCATTGTAATGGGCCGCTGAAAGGGTGCCCGATAG
ATGCAAGCTTGGCACTGGCCGTCGTTTTACAACGTCGTG

FASTQ

The standard for raw sequencing reads. Each record is four lines: an @ header, the sequence, a + separator, and a line of Phred quality characters — one per base, so the sequence and quality lines are always the same length.

fastq
@read1
ATGGCCATTGTAATGGGCCGCTGAAAGGGTGCCCGATAG
+
IIIIIIIIIIIIIIIHHHHHHGGGGGFFFFEEEDDDCCCB

GenBank

An annotated format. Beyond the sequence (in the ORIGIN block) it carries structured metadata — a LOCUS line, DEFINITION and a FEATURES table describing genes, CDS and their coordinates. Records end with //.

genbank
LOCUS       SEQ1         39 bp    DNA     linear   01-JAN-2026
DEFINITION  Example sequence record.
FEATURES             Location/Qualifiers
     CDS             1..39
                     /gene="example"
ORIGIN
        1 atggccattg taatgggccg ctgaaagggt gcccgatag
//

FASTA vs FASTQ vs GenBank

FormatExtensionsStoresQualityTypical use
FASTA.fasta .fa .fna .faaID + sequenceNoReference sequences, genomes, proteins
FASTQ.fastq .fqID + sequence + per-base qualityYes (Phred)Raw sequencing reads
GenBank.gb .gbkSequence + rich annotationNoAnnotated records (genes, plasmids)

Other common formats handle later analysis steps: SAM/BAM store read alignments, and VCF stores genetic variants — both are outside the scope of these three sequence formats.

Frequently asked questions

What is a FASTA file?

A FASTA file is a plain-text format for one or more sequences. Each record starts with a header line beginning with '>' followed by an identifier, then one or more lines of sequence. It stores no quality information and is the most common format for reference DNA, RNA and protein sequences.

What is the difference between FASTA and FASTQ?

FASTA stores just an identifier and the sequence. FASTQ adds a per-base quality score: each record is four lines — an '@' header, the sequence, a '+' separator, and a line of Phred quality characters the same length as the sequence. FASTQ is used for raw sequencing reads; FASTA for finished sequences.

Why does a FASTQ record have four lines?

Line 1 is the read ID (starting with @), line 2 is the sequence, line 3 is a separator (a '+', optionally repeating the ID), and line 4 encodes a quality score for every base as an ASCII character. The sequence and quality lines must be the same length.

What does a GenBank file contain that FASTA does not?

GenBank is an annotated format: alongside the sequence it carries structured metadata — a LOCUS line, DEFINITION, source organism and, crucially, a FEATURES table describing genes, CDS, regulatory elements and their coordinates. FASTA carries only a header and the bases.

Learn more

Sources

  1. 1
    FASTA format for nucleotide sequences
    NCBI (National Center for Biotechnology Information), GenBank submission standards
    The FASTA section and FASTA_EXAMPLE: that a record begins with a definition line starting with '>' followed by a unique sequence identifier, and that the sequence follows on the next line(s) and may contain line returns. Also backs the COMPARISON table's FASTA row 'ID + sequence' / 'Quality: No'. Fetched text: "In FASTA format the line before the nucleotide sequence, called the FASTA definition line, must begin with a carat ('>'), followed by a unique SeqID" and "The line after the FASTA definition line begins the nucleotide sequence." It also states "It is recommended that each line of sequence be no longer than 80 characters" (a line-length convention the SeqBench page does not currently assert).
  2. 2
    The Sanger FASTQ file format for sequences with quality scores, and the Solexa/Illumina FASTQ variants
    Cock PJA, Fields CJ, Goto N, Heuer ML, Rice PM · Nucleic Acids Research 38(6):1767-1771; doi:10.1093/nar/gkp1137; PMID 20015970 · 2010
    Everything on the page about FASTQ: the FASTQ_EXAMPLE four-line record, the FASTQ section prose ('four lines: an @ header, the sequence, a + separator, and a line of Phred quality characters — one per base'), the COMPARISON row 'FASTQ / ID + sequence + per-base quality / Quality: Yes (Phred)', and FAQ items 2 and 3. Fetched text: "There are four line types in the FASTQ format. First a '@' title line...Second comes the sequence line(s)...Third...comes the '+' line...Finally, comes quality line(s)." This is the canonical primary description of the format; it is the paper that reconciled the Sanger and Solexa/Illumina variants.
  3. 3
    Sample GenBank Record
    NCBI (National Center for Biotechnology Information)
    The GenBank section, GENBANK_EXAMPLE and FAQ item 4: the LOCUS line and its constituent fields (locus name, sequence length, molecule type, division, modification date), DEFINITION, the FEATURES table described as "Information about genes and gene products, as well as regions of biological significance reported in the sequence", ORIGIN, and the '//' record terminator. Also backs the COMPARISON row 'GenBank / Sequence + rich annotation / Quality: No'.
  4. 4
    The DDBJ/ENA/GenBank Feature Table Definition, Version 11.4
    INSDC (International Nucleotide Sequence Database Collaboration) · 2026
    The specific contents of GENBANK_EXAMPLE's FEATURES block and the page's claim that the FEATURES table describes 'genes, CDS, regulatory elements and their coordinates': the CDS feature key ("Coding sequence; sequence of nucleotides that corresponds with the sequence of amino acids in a protein (location includes stop codon)"), the location descriptor syntax that makes '1..39' legal, and the /gene="text" qualifier shown in the example. This is the standard the FEATURES table is actually defined by — NCBI's sample record shows it, INSDC specifies it.

Related tools and references