vCard

From Wikipedia, the free encyclopedia
Jump to: navigation, search
vCard
Filename extension .vcf, .vcard
Internet media type text/vcard
Type code vCrd
Uniform Type Identifier (UTI) public.vcard
Developed by Internet Mail Consortium
Type of format electronic business card
Container for contact information

vCard is a file format standard for electronic business cards. vCards are often attached to e-mail messages, but can be exchanged in other ways, such as on the World Wide Web or instant messaging. They can contain name and address information, phone numbers, e-mail addresses, URLs, logos, photographs, and audio clips.

Media type[edit]

The standard Internet media type for a vCard (often referred to as its mime type) is:[1]

text/vcard

As of version 4.0 specification, other media types known to have been used previously are now deprecated, including:[1]

text/x-vcard
text/directory;profile=vCard
text/directory

Example vCard files[edit]

The following is an example of a VCard file containing information for one person:

vCard 2.1[edit]

BEGIN:VCARD
VERSION:2.1
N:Gump;Forrest
FN:Forrest Gump
ORG:Bubba Gump Shrimp Co.
TITLE:Shrimp Man
PHOTO;GIF:http://www.example.com/dir_photos/my_photo.gif
TEL;WORK;VOICE:(111) 555-1212
TEL;HOME;VOICE:(404) 555-1212
ADR;WORK:;;100 Waters Edge;Baytown;LA;30314;United States of America
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:100 Waters Edge=0D=0ABaytown, LA 30314=0D=0AUnited States of America
ADR;HOME:;;42 Plantation St.;Baytown;LA;30314;United States of America
LABEL;HOME;ENCODING=QUOTED-PRINTABLE:42 Plantation St.=0D=0ABaytown, LA 30314=0D=0AUnited States of America
EMAIL;PREF;INTERNET:forrestgump@example.com
REV:20080424T195243Z
END:VCARD

vCard 3.0[edit]

BEGIN:VCARD
VERSION:3.0
N:Gump;Forrest;;Mr.
FN:Forrest Gump
ORG:Bubba Gump Shrimp Co.
TITLE:Shrimp Man
PHOTO;VALUE=URL;TYPE=GIF:http://www.example.com/dir_photos/my_photo.gif
TEL;TYPE=WORK,VOICE:(111) 555-12121
TEL;TYPE=HOME,VOICE:(404) 555-1212
ADR;TYPE=WORK:;;100 Waters Edge;Baytown;LA;30314;United States of America
LABEL;TYPE=WORK:100 Waters Edge\nBaytown, LA 30314\nUnited States of America
ADR;TYPE=HOME:;;42 Plantation St.;Baytown;LA;30314;United States of America
LABEL;TYPE=HOME:42 Plantation St.\nBaytown, LA 30314\nUnited States of America
EMAIL;TYPE=PREF,INTERNET:forrestgump@example.com
REV:2008-04-24T19:52:43Z
END:VCARD

vCard 4.0[edit]

BEGIN:VCARD
VERSION:4.0
N:Gump;Forrest;;;
FN:Forrest Gump
ORG:Bubba Gump Shrimp Co.
TITLE:Shrimp Man
PHOTO;MEDIATYPE=image/gif:http://www.example.com/dir_photos/my_photo.gif
TEL;TYPE=work,voice;VALUE=uri:tel:+1-111-555-1212
TEL;TYPE=home,voice;VALUE=uri:tel:+1-404-555-1212
ADR;TYPE=work;LABEL="100 Waters Edge\nBaytown, LA 30314\nUnited States of America"
  :;;100 Waters Edge;Baytown;LA;30314;United States of America
ADR;TYPE=home;LABEL="42 Plantation St.\nBaytown, LA 30314\nUnited States of America"
 :;;42 Plantation St.;Baytown;LA;30314;United States of America
EMAIL:forrestgump@example.com
REV:20080424T195243Z
END:VCARD

xCard[edit]

<?xml version="1.0" encoding="UTF-8"?>
<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0">
  <vcard>
    <tel>
      <parameters>
        <type>
          <text>work</text>
        </type>
      </parameters>
      <uri>tel:+1-111-555-1212</uri>
    </tel>
    <adr>
      <parameters>
        <type><text>work</text></type>
        <label><text>100 Waters Edge
                     Baytown, LA 30314
                     United States of America</text></label>
      </parameters>
    </adr>
    <email><text>forrestgump@example.com</text></email>
  </vcard>
</vcards>

jCard[edit]

