All studies
DNA·November 20, 2026·7 min read

How Do I Open a .vcf.gz File on Windows or Mac and See What Is Inside

A .vcf.gz is a gzip-compressed text file of your variants. Peek inside with one terminal command, never Excel, and read the header to find the genome build.

A .vcf.gz is a VCF (a plain text list of genetic variants) compressed with gzip, almost always in BGZF blocks. Excel cannot read gzip, so do not try to open it there. On a Mac, run gzcat file.vcf.gz | head -n 40 in Terminal. On Windows, install Git for Windows and use Git Bash, which ships zcat and head, so zcat file.vcf.gz | head -n 40 works natively. Or extract the file with 7-Zip and open the .vcf in a large-file viewer such as klogg or EmEditor. If you only want the header, bcftools view -h file.vcf.gz | head shows just that. If you would rather not use a terminal at all, healthosx.com/dna/check reads a .vcf.gz in the browser and reports the genome build, plain gzip versus BGZF, the sample count and the rows the caller rejected. The file is not uploaded.

What a .vcf.gz actually is

VCF stands for Variant Call Format. It is a text file, one variant per line, written by a variant caller such as GATK or bcftools after your DNA was sequenced. The .gz means the whole thing was squeezed with gzip, which usually shrinks it to a fifth or less of its text size. A whole-genome file lists roughly 3 to 5 million variants, so uncompressed it runs to gigabytes.

Most .vcf.gz files are not ordinary gzip. They are BGZF: many small gzip blocks, each holding at most 64 KB of text, laid end to end. gzip, zcat and 7-Zip read them fine; some browser-based readers stop after the first block. The blocks exist so that a tool called tabix can jump to one chromosome region without decompressing everything before it. That is why you will often see a .vcf.gz.tbi or .vcf.gz.csi file sitting beside it. Both are index files (.csi is the newer format, used for very long chromosomes). Keep the index if you have it.

How to open a .vcf.gz file on Windows or Mac

The goal is to read the top of the file without loading all of it. Pick the row that matches your machine.

Ways to look inside a .vcf.gz
Command or toolLoads whole fileGood for
Mac Terminalgzcat file.vcf.gz | head -n 40NoA quick look at the header and, on small headers, the first rows
Linux or Windows WSLzcat file.vcf.gz | head -n 40NoSame, on those systems
Windows Git Bash (comes with Git for Windows)zcat file.vcf.gz | head -n 40NoNative Windows, nothing else to install
Any shell, to skip the headergzcat file.vcf.gz | grep -v '^##' | headNoThe #CHROM line and first variant rows (use zcat outside Mac)
bcftools (Mac via Homebrew or conda; Windows via WSL, then apt or conda inside WSL)bcftools view -H file.vcf.gz | headNoFirst variant rows with no header; use -h for header only
Integrity check (any shell)gzip -t file.vcf.gzReads it all, shows nothingPrints nothing if the file is complete, an error if it was cut off
7-ZipExtract, then open the .vcf in klogg or EmEditorYesWhen a tool wants the unzipped file
ExcelOpen the extracted .vcfCuts at 1,048,576 rowsAvoid

Scroll the table sideways for the rest →

Most of these read only the top of the file; Excel is listed to show why to avoid it.

One catch with head -n 40: it often shows only header lines. A GRCh38 whole-genome header can run to thousands of ##contig lines, so the first 40 lines may never reach a variant. To see the first rows, use bcftools view -H file.vcf.gz | head (-H hides the header) or gzcat file.vcf.gz | grep -v '^##' | head, which drops every ## line and keeps the column header plus the first variants.

On a Mac, Terminal is already there. On Windows, Git Bash is the quickest native route. bcftools has no native Windows install: on Windows, use WSL and then install it with apt or conda inside WSL, while on a Mac it installs with Homebrew or conda. 7-Zip will extract the file, but extracting is the heavy route (more on that below).

A Windows trap: after extracting, do not double-click the .vcf. Windows treats .vcf as a vCard (contact card) file, so it opens Contacts or Outlook instead of your variants. Open it from inside a viewer such as klogg or EmEditor, or stay in the terminal.

Why Excel and a normal text editor are the wrong tools

Excel cannot read a .vcf.gz at all, because it does not understand gzip. If you extract it first, the .vcf runs into Excel's limit of 1,048,576 rows. A whole genome has several times that many variants, so Excel loads the first million, warns you, and drops the rest. Saving from Excel can also change separators, and everything past row 1,048,576 is lost, so do not use a saved copy for anything else.

