FASTA Biological Sequence Format (.fasta)
Bioinformatics StandardFASTA is the ubiquitous, foundational file format of bioinformatics and genomics, representing nucleotide sequences (DNA, RNA) and amino acid protein sequences using universal single-letter codes.
Convert FASTA to GENBANK
Free in-browser FASTA to GENBANK converter. Convert files instantly on your device.
Inspect & Metadata
Operating systems and file analyzers identify FASTA files by inspecting the leading binary byte sequence:
Byte-Level Header Signature (Magic Bytes)
Operating systems and file analyzers identify FASTA files by inspecting the leading binary byte sequence:
HEX SIGNATURE (OFFSET 0):
3EASCII REPRESENTATION: >
Standardization: Bioinformatics de facto global standard
Technical Specifications
| Container Architecture | Plaintext sequence file where header lines start with '>' followed by sequence identifier, and succeeding lines contain single-letter nucleotide or amino acid codes |
| Compression | Uncompressed text (frequently compressed with Gzip as .fasta.gz or .fa.gz) |
| Byte Endianness | ASCII / UTF-8 text stream |
| Color Spaces | N/A (Genomic Sequence Data) |
| Channels & Structure | Nucleic acid codes (A, C, G, T, U, N) or IUPAC 20 amino acid protein codes |
| Max Dimensions | Unbounded sequence length (supports entire human chromosomes over 250 million base pairs) |
| Transparency | None |
| Streaming & Progressive | Sequential record-by-record streaming processing |
Technical Comparison Matrix: FASTA vs Competitors
| Technical Attribute | FASTA (Current) | FASTQ | GENBANK | GFF |
|---|---|---|---|---|
| Quality Scores | None (pure sequence letters) | Per-base Phred quality scores | None (feature annotations) | None (feature coordinates) |
| Header Line | Starts with '>' character | Starts with '@' character | Structured LOCUS block | Tab-delimited genomic columns |
| Primary Use | Reference genomes & BLAST search | Raw high-throughput sequencers (Illumina) | Comprehensive annotated genes | Genomic feature annotations |
| File Size (Human) | ~3 Gigabytes uncompressed | ~100+ Gigabytes (with qualities) | Multi-gigabyte rich text | ~50 Megabytes |
Common Corruption Modes & Hex Recovery Guide
Bioinformatics tool reports 'Invalid sequence character at line X'.
Root Cause: Whitespace, numbers, or non-IUPAC characters inside the sequence lines.
Recovery: Filter and clean sequence characters using File2File Bioinformatics Tool.
Security Analysis & Parser Attack Vectors
Genomics tools parse massive multi-gigabyte FASTA files where integer overflows can occur when indexing sequence coordinates.
Known Attack Vectors
- Integer overflow in 32-bit sequence indexers (FAI) exceeding 2^31 base pairs.
- Buffer overflow when reading excessively long sequence identifier headers.
- Denial of service through pathological alignment queries.
Defensive Best Practices: Use 64-bit coordinate types and enforce maximum header length validation.
Historical Origins & Milestones
Key Advantages & Pros
- The undisputed global standard of computational biology: used by every genomic tool, sequencer, and database on Earth.
- Extreme simplicity: line 1 starts with '>' followed by an ID, followed by plain text genetic letters.
- Multi-sequence capacity: a single file can contain thousands of individual genes or complete viral genomes.
Technical Limitations & Cons
- Contains no sequencing quality scores (unlike FASTQ, which stores per-base Phred confidence scores).
- No standardized metadata syntax for header lines beyond the initial identifier.
- Enormous storage footprint for whole-genome datasets without Gzip or specialized genomic compression.
Interesting Technical Trivia
- The entire 3-billion-base-pair human genome can be represented in FASTA format, taking roughly 3 gigabytes of storage.
- The four letters of DNA stored in FASTA files are A (Adenine), C (Cytosine), G (Guanine), and T (Thymine).
- When the COVID-19 coronavirus genome was first sequenced in January 2020, scientists shared it globally as a 30,000-letter FASTA file.
Frequently Asked Technical Questions
What is a FASTA file?
A FASTA file is a plain text file used in biology to store DNA, RNA, or protein sequences using single-letter abbreviations.
What is the difference between FASTA and FASTQ?
FASTA stores only the genetic sequence letters, while FASTQ stores both the letters and the sequencing accuracy quality score for each base.
How can I view a FASTA file?
You can open FASTA files in any text editor, view them in bioinformatics software like Jalview or UGENE, or convert them using File2File.app.