["vcard",
  [
    ["version", {}, "text", "4.0"],
    ["n", {}, "text", ["Gump", "Forrest", "", "", ""]],
    ["fn", {}, "text", "Forrest Gump"],
    ["org", {}, "text", "Bubba Gump Shrimp Co"],
    ["title", {} ,"text", "Shrimp Man"],
    ["photo", {"mediatype":"image/gif"}, "uri", "http://www.example.com/dir_photos/my_photo.gif"],
    ["tel", {"type":["work", "voice"]}, "uri", "tel:+1-111-555-1212"],
    ["tel", {"type":["home", "voice"]}, "uri", "tel:+1-404-555-1212"],
    ["adr",
      {"label":"100 Waters Edge\nBaytown, LA 30314\nUnited States of America", "type":"work"},
      "text",
      ["", "", "100 Waters Edge", "Baytown", "LA", "30314", "United States of America"]
    ],
    ["adr",
      {"label":"42 Plantation St.\nBaytown, LA 30314\nUnited States of America", "type":"home"},
      "text",
      ["", "", "42 Plantation St.", "Baytown", "LA", "30314", "United States of America"]
    ],
    ["email", {}, "text", "forrestgump@example.com"],
    ["rev", {}, "timestamp", "2008-04-24T19:52:43Z"]
  ]
]

hCard 1.0[edit]

hCard is a microformat that allows a vCard to be embedded inside an HTML page. It makes use of CSS class names to identify each vCard property. Normal HTML markup and CSS styling can be used alongside the hCard class names without affecting the webpage's ability to be parsed by a hCard parser.

<html>
  <head>
    <link rel="profile" href="http://microformats.org/profile/hcard" />
  </head>
  <body>
    <div class="vcard">
      <img class="photo" src="http://www.example.com/dir_photos/my_photo.gif" align="left" />
      <h1 class="fn">Forrest Gump</h1>
      <div class="email">
        <span class="type">Internet</span> Email (<span class="type">pref</span>erred):
        <a class="value" href="mailto:forrestgump@example.com">forrestgump@example.com</a>
      </div>
      <div class="n">
        First Name: <span class="given-name">Forrest</span><br>
        Last Name: <span class="family-name">Gump</span>
      </div>
 
      <div class="label" style="display:none">
        <span class="type">home</span>
        42 Plantation St.<br>Baytown, LA 30314<br>United States of America
      </div>
      <div class="adr">
        <span class="type">Home</span> Address:<br>
        <span class="street-address">42 Plantation St.</span><br>
        <span class="locality">Baytown</span>, <span class="region">LA</span>
        <span class="postal-code">30314</span><br>
        <span class="country-name">United States of America</span>
      </div>
      <div class="tel">
         <abbr class="type" title="voice"></abbr>
         <span class="type">Home</span> Phone: <span class="value">+1-111-555-1212</span>
      </div>
 
      <div>
        Organization: <span class="org">Bubba Gump Shrimp Co.</span><br>
        Title: <span class="title">Shrimp Man</span>
      </div>
 
      <div class="label" style="display:none">
        <span class="type">work</span>
        100 Waters Edge<br>Baytown, LA 30314<br>United States of America
      </div>
      <div class="adr">
        <span class="type">Work</span> Address:<br>
        <span class="street-address">100 Waters Edge</span><br>
        <span class="locality">Baytown</span>, <span class="region">LA</span>
        <span class="postal-code">30314</span><br>
        <span class="country-name">United States of America</span>
      </div>
      <div class="tel">
         <abbr class="type" title="voice"></abbr>
         <span class="type">Work</span> Phone: <span class="value">+1-404-555-1212</span>
      </div>
 
      <em>vCard last updated:</em>
      <time class="rev" datetime="2008-04-24T19:52:43Z">April 24, 2008 at 7:52 PM GMT</time>
    </div>
  </body>
</html>

Properties[edit]

vCard defines the following property types.

All vCards begin with BEGIN:VCARD and end with END:VCARD. All vCards must contain the VERSION property, which specifies the vCard version. VERSION must come right after BEGIN (except in the vCard 2.1 standard, which allows it to be anywhere in the vCard). Otherwise, properties can be defined in any order.

blue tickY = required Green tickY = supported

