vCard Documentation

Welcome to the vCard documentation. This component provides libraries for parsing, validating, and serializing vCard data according to RFC 6350.

What is vCard?

vCard is the standard for electronic business cards. RFC 6350 defines version 4.0 of the vCard format, which enables the capture and exchange of information normally found on a business card, including:

  • Names and organizations
  • Postal addresses
  • Phone numbers and email addresses
  • URLs and instant messaging handles
  • Photos and logos
  • Geographical coordinates
  • And much more

Available Implementations

Choose the implementation that matches your technology stack:

.NET

Full-featured .NET library for vCard 4.0 parsing and generation.

Python

Python library for vCard 4.0 support.

Rust

Rust library for vCard 4.0 parsing and serialization.

TypeScript

TypeScript library for vCard 4.0 parsing and serialization.

Quick Start

.NET

dotnet add package VCard.Net
using VCard;

// Parse a vCard
var vcard = VCard.Parse(vcardText);
Console.WriteLine($"Name: {vcard.FormattedName}");

// Create a vCard
var newCard = new VCard
{
    FormattedName = "John Doe",
    Email = "john@example.com"
};
string vcardText = newCard.ToString();

Python

pip install vcard
from vcard import VCard

# Parse a vCard
vcard = VCard.parse(vcard_text)
print(f"Name: {vcard.formatted_name}")

# Create a vCard
new_card = VCard(
    formatted_name="John Doe",
    email="john@example.com"
)
vcard_text = str(new_card)

Rust

[dependencies]
vcard = "*"
use vcard::VCard;

// Parse a vCard
let vcard = VCard::parse(&vcard_text)?;
println!("Name: {}", vcard.formatted_name);

// Create a vCard
let new_card = VCard::new()
    .formatted_name("John Doe")
    .email("john@example.com");
let vcard_text = new_card.to_string();

TypeScript

npm install @specworks/vcard
import { VCardParser, VCardObject, VCardSerializer, Telephone, TelType } from '@specworks/vcard';

// Parse a vCard
const parser = new VCardParser();
const vcards = parser.parse(vcardText);
console.log(`Name: ${vcards[0].formattedName}`);

// Create a vCard
const vcard = new VCardObject();
vcard.version = '4.0';
vcard.formattedName = 'John Doe';
const serializer = new VCardSerializer();
const text = serializer.serialize(vcard);

Specification Compliance

All implementations follow RFC 6350 - vCard Format Specification version 4.0.

Key features implemented:

  • ✅ All required properties (VERSION, FN, N)
  • ✅ All standard properties (TEL, EMAIL, ADR, etc.)
  • ✅ Property parameters (TYPE, VALUE, PREF, etc.)
  • ✅ Property grouping
  • ✅ Value escaping and encoding
  • ✅ Multiple property instances
  • ✅ Extensibility (X-properties)

See each implementation's documentation for detailed compliance information.

Test Cases

All implementations are tested against shared test cases in the testcases/ directory. This ensures consistency across languages.

Contributing

Contributions are welcome! See the GitHub repository for:

  • Issue tracking
  • Pull request guidelines
  • Architecture Decision Records (ADRs)
  • Development setup instructions

License

All vCard implementations are licensed under the MIT License.