—
- Mobile
- -
- -
- Website
- -
- Street
- -
Pikkola vCard, tool No. 82
Fill in the fields, watch the card fill in beside them, and download a .vcf that iOS, Android and Outlook all read. The same page reads one back: paste a card from a phone and every property is pulled apart, folded lines and all.
The bench
The card on the right is drawn from the same fields that write the file, so a missing line on the card is a missing property in the file. Version 3.0 and 4.0 differ in how a phone number and a birthday are written, and both are shown.
Start with a name.
Fold at seventy-five octets.
A .vcf is a list of properties with parameters, and the fields a phone shows are the ones it recognised. Everything else survives as a note or is dropped, which is why the property names matter more than the layout.
N is the structured name, family then given then middle then prefix then suffix, separated by semicolons. FN is the display name and is what a phone shows. A card with only FN imports with an empty name field, which is the most common reason a contact appears as a company.
TEL;TYPE=CELL tells a phone to put the number in the mobile field, and TYPE=WORK in the work field. Without a type every number becomes other. In version 4.0 the value is a URI: tel:+82100000000, which is why the same card looks different in the two versions.
A property is a name, parameters, a colon and a value. When a line passes seventy-five octets it is folded with a space at the start of the continuation, and a reader that does not unfold sees half a note. Commas, semicolons and backslashes are escaped with a backslash, and a newline is written as the two characters backslash and n.
The generator writes the properties a contact needs and refuses to invent the rest. What it does not write is listed rather than half-written.
| Property | What this page does | What it does not do |
|---|---|---|
| N and FN | Writes both, from the two name fields | Guess a family name from one field: names do not split that way |
| TEL | Types the mobile and work numbers so a phone files them | Normalise an international number: what you type is what is written |
| ADR | Seven components, with the ones you left empty kept as empty | Validate against a postal database: this is text, not an address check |
| PHOTO | Not written | Embed a photo: base64 in a .vcf makes a file too big for a message |
| Social links | Written as X-SOCIALPROFILE, with a type for each network | Promise every phone reads them: they survive as properties and show in iOS |
| Encoding | UTF-8, folded at seventy-five octets, CRLF endings | Write quoted-printable, which an old 2.1 reader wants |
A version 4.0 card written here has no quoted-printable and no photo. A phone that refuses it is a phone that wants 3.0, and the version switch is one click away.
Field guide
vCard is one of the oldest formats still in daily use, and the parts that go wrong are the parts people skip: the structured name, the type on a phone number, the escaping, and the folding. A card is not a form, it is a list of typed values.
BEGIN:VCARD, VERSION, then properties in any order, then END:VCARD. Two properties may appear many times: TEL, EMAIL, ADR and URL are all repeatable, and a phone turns each into another row with its type as the label. A property with an unknown name is kept by most readers and ignored by the rest, which is how X-SOCIALPROFILE survives on iOS and disappears on an older Android.
N has five components separated by semicolons: family, given, additional, prefix, suffix. It is ugly and it is the only way a phone can sort by family name, so a card with FN and no N appears under the display name and cannot be sorted properly. Two semicolons at the end are not optional padding: N:Choi;Min-young;;; is five components, the last two empty, and a card written with three is read as having a suffix.
| Field | Written as | What a phone does with it |
|---|---|---|
| Name | N:Choi;Min-young;;; | Sorts by family, shows FN |
| Mobile | TEL;TYPE=CELL:+8210… | Fills the mobile row |
| Work phone | TEL;TYPE=WORK:+822… | Fills the work row |
| Address | ADR:;;street;city;region;postal;country | Seven parts, two empty at the front |
| Birthday | BDAY:1997-05-07 | 3.0 takes a date, 4.0 a compact one |
Inside a value, a comma separates multiple values of a repeatable property, a semicolon separates components, and a backslash starts an escape. A note that says "call before 5, please" without escaping the comma is a note that a reader may split into two values, keeping the first and dropping the second. The three escapes are \,, \; and \\, and a newline is the two characters \n, never an actual break, because a break would end the property.
A line over seventy-five octets is continued on the next line with a leading space. Octets, again: a Korean address is three bytes per character, so it folds after about twenty-four characters. A reader unfolds by removing the newline and the space, and a writer must not split a multi-byte character across the fold. This page counts bytes and folds between characters, which is the same rule the calendar tool uses for the same reason.
Version 4.0 writes a phone number as TEL;VALUE=uri:tel:+82100000000 and a birthday as 19970507, drops quoted-printable and requires UTF-8. Version 3.0 writes the number as text with a type and allows a date with dashes. Both are read by iOS, Android and Outlook today; 3.0 is read by more old software and by more corporate directories. The version switch on this page changes those properties and nothing else, which is the honest size of the difference.
For the same contact as something a camera can read, Pikkola QR draws a code with the URI in it. For the other file a phone imports, Pikkola iCal writes a calendar entry with the same folding rule.
No. The fields are read into memory, the card is drawn from them and the file is assembled in this tab. Nothing is stored, so a reload forgets the card, and the only request the page makes is the cookieless page-view count.
Because the card had an ORG and no N. A phone shows the organisation when there is no structured name. Filling in both name fields writes N and FN together, which is what puts the person in the name field and the company below it.
Because the TEL property carried no TYPE, or a type the phone does not know. TYPE=CELL is the mobile field on iOS and Android; some readers accept TYPE=MOBILE as well. This page writes both a type and, for version 4.0, a tel: URI.
Choose 3.0 when the card is going to a person who will open it on an older phone, in Outlook, or on a corporate directory, because it is the version with the fewest surprises. Choose 4.0 when the card is going to an address book that is current, or when the value has to be a URI. The difference in practice is the phone number and the birthday.
Yes, and a phone imports all of them: the file is a sequence of VCARD blocks and every reader walks them in order. This page writes one card at a time, which is what a shared contact usually is, and the reader on the third tab lists every contact in a file that holds several.