Name Versions Description Example
2.1 3.0 4.0
ADR Green tickY Green tickY Green tickY A structured representation of the physical delivery address for the vCard object. ADR;TYPE=home:;;123 Main St.;Springfield;IL;12345;USA
AGENT Green tickY Green tickY Information about another person who will act on behalf of the vCard object. Typically this would be an area administrator, assistant, or secretary for the individual. Can be either a URL or an embedded vCard. AGENT:http://mi5.gov.uk/007
ANNIVERSARY Green tickY Defines the person's anniversary. ANNIVERSARY:19901021
BDAY Green tickY Green tickY Green tickY Date of birth of the individual associated with the vCard. BDAY:19700310
BEGIN blue tickY blue tickY blue tickY All vCards must start with this property. BEGIN:VCARD
CALADRURI Green tickY A URL to use for sending a scheduling request to the person's calendar. CALADRURI:http://example.com/calendar/jdoe
CALURI Green tickY A URL to the person's calendar. CALURI:http://example.com/calendar/jdoe
CATEGORIES Green tickY Green tickY Green tickY A list of "tags" that can be used to describe the object represented by this vCard. CATEGORIES:swimmer,biker
CLASS Green tickY Describes the sensitivity of the information in the vCard. CLASS:public
CLIENTPIDMAP Green tickY Used for synchronizing different revisions of the same vCard. CLIENTPIDMAP:1;urn:uuid:3df403f4-5924-4bb7-b077-3c711d9eb34b
EMAIL Green tickY Green tickY Green tickY The address for electronic mail communication with the vCard object. EMAIL:johndoe@hotmail.com
END blue tickY blue tickY blue tickY All vCards must end with this property. END:VCARD
FBURL Green tickY Defines a URL that shows when the person is "free" or "busy" on their calendar. FBURL:http://example.com/fb/jdoe
FN Green tickY blue tickY blue tickY The formatted name string associated with the vCard object. FN:Dr. John Doe
GENDER Green tickY Defines the person's gender. GENDER:F
GEO Green tickY Green tickY Green tickY Specifies a latitude and longitude. 2.1, 3.0: GEO:39.95;-75.1667
4.0: GEO:geo:39.95,-75.1667
IMPP light green tickY* Green tickY Defines an instant messenger handle.

* This property was introduced in a separate RFC when the latest vCard version was 3.0. Therefore, 3.0 vCards may use this property, even though it's not part of the 3.0 specs.
IMPP:aim:johndoe@aol.com
KEY Green tickY Green tickY Green tickY The public encryption key associated with the vCard object. It may point to an external URL, may be plain text, or may be embedded in the vCard as a Base64 encoded block of text. 2.1: KEY;PGP:http://example.com/key.pgp
2.1: KEY;PGP;ENCODING=BASE64:[base64-data]
3.0: KEY;TYPE=PGP:http://example.com/key.pgp
3.0: KEY;TYPE=PGP;ENCODING=B:[base64-data]
4.0: KEY;MEDIATYPE=application/pgp-keys:http://example.com/key.pgp
4.0: KEY:data:application/pgp-keys;base64,[base64-data]
KIND Green tickY Defines the type of entity that this vCard represents, such as an individual or organization. KIND:individual
LABEL Green tickY Green tickY light green tickY* Represents the actual text that should be put on the mailing label when delivering a physical package to the person/object associated with the vCard (related to the ADR property).

* Not supported in version 4.0. Instead, this information is stored in the LABEL parameter of the ADR property.
LABEL;TYPE=HOME:123 Main St.\nSpringfield, IL 12345\nUSA
LANG Green tickY Defines a language that the person speaks. LANG:fr-CA
LOGO Green tickY Green tickY Green tickY An image or graphic of the logo of the organization that is associated with the individual to which the vCard belongs. It may point to an external URL or may be embedded in the vCard as a Base64 encoded block of text. 2.1: LOGO;PNG:http://example.com/logo.png
2.1: LOGO;PNG;ENCODING=BASE64:[base64-data]
3.0: LOGO;TYPE=PNG:http://example.com/logo.png
3.0: PHOTO;TYPE=PNG;ENCODING=B:[base64-data]
4.0: LOGO;MEDIATYPE=image/png:http://example.com/logo.png
4.0: PHOTO:data:image/png;base64,[base64-data]
MAILER Green tickY Green tickY Type of email program used. MAILER:Thunderbird
MEMBER Green tickY Defines a member that is part of the group that this vCard represents. Acceptable values include:
  • a "mailto:" URL containing an email address
  • a UID which references the member's own vCard
