vCard 2.1, 3.0 and 4.0 compared
| 2.1 | 3.0 | 4.0 | |
|---|---|---|---|
| Standard | versit Consortium specification (not an RFC) | RFC 2426 | RFC 6350 |
| Published | 1996 | 1998 | 2011 |
| Required lines | VERSION; N in practice | VERSION, N, FN | VERSION, FN |
| A mobile number is written | TEL;CELL: | TEL;TYPE=CELL: | TEL;TYPE=cell: |
| Character set | CHARSET= on each line, often a local code page | not stated in the file; UTF-8 in practice | UTF-8, always |
| Accented text | may be quoted-printable | plain text | plain text |
| Photos | ENCODING=BASE64 | ENCODING=b (base64) | a URI, often a data: URI |
| Who writes it | older phones, classic Outlook | iPhone, iCloud, Google Contacts | fewer apps so far |
To see which one you have, open the file in a text editor and read the second line. VERSION:3.0 is the one you will meet most.
The properties you'll see
| Property | What it holds | Example |
|---|---|---|
FN | The name as it should be shown | FN:Amélie Lefèvre |
N | The name in five parts: family; given; additional; prefixes; suffixes | N:Lefèvre;Amélie;;; |
ORG | Company, then any department | ORG:Northfield Tools;Sales |
TITLE | Job title | TITLE:Sales Director |
TEL;TYPE=… | A phone number; types include CELL, WORK, HOME, FAX and VOICE | TEL;TYPE=WORK,VOICE:+1 555 555 0100 |
EMAIL | An email address, with an optional type | EMAIL;TYPE=WORK:[email protected] |
ADR | A postal address in seven parts: PO box; extended; street; city; region; postal code; country | ADR;TYPE=WORK:;;12 Main St;Springfield;IL;62701;USA |
URL | A website | URL:https://example.com |
NOTE | Free text | NOTE:Met at booth 14\, spring show |
PHOTO | A picture, encoded in the file or linked | PHOTO;ENCODING=b;TYPE=JPEG:/9j/4AAQ… |
Property names are not case-sensitive, so tel and TEL mean the same. Lines that start with X- are a vendor’s own additions, such as X-SOCIALPROFILE. Apple and Google also group a value with a custom label by putting the same prefix on both lines: item1.EMAIL:[email protected] and item1.X-ABLabel:Billing belong together. A reader that ignores the prefix still gets the email, only without its label.
The same contact in each version
vCard 2.1, with the accented name in quoted-printable:
BEGIN:VCARD
VERSION:2.1
N;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:Lef=C3=A8vre;Am=C3=A9lie;;;
FN;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:Am=C3=A9lie Lef=C3=A8vre
TEL;CELL;VOICE:+1 555 555 0142
END:VCARD
vCard 3.0:
BEGIN:VCARD
VERSION:3.0
N:Lefèvre;Amélie;;;
FN:Amélie Lefèvre
TEL;TYPE=CELL:+1 555 555 0142
END:VCARD
vCard 4.0, with the number as a tel: link:
BEGIN:VCARD
VERSION:4.0
FN:Amélie Lefèvre
N:Lefèvre;Amélie;;;
TEL;TYPE=cell;VALUE=uri:tel:+1-555-555-0142
END:VCARD
Line folding and quoted-printable
Long lines are folded. In 3.0 and 4.0 a writer splits a long line by inserting a line break followed by one space or tab; RFC 6350 asks for lines of no more than 75 octets. A reader joins them by deleting the line break and that one character, and nothing else. A tool that also deletes the next space, or keeps the first one, glues two words together or adds a space in the middle of an email address. A photo in base64 runs to hundreds of folded lines, which is why a .vcf with pictures is many times the size of one without.
Quoted-printable belongs to 2.1. Each byte outside plain ASCII becomes an equals sign and two hex digits, so “é” in UTF-8 is =C3=A9. A line that ends in = is a soft break: the value carries on at the start of the next line.
Character sets and garbled names
- A 2.1 file with no
CHARSET=was usually written in the phone’s or Windows’ local code page. Read as UTF-8, its accents turn into question marks. - “é” where “é” should be means the opposite: UTF-8 text read as Windows-1252, often by Excel.
- A 3.0 file doesn’t state its character set. Today’s exports write UTF-8, and a reader should assume it.
- A 4.0 file is UTF-8 by definition.
- In 3.0 and 4.0 a comma, semicolon or backslash inside a value is escaped with a backslash, and a line break inside a note is written
\n. A reader that skips this splits one value into two.
Converting between versions and to CSV
The VCF to CSV converter reads all three versions, folded lines, quoted-printable text, item1. labels, and files in UTF-8, UTF-16 or Windows-1252, then writes a CSV with one row per contact. Turned around, it makes one vCard 3.0 file from a CSV. It runs in your browser and nothing is uploaded. Photos are skipped. If you need the basics first, read what a VCF file is.
Krane for iPhone
With Krane: vCards from paper cards
Krane on iPhone, iPhone Duo and iPad works from the other end: it reads a printed business card into a contact, then adds it to Apple Contacts or shares it as a vCard. With Krane Pro it also exports a CSV or sends the contact to HubSpot, Salesforce or Pipedrive. The business card scanner is free for 10 scans a week. It can’t import a .vcf.