A simple parser to convert VCF files to JSON

Usage no npm install needed!

<script type="module">
  import vcftojson from '';


Build Status

VCF to JSON converter

A module to parse Variant Call Format (VCF) into JSON. An optional parameter allows to map the genomic coordinates to the protein coordinates using the UniProt Coordinates API.


npm i --save vcftojson


  1. fileContent:
  2. options
  • runVEP: a boolean used to fetch additional data from VEP. VEP determines the effect of your variants (SNPs, insertions, deletions, CNVs or structural variants) on genes, transcripts, and protein sequence, as well as regulatory regions.


From a node script:

import {vcfToJSON} from 'vcftojson`;

const fileContent = await fs.readFileSync(
  { encoding: "utf-8" } //if you don't provide this it will come as a Stream

const json = await index.vcfToJSON(fileContent);