The KIND property must be set to "group" in order to use this property.
MEMBER:urn:uuid:03a0e51f-d1aa-4385-8a53-e29025acd8af
N blue tickY blue tickY Green tickY A structured representation of the name of the person, place or thing associated with the vCard object. N:Doe;John;;Dr;
NAME Green tickY Provides a textual representation of the SOURCE property.
NICKNAME Green tickY Green tickY One or more descriptive/familiar names for the object represented by this vCard. NICKNAME:Jon,Johnny
NOTE Green tickY Green tickY Green tickY Specifies supplemental information or a comment that is associated with the vCard. NOTE:I am proficient in Tiger-Crane Style,\nand I am more than proficient in the exquisite art of the Samurai sword.
ORG Green tickY Green tickY Green tickY The name and optionally the unit(s) of the organization associated with the vCard object. This property is based on the X.520 Organization Name attribute and the X.520 Organization Unit attribute. ORG:Google;GMail Team;Spam Detection Squad
PHOTO Green tickY Green tickY Green tickY An image or photograph of the individual associated with the vCard. It may point to an external URL or may be embedded in the vCard as a Base64 encoded block of text. 2.1: PHOTO;JPEG:http://example.com/photo.jpg
2.1: PHOTO;JPEG;ENCODING=BASE64:[base64-data]
3.0: PHOTO;TYPE=JPEG:http://example.com/photo.jpg
3.0: PHOTO;TYPE=JPEG;ENCODING=B:[base64-data]
4.0: PHOTO;MEDIATYPE=image/jpeg:http://example.com/photo.jpg
4.0: PHOTO:data:image/jpeg;base64,[base64-data]
PRODID Green tickY Green tickY The identifier for the product that created the vCard object. PRODID:-//ONLINE DIRECTORY//NONSGML Version 1//EN
PROFILE Green tickY Green tickY States that the vCard is a vCard. PROFILE:VCARD
RELATED Green tickY Another entity that the person is related to. Acceptable values include:
  • a "mailto:" URL containing an email address
  • a UID which references the person's own vCard
RELATED;TYPE=friend:urn:uuid:03a0e51f-d1aa-4385-8a53-e29025acd8af
REV Green tickY Green tickY Green tickY A timestamp for the last time the vCard was updated. REV:20121201T134211Z
ROLE Green tickY Green tickY Green tickY The role, occupation, or business category of the vCard object within an organization. ROLE:Executive
SORT-STRING Green tickY Green tickY light green tickY* Defines a string that should be used when an application sorts this vCard in some way.

* Not supported in version 4.0. Instead, this information is stored in the SORT-AS parameter of the N and/or ORG properties.
SORT-STRING:Doe
SOUND Green tickY Green tickY Green tickY By default, if this property is not grouped with other properties it specifies the pronunciation of the FN property of the vCard object. It may point to an external URL or may be embedded in the vCard as a Base64 encoded block of text. 2.1: SOUND;OGG:http://example.com/sound.ogg
2.1: SOUND;OGG;ENCODING=BASE64:[base64-data]
3.0: SOUND;TYPE=OGG:http://example.com/sound.ogg
3.0: SOUND;TYPE=OGG;ENCODING=B:[base64-data]
4.0: SOUND;MEDIATYPE=audio/ogg:http://example.com/sound.ogg
4.0: SOUND:data:audio/ogg;base64,[base64-data]
SOURCE Green tickY Green tickY Green tickY A URL that can be used to get the latest version of this vCard. SOURCE:http://johndoe.com/vcard.vcf
TEL Green tickY Green tickY Green tickY The canonical number string for a telephone number for telephony communication with the vCard object. TEL;TYPE=cell:(123) 555-5832
TITLE Green tickY Green tickY Green tickY Specifies the job title, functional position or function of the individual associated with the vCard object within an organization. TITLE:V.P. Research and Development
TZ Green tickY Green tickY Green tickY The time zone of the vCard object. 2.1, 3.0: TZ:-0500
4.0: TZ:America/New_York
UID Green tickY Green tickY Green tickY Specifies a value that represents a persistent, globally unique identifier associated with the object. UID:urn:uuid:da418720-3754-4631-a169-db89a02b831b
URL Green tickY Green tickY Green tickY A URL pointing to a website that represents the person in some way. URL:http://www.johndoe.com
VERSION blue tickY blue tickY blue tickY The version of the vCard specification. In versions 3.0 and 4.0, this must come right after the BEGIN property. VERSION:3.0
XML Green tickY Any XML data that is attached to the vCard. This is used if the vCard was encoded in XML (xCard standard) and the XML document contained elements which are not part of the xCard standard. XML:<b>Not an xCard XML element</b>

A handful of separate specifications define additional vCard properties.