Notepad, TextEdit and most editors try to hold the entire file in memory. On a multi-gigabyte VCF that means a frozen window and sometimes a crash. A pager such as less, or the head command, reads only what is on screen.

Read the genome build from the contig lengths: chromosome 1 at 249250621 is GRCh37 (hg19), and at 248956422 it is GRCh38. Many tools need the right one.

Reading the header

Every line starting with ## is metadata. The line starting with a single # is the column header. Check these first:

  • ##fileformat=VCFv4.2 is the format version. 4.1 to 4.3 are all common.
  • ##contig=<ID=1,length=249250621> lists each chromosome with its length. That number tells you the genome build, as in the tip above.
  • ##reference= sometimes names the reference file outright.
  • ##INFO and ##FORMAT lines define the abbreviations used in the rows, so you can look up anything cryptic.

Then the #CHROM line. Everything after the ninth column, FORMAT, is a sample name. One name means one person. Several means a multi-sample file, and some tools will only accept one. To pull one person out, run bcftools view -s SAMPLE file.vcf.gz -Oz -o one.vcf.gz, replacing SAMPLE with the name from the #CHROM line.

Reading a variant row

Each row is one position where the person differs from the reference genome, or where the caller had something to say.

One variant row, field by field
FieldExampleWhat it means
CHROM2Chromosome
POS136608646Position on that chromosome, in the file's genome build (GRCh37 here)
IDrs4988235The rsID, or a dot if none
REF / ALTG / AReference letter and the changed letter
QUAL / FILTER50 / PASSCaller's confidence, and the filter result: PASS passed, a dot means no filter was applied, a named filter such as LowQual flags the row
GT (sample)0/1One reference copy and one changed copy

Scroll the table sideways for the rest →

CHROM, POS and ID are the real GRCh37 coordinates of rs4988235 (LCT/MCM6 region). QUAL, FILTER and the genotype are made up to show the layout.

The genotype in that last field uses 0 for the reference letter and 1 for the first alternate. So 0/1 is one copy of each (heterozygous), 1/1 is two copies of the change, 0/0 matches the reference, and ./. is a no-call. A pipe instead of a slash, as in 0|1, means the phasing is known.

Two things to look at when scanning rows. First, the ID column: if it holds rs numbers, tools that match variants by name can use the file. If it is a dot on every row, the file has no rsIDs and those tools will refuse it. The fix is bcftools annotate -c ID -a dbsnp.vcf.gz file.vcf.gz -Oz -o with_ids.vcf.gz, where the dbSNP file is indexed and on the same genome build as your VCF. There is a catch: NCBI's dbSNP VCF names chromosomes as RefSeq accessions such as NC_000001.11, and the chr1 versus 1 naming must match between the two files too. If the names differ, nothing gets annotated. Use bcftools annotate --rename-chrs with a two-column file of old and new names to line them up first.

Second, the FILTER column: a dot means no filter was applied, which is not the same as failing. PASS means the row passed the caller's filters. Only a named filter such as LowQual marks a row the caller flagged.

Unzipping it is allowed, but mind the size

People ask whether they can just extract it first. You can, and some tools want that. But the result is several gigabytes of text for a whole genome, and renaming an extracted file back to .gz does not recompress it. If a site rejects your file, the cause is often one of these: it needs the unzipped .vcf, it is plain gzip rather than BGZF, the build is GRCh38 where GRCh37 was expected, or it has no rsIDs. A tool that leans on the browser's built-in gzip reader can stop after the first 64 KB block of a BGZF file, which looks like a corrupt or empty upload even though the file may be fine.

A rejection does not always mean a broken file, and it does not always mean the tool is wrong. Often the file is correct and the tool is picky, but truncated downloads and multi-sample or unannotated files are real causes too. Check the file before blaming either. For a cut-off download, run gzip -t file.vcf.gz: it prints nothing when the file is complete and an error when it is truncated. bcftools and tabix also warn 'no BGZF EOF marker' on a cut-off file. That is more decisive than comparing sizes. Then read the header and look at the #CHROM line and the ID column.

What to do with it next

Once you know the build and that the file is intact, healthosx.com/dna reads a whole-genome VCF directly, with no conversion, and it runs in your browser, so the file is never uploaded. The story opens with no account. The full report, which covers medication genes, traits, ancestry and both family lines, opens after a code sent to your email. If a file gets rejected, healthosx.com/dna/check tells you why and how to fix it.

New to raw DNA files? Start with the full guide: 23andMe Raw Data Interpretation Free in Your Browser

Written by

HealthOSX Research

Keep reading