Convert VCF to JSON

Turn VCF files into JSON. An array with one object per contact, keyed by property name with its parameters, such as TEL;TYPE=CELL, so each kind of phone or address gets its own key and a repeated one becomes a list.

Converted in an isolated sandbox on our serversDeleted after 24 hours

Drop VCF files on the dialor turn it to pick what to do

Contacts as data you can read in code.Each contact in the VCF file becomes one object in a JSON array.

  1. What you get

    One JSON file with an array. Each contact is one object, keyed by property name, so a program can read fields without parsing vCard text.

    Parameters stay in the key. A cell phone is stored under a key such as TEL;TYPE=CELL, so each kind of phone or address gets its own key. When a contact has the same property more than once, the values become a list.

  2. What changes

    Escapes in the vCard text are resolved, so you get the plain characters in the values.

    Names, organizations and addresses keep their semicolon-separated parts. They are not split into separate fields, so your code splits them where it needs the parts.

  3. When it stops

    If the file cannot be parsed, the conversion stops with input_corrupted. The conversion has no options to set.

    To go the other way, use JSON to VCF.

VCF and JSON.What each format is.

The formats

From · VCF

vCard

vCard contacts.

Extensions
.vcf .vcard
MIME type
text/vcard
Kind
Text and data
To · JSON

JSON

JSON, the data format of every API.

Extensions
.json
MIME type
application/json
Kind
Text and data

In your code.The same VCF to JSON conversion through the API, for your app or your agent.

terminal
$ cv convert report.vcf report.json
$ cv convert report.vcf report.json

Questions.What people ask about VCF to JSON.

01OF 04

Each contact is one object in an array. The keys are property names with their parameters, such as TEL;TYPE=CELL.

Phones of different types get their own keys. A property that repeats under the same key becomes a list.

No. Names, organizations and addresses keep their semicolon-separated parts in one value.

The file could not be parsed. The conversion stops with this code when that happens.

More conversions.Other ways in and out of VCF and JSON.