All studies
DNA·October 31, 2026·4 min read

How Do I Tell If My .vcf.gz File Is BGZF or Plain Gzip?

A .vcf.gz can be plain gzip or BGZF. The free HealthOS checker reports which one without uploading, so you know before another tool stalls.

A .vcf.gz file can be regular gzip or BGZF. The quickest way to tell is to drop it on the HealthOS free DNA file checker, which reports plain gzip vs BGZF for a VCF while the file stays in your browser. If another tool has rejected it or stalled, this tells you which format you have before you upload anywhere else.

How Do I Tell If My .vcf.gz File Is BGZF or Plain Gzip?

A .vcf.gz extension only promises gzip. Inside, a plain gzip produced by gzip file.vcf compresses the whole VCF as one DEFLATE stream; the gzip format itself can hold concatenated members. BGZF compresses it as many small blocks, each holding up to 64 KB of uncompressed text. Both start with the gzip magic bytes 1f 8b, so a quick file call or hex peek can say gzip for both. The checker above reads the gzip structure and names which one it is.

A BGZF file is still a valid gzip file. The difference is whether a reader can jump to the middle without decompressing from the start.

Plain gzip and BGZF decompress differently

A plain gzip made by gzip file.vcf is one DEFLATE stream. To reach a variant at position 200,000,000, a reader must decompress every byte before that position. There is no index inside the gzip wrapper.

BGZF is the Blocked GNU Zip Format used by bcftools and GATK. It is a normal gzip file made of concatenated members. Each member is an independent gzip stream. Its BGZF extra subfield uses the BC field to store the total block size minus 1, while the member's gzip trailer stores the uncompressed block size. Because each block ends cleanly, a reader can seek to the start of a block and decompress just that block. Tabix builds a .tbi index on top of those blocks so tools can fetch a chromosome region without scanning the whole file.

Plain gzip vs BGZF in a .vcf.gz
Plain gzipBGZF
First bytes`1f 8b``1f 8b`
StructureOne DEFLATE member when made by `gzip file.vcf`Many concatenated members, each ≤64 KB uncompressed
Typical writer`gzip file.vcf``bgzip`, `bcftools view -Oz`, GATK
Random accessNo built-in indexYes, with a tabix `.tbi` index
Browser built-in gzipUsually reads to end for one memberMay stop after first 64 KB block

Scroll the table sideways for the rest →

Both start with the same bytes, but a reader sees different structure.

Why some browser tools stall after the first block

Some tools that use a browser built-in gzip reader may stop after the first 64 KB. For plain gzip made by gzip file.vcf that works because the whole VCF is one member. For BGZF it does not, because the first member is only the first 64 KB of uncompressed data. A whole-genome VCF is often hundreds of megabytes compressed, so such a tool can read the header, maybe a few thousand variants, then see what it thinks is end-of-file. It can report no variants or a truncated file. Sometimes it fails silently.

What some browser-built-in gzip readers see
StepWhat happens
Decompress first memberThe first BGZF block expands to at most 64 KB of VCF text.
Reader expects end-of-file after first memberSome browser built-ins treat the first gzip member as the whole file and report end-of-file.
Remaining members are never readThe later BGZF blocks are still in the file but do not get decompressed by that reader.

A reader that treats the first gzip member as the whole file reads one BGZF block and stops.

Check it on your own computer without uploading anything

The checker linked above is the fastest route because it runs in the browser. If you prefer to inspect the file yourself:

  • xxd -l 64 file.vcf.gz shows 1f 8b at the start only. To see repeated 1f 8b block boundaries in BGZF, run LC_ALL=C grep -abo $'\x1f\x8b' file.vcf.gz and look for multiple byte offsets. This is a heuristic: the same two bytes can appear inside compressed data, so the in-browser checker is definitive.
  • gzip -l file.vcf.gz shows gzip size data but does not label the file BGZF or plain gzip.
  • tabix -l file.vcf.gz prints chromosome names if a .tbi index exists. A .tbi only works with BGZF, but a missing index does not prove plain gzip.
  • bgzip -l file.vcf.gz reports block structure if bcftools is installed, but it does not say how a browser-built-in gzip reader will behave.

What to do after you know

BGZF is not a defect. It is the better format for large VCFs because it supports indexed region queries. The problem appears only when a tool expects the whole file as a single gzip member. If your planned tool stalls after the first block, either recompress as plain gzip with gzip -dc file.vcf.gz | gzip -c > file.plain.vcf.gz and give up random access, or choose a tool that properly streams BGZF blocks.

When the simple answer does not hold

A small VCF can be BGZF with just one block. A browser tool may read that file fine, and the checker will still correctly call it BGZF. A plain gzip file cannot have a tabix .tbi index, because tabix requires the block structure. Some providers ship a BGZF .vcf.gz without its .tbi; that is still BGZF and will stream fine in tools that read concatenated gzip members, but it will not support region queries until you index it.

The checker tells you which gzip form your file has before you hand it to another tool. If you want the full report after the format check, the free DNA report reads either plain gzip or BGZF in your browser.

New to raw DNA files? Start with the full guide: How to Download & Analyze Your 23andMe Raw Data Free

Written by

HealthOS Research

Keep reading