NCBI GenBank Flat File (.gb)
NCBI StandardNCBI GenBank Flat File (.gb / .gbk) is the gold standard genomic annotation format maintained by the National Institutes of Health (NIH), combining complete DNA sequences with detailed gene locations, coding regions, and scientific literature citations.
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 GenBank files by inspecting the leading binary byte sequence:
Byte-Level Header Signature (Magic Bytes)
Operating systems and file analyzers identify GenBank files by inspecting the leading binary byte sequence:
HEX SIGNATURE (OFFSET 0):
4C 4F 43 55 53 20 20 20 20 20ASCII REPRESENTATION: LOCUS
Standardization: NCBI GenBank Release Specification
Technical Specifications
| Container Architecture | Plaintext flat file divided into Header section (LOCUS, DEFINITION, ACCESSION), FEATURES table, and ORIGIN sequence data ending with '//' |
| Compression | Uncompressed text (often compressed with Gzip as .gb.gz) |
| Byte Endianness | UTF-8 / ASCII text stream |
| Color Spaces | N/A (Genomic Annotation Database) |
| Channels & Structure | DNA/RNA sequence, gene annotations, coding regions (CDS), protein translations, and scientific citations |
| Max Dimensions | Unbounded sequence and feature count |
| Transparency | None |
| Streaming & Progressive | Record-by-record streaming: individual GenBank entries are delimited by '//' lines |
Technical Comparison Matrix: GenBank vs Competitors
| Technical Attribute | GenBank (Current) | FASTA | GFF | FASTQ |
|---|---|---|---|---|
| Annotation Detail | Exhaustive (genes, CDS, citations, translation) | None (sequence only) | Tabular genomic coordinates | Sequencing quality scores only |
| Sequence Included | Yes (in ORIGIN block at end) | Yes (pure sequence) | No (coordinates only) | Yes (raw reads) |
| Primary Tooling | NCBI, SnapGene, Benchling | BLAST, alignment tools | Genome browsers (UCSC, IGV) | Illumina sequencers |
| Record Terminator | // on standalone line | Next '>' header line | End of file | Next '@' line |
Common Corruption Modes & Hex Recovery Guide
Bioinformatics software reports 'GenBank parser error: premature EOF before //'.
Root Cause: Truncated download cutting off the final sequence origin block or '//' delimiter.
Recovery: Append '//\n' to the end of the file using File2File Bioinformatics Tool.
Security Analysis & Parser Attack Vectors
GenBank parsers process complex feature location strings where regular expression backtracking can trigger denial of service.
Known Attack Vectors
- Regular expression denial of service (ReDoS) in complex feature location parsers.
- Buffer overflow when reading excessively long citation reference titles.
- Denial of service through circular feature reference loops.
Defensive Best Practices: Use linear non-backtracking parsers to evaluate feature table coordinate ranges.
Historical Origins & Milestones
Key Advantages & Pros
- Rich comprehensive metadata: stores gene boundaries, promoter locations, exons, introns, and translated protein sequences.
- Includes complete scientific literature references, PubMed IDs, author names, and experimental submission dates.
- Universal interchange format for synthetic biology, plasmid design (SnapGene), and NCBI database submissions.
Technical Limitations & Cons
- Significantly more verbose and larger file sizes than plain FASTA sequences.
- Parsing feature table coordinates ('join(complement(100..500),600..800)') requires complex parser logic.
- Not designed for massive high-throughput sequencing read alignment.
Interesting Technical Trivia
- Every GenBank entry begins with the word 'LOCUS' and concludes with two forward slashes '//' on a line by themselves.
- GenBank synchronizes its data daily with the European Molecular Biology Laboratory (EMBL) and the DNA Data Bank of Japan (DDBJ).
- Synthetic biologists use GenBank files to design custom circular plasmids for CRISPR gene editing and insulin production.
Frequently Asked Technical Questions
What is the difference between FASTA and GenBank format?
FASTA contains only the raw DNA sequence with a brief header line. GenBank contains the raw sequence PLUS all gene annotations, protein translations, authors, and scientific notes.
How can I convert GenBank (.gb) to FASTA?
You can convert GenBank files into clean FASTA nucleotide or protein sequences in one click using File2File.app directly in your browser.
What software opens GenBank files?
SnapGene, Benchling, UGENE, Artemis, and File2File.app can view and edit GenBank files.