What a .vcf File Contains: Contacts as Plain Text
A .vcf file is a vCard, and the vCard format is plain text: each contact sits between BEGIN:VCARD and END:VCARD, with one property per line. Wikipedia describes it as "a file format standard for electronic business cards", also known as VCF. Because it is text, you can open one in any editor and read exactly what a contact app would import. Here's a complete card:
BEGIN:VCARD
VERSION:4.0
FN:Jane Doe
EMAIL:jane@example.com
TEL;TYPE=work:+1-555-0100
END:VCARDHow it actually works
The smallest valid card
RFC 6350, the vCard 4.0 specification, defines a card as BEGIN:VCARD, a VERSION:4.0 line, one or more content lines, and END:VCARD. It states that "a vCard object MUST include the VERSION and FN properties" and that VERSION must come immediately after BEGIN. That makes the shortest legal card four lines: BEGIN, VERSION, FN (the formatted name shown to people), and END.
Common properties
Everything else is optional. The properties you will meet most often:
N: the name split into parts, separated by semicolonsTELandEMAIL: phone numbers and addresses, often with aTYPE=parameter such asworkADR: a postal address, also semicolon-separatedORG,TITLE: company and job titleURL,NOTE: a web address and free textPHOTO: an image, embedded or linkedUIDandREV: a unique identifier and a revision timestamp, which help programs tell whether two cards are the same contact
The same section of RFC 6350 lists many more, including BDAY, NICKNAME, CATEGORIES and GEO. Names are case-insensitive, though upper case is recommended.
Many contacts in one file
The grammar in RFC 6350 allows one or more vCards in a single body. A whole address book exported as one .vcf is just many blocks stacked back to back, each with its own VERSION line. The earlier RFC 2426 shows the same idea in its own example, with two people in one file.
Photos, folding and escaping
A few rules explain why raw .vcf files can look odd.
Line endings and folding. Lines end with CRLF. RFC 6350 says content lines "SHOULD be folded to a maximum width of 75 octets": a long line is broken, and the next line starts with a single space or tab. A reader removes the line break and that one space to rebuild the original line. If you see a line that starts with a space, it continues the line above it.
Encoding. In vCard 4.0 the character set is UTF-8 and, in the spec's words, "there is no way to override this." Older 3.0 files declare the charset on the outer MIME header instead, so a pasted invisible character can cause import trouble when you edit by hand.
Escaping. A comma in a value must be escaped with a backslash, as must a semicolon inside a compound value like N or ADR, and a backslash itself. A line break inside a value is written \n. That is why you see ORG:ABC\, Inc. in the spec's own example.
Photos. A PHOTO can point at a URL or carry the image inline. The Wikipedia page notes it "may be embedded in the vCard as a Base64 encoded block of text", for example PHOTO:data:image/jpeg;base64,... in 4.0. Base64 text is longer than the image it encodes, which is why a card with a photo can dwarf a card without one.
Versions: 2.1, 3.0 and 4.0
According to Wikipedia, version 2.1 dates from 1996, version 3.0 is RFC 2426 from September 1998, and version 4.0 is RFC 6350 from August 2011. A later RFC 9554, from May 2024, adds properties such as PRONOUNS and SOCIALPROFILE.
The versions are not interchangeable line for line:
- Version 3.0 requires
FN,NandVERSION. In 4.0,Nis no longer required. GEOisGEO:39.95;-75.1667in 2.1 and 3.0, butGEO:geo:39.95,-75.1667in 4.0.TZchanges from an offset like-0500to a name likeAmerica/New_York.- Embedded photos use
ENCODING=BASE64,ENCODING=b, or adata:URI depending on the version.
That's the usual reason an import looks slightly wrong in another app. The VERSION line tells you which dialect the rest of the file speaks.
When to use it (and when to skip it)
A .vcf is a good fit when you want a portable backup of contacts, need to read what an export actually holds, or want to compare two exports with a diff. Because it is text, a small fix such as a mistyped email takes seconds.
Skip hand-editing for a big address book or for cards with embedded photos. One wrong fold or unescaped comma can break an import. For tabular contact lists, tab-separated text is often easier to scan. And if a file is not readable at all, check whether it is binary: a property list is another Apple-adjacent format that comes in both text and binary forms.
How Carets fits in
A .vcf is plain text, and Carets is a native notes and code editor for iPhone, iPad and Mac built around plain text files. That makes it a tidy place to keep a copy of an exported card, read the lines, and tidy a typo. The highlighting for code and config files helps when you scan structured text, and files, projects and tags keep the export next to the notes it belongs to. Your files stay plain text, so they remain portable. Carets doesn't manage your contacts; it's the editor for the text. Get Carets on the App Store for iPhone, iPad and Mac.
Frequently Asked Questions
What does a .vcf file contain?
Plain text: one or more blocks that start with BEGIN:VCARD and end with END:VCARD, with one property per line such as FN, TEL and EMAIL. Any text editor can show it.
Can one .vcf file hold many contacts?
Yes. The vCard grammar allows one or more vCards in a body, so an export of a whole address book is just many blocks back to back.
Is .vcf the same as .vcard?
Both extensions are listed for the text/vcard media type. The .vcf extension is the one you will meet in practice.
Why does my contact photo make the file so big?
Photos can be embedded as Base64 text, which is longer than the image it encodes, so a card with a photo is far larger than one without.