Name Specification Description Example
BIRTHPLACE RFC 6474 The location of the individual's birth. BIRTHPLACE;VALUE=text:Maida Vale\, London\, England
DEATHDATE RFC 6474 The individual's time of death. DEATHDATE:19540607
DEATHPLACE RFC 6474 The location of the individual death. DEATHPLACE;VALUE=uri:geo:53.328,-2.229409
EXPERTISE RFC 6715 A professional subject area that the person has knowledge of. EXPERTISE;LEVEL=expert:Computer Science
HOBBY RFC 6715 A recreational activity that the person actively engages in. HOBBY;LEVEL=high:knitting
IMPP RFC 4770 Defines an instant messenger handle. This was added to the official vCard specification in version 4.0. IMPP:aim:johndoe@aol.com
INTEREST RFC 6715 A recreational activity that the person is interested in, but does not necessarily take part in. INTEREST;LEVEL=high:baseball
ORG-DIRECTORY RFC 6715 A URI representing the person's work place, which can be used to lookup information on the person's co-workers. ORG-DIRECTORY:http://www.company.com/employees

vCard extensions[edit]

vCard supports private extensions, with an "X-" prefix, a number of which are in common usage.[citation needed]

Some of these include:

Extension Used As Data Semantic
Extensions supported by several different programs.
X-ABUID property string Apple Address Book UUID for that entry
X-ANNIVERSARY property YYYY-MM-DD arbitrary anniversary (in addition to BDAY, birthday)
X-ASSISTANT property string assistant name (instead of AGENT)
X-MANAGER property string manager name
X-SPOUSE property string spouse name
X-GENDER property string value Male or Female
X-AIM property string Instant Messaging (IM) contact information; TYPE parameter as for TEL
X-ICQ property string
X-GOOGLE-TALK, X-GTALK property string
X-JABBER property string
X-MSN property string
X-YAHOO property string
X-TWITTER property string
X-SKYPE, X-SKYPE-USERNAME property string
X-GADUGADU property string
X-GROUPWISE property string
X-MS-IMADDRESS property string IM address in VCF attachment from Outlook (right click Contact, Send Full Contact, Internet Format.)
X-MS-CARDPICTURE property string Works as PHOTO or LOGO. Contains an image of the Card in Outlook.
X-MS-OL-DESIGN property string Contains XML used by Outlook describing the layout of the information presented as a business card.[2]
X-PHONETIC-FIRST-NAME, X-PHONETIC-LAST-NAME property string alternative spellings, for assisting with the pronunciation of unfamiliar names
Introduced and used by Mozilla; used by Evolution (software)
X-MOZILLA-HTML property TRUE/FALSE mail recipient prefers HTML-formatted email
X-MOZILLA-PROPERTY property string Thunderbird specific settings
Introduced and used by Evolution (software)
X-EVOLUTION-ANNIVERSARY property YYYY-MM-DD arbitrary anniversary (in addition to BDAY, birthday)
X-EVOLUTION-ASSISTANT property string assistant name (instead of Agent)
X-EVOLUTION-BLOG-URL property string/URL blog URL
X-EVOLUTION-FILE-AS property string file under different name (in addition to N, name components; and FN, full name)
X-EVOLUTION-MANAGER property string manager name
X-EVOLUTION-SPOUSE property string spouse name
X-EVOLUTION-VIDEO-URL property string/URL video chat address
X-EVOLUTION-CALLBACK TEL TYPE parameter value - callback phone number
X-EVOLUTION-RADIO TEL TYPE parameter value - radio contact information
X-EVOLUTION-TELEX TEL TYPE parameter value - Telex contact information
X-EVOLUTION-TTYTDD TEL TYPE parameter value - TTY TDD contact information
Introduced and used by Kontact and KAddressBook
X-KADDRESSBOOK-BlogFeed property string/URL blog URL
X-KADDRESSBOOK-X-Anniversary property ISO date arbitrary anniversary, in addition to BDAY = birthday
X-KADDRESSBOOK-X-AssistantsName property string assistant name (instead of Agent)
X-KADDRESSBOOK-X-IMAddress property string im address
X-KADDRESSBOOK-X-ManagersName property string manager name
X-KADDRESSBOOK-X-Office property string office description
X-KADDRESSBOOK-X-Profession property string profession
X-KADDRESSBOOK-X-SpouseName property string spouse name

Note: The Internet media type text/vcard was used (incorrectly) in some SyncML Documentation to refer to vCard 3.0, and the example was followed in various implementations.

See also[edit]

References[edit]

  1. ^ a b RFC 6350, section 10.1 "Media Type Registration"
  2. ^ "Meaning of X-MS-OL-DESIGN". 1 May 2011. Retrieved 22 April 2014. 

External links[edit]