Convert

Convert VCF to HTML: Create a Styled Contact Directory from vCard files

Converting VCF contacts to HTML creates web-viewable contact pages that work in any browser on any device. The use cases range from simple contact list printouts to styled team directories, employee phone books, and embeddable contact widgets for websites. Unlike PDF or CSV output, HTML gives you full control over the visual layout with CSS styling.

However, most existing VCF-to-HTML tools produce unstyled, plain text dumps that are not useful as actual directories. The real value comes from generating a properly styled HTML page with contact cards, search functionality, or a sortable table. This guide covers four methods to convert VCF to HTML, from a Python script that creates a professional contact directory to online tools for quick conversions. If you need a different output format instead, see our guides for VCF to PDF, VCF to JSON, or VCF to XML.

We have built VCF conversion tools at Univik since 2013 and generate HTML directories for users creating team pages, internal phone books, and web-based contact directories from vCard exports.

3 Types of HTML Output

Before converting, decide which HTML layout suits your purpose. The right choice depends on whether you need a quick reference page or a polished directory you can publish on a website.

Output Type Best For Styling Example Use
Contact cards (grid) Team pages, directories CSS cards with photo, name, title, contact info Company “About Us” page
HTML table Phone books, reference lists Sortable rows with column headers Internal employee directory
Plain list Quick printout, data dump Minimal or no styling Temporary reference

4 Methods to Convert VCF to HTML

Method 1: Python Script (Styled Contact Directory)

This method produces a professional, CSS-styled contact directory page. The Python script parses the VCF file and generates an HTML page with contact cards that include name, email, phone, organization, and title.

1

Install the vobject library: pip install vobject

2

Save the following as vcf_to_html.py:

import vobject, sys
vcf_file = sys.argv[1] if len(sys.argv) > 1 else "contacts.vcf"
with open(vcf_file, "r", encoding="utf-8") as f:
  vcf_data = f.read()
cards = []
for card in vobject.readComponents(vcf_data):
  c = {}
  if hasattr(card, "fn"): c["name"] = card.fn.value
  if hasattr(card, "email"): c["email"] = card.email.value
  if hasattr(card, "tel"): c["phone"] = card.tel.value
  if hasattr(card, "org"): c["org"] = card.org.value[0]
  if hasattr(card, "title"): c["title"] = card.title.value
  cards.append(c)
html = "<!DOCTYPE html><html><head>"
html += "<meta charset='utf-8'>"
html += "<title>Contact Directory</title>"
html += "<style>"
html += "body{font-family:sans-serif;max-width:960px;margin:0 auto;padding:20px}"
html += ".cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}"
html += ".card{border:1px solid #ddd;border-radius:8px;padding:16px}"
html += ".card h3{margin:0 0 4px}.card p{margin:2px 0;color:#555}"
html += "</style></head><body>"
html += f"<h1>Contact Directory ({len(cards)} contacts)</h1>"
html += "<div class='cards'>"
for c in sorted(cards, key=lambda x: x.get("name","")):
  html += "<div class='card'>"
  html += f"<h3>{c.get('name','')}</h3>"
  if "title" in c: html += f"<p>{c['title']}</p>"
  if "org" in c: html += f"<p>{c['org']}</p>"
  if "email" in c: html += f"<p><a href='mailto:{c['email']}'>{c['email']}</a></p>"
  if "phone" in c: html += f"<p><a href='tel:{c['phone']}'>{c['phone']}</a></p>"
  html += "</div>"
html += "</div></body></html>"
with open("directory.html", "w", encoding="utf-8") as f:
  f.write(html)
print(f"Created directory.html with {len(cards)} contacts")

3

Run it: python vcf_to_html.py contacts.vcf

The output is a responsive HTML page with a CSS grid of contact cards. Contacts are sorted alphabetically. Email addresses are clickable mailto links and phone numbers are clickable tel links (which trigger the dialer on mobile devices). You can then customize the CSS to match your organization’s branding.

Method 2: Online VCF to HTML Converter (No Code)

If you do not need a custom-styled directory, then online converters produce basic HTML from your VCF file.

1

Go to an online VCF to HTML converter. ConversionTab (conversiontab.com/vcf/html) processes files locally in the browser. Aconvert and GroupDocs also offer server-side conversion with additional options.

2

Upload your VCF file or paste vCard text directly into the input field.

3

Download the HTML output. The result is typically a basic HTML page with contact data in a list or table format. Browser-based tools that process locally are safer for sensitive contact data because the file stays on your device.

Online Tools Produce Unstyled HTML

Most online VCF-to-HTML converters output plain, unstyled HTML. If you need a professional-looking directory, use Method 1 (Python script with CSS) or Method 3 (converter tool) and then customize the CSS afterward.

Method 3: VCF Converter Tool (GUI, Bulk Files)

A dedicated VCF converter tool provides a graphical interface for converting VCF files to HTML. This is the simplest option for non-developers who need to convert many files at once without writing code.

1

Load VCF files. Use Add Files or Add Folder to load your contacts. The tool previews all contacts before conversion, so you can verify the data.

2

Select HTML as the output format. Choose which contact fields to include. Export and save the .html file. The converter generates an HTML file with all contact attributes preserved.

Method 4: VCF to CSV to HTML Table

If you already have your contacts in CSV format (or can convert VCF to CSV easily), you can generate an HTML table from the spreadsheet. This is a two-step process but it works well when you also need to clean or filter the data first.

1

Convert VCF to CSV using any method from our VCF to CSV guide.

2

Open in Excel and save as HTML. Open the CSV in Excel, clean the data as needed, then go to File, Save As, and choose “Web Page (*.htm;*.html).” Excel generates an HTML table with your contact data. The styling is basic but the table structure is complete.

3

Add CSS styling (optional). Open the HTML file in a text editor and add CSS inside the <head> section for better formatting. Even basic CSS rules for table borders, font, and padding make the output significantly more readable.

VCF to HTML Element Mapping

This table shows how VCF properties map to HTML elements in a contact directory. The recommended approach uses semantic HTML elements with CSS classes for styling flexibility.

VCF Property HTML Element Notes
FN (full name) <h3> or <strong> Primary heading for each contact card
TITLE <p class=”title”> Job title, displayed under the name
ORG <p class=”org”> Organization/company name
EMAIL <a href=”mailto:…”> Clickable mailto link
TEL <a href=”tel:…”> Clickable tel link (opens dialer on mobile)
ADR <address> or <p> Semantic <address> tag for accessibility
URL <a href=”…” target=”_blank”> External link, opens in new tab
PHOTO <img src=”data:image/jpeg;base64,…”> Embedded photo or external URL reference
NOTE <p class=”notes”> Additional text, may need HTML escaping

Using mailto: links for email and tel: links for phone numbers makes the directory functional on mobile devices. Tapping a phone number opens the dialer, and tapping an email opens the mail app.

Method Comparison Table

Criteria Python Script Online Tool Converter Tool CSV to HTML
Styled output Yes (CSS included) No (plain) Basic With extra CSS
Contact card layout Grid cards List/table List Table only
Clickable links mailto + tel Varies Varies No
Custom CSS/branding Full control No Limited After export
Multi-contact VCF Yes Depends Yes Yes
Technical skill needed Medium None None Low
Best for Team pages, directories Quick one-off Bulk non-dev Existing CSV workflow

Styling the HTML Directory

The Python script in Method 1 includes basic CSS, but you can customize it further. Here are three common enhancements that improve the directory page significantly.

1

Add a search/filter box. Insert an <input> field at the top of the page and add a small JavaScript function that filters the contact cards by name as the user types. This makes directories with 50 or more contacts much easier to navigate.

2

Group contacts by company or department. Instead of a flat grid, sort contacts by the ORG field and add section headings. This creates a department-based directory that is easier to browse than an alphabetical list.

3

Add responsive breakpoints. The CSS grid in the script already uses auto-fill and minmax for responsiveness. For additional control, add media queries: one column on phones (max-width: 480px), two columns on tablets, and three or four on desktop.

Common Problems and Fixes

1

Special characters display incorrectly in the HTML page. The HTML file is missing a character encoding declaration. Make sure the <head> section includes <meta charset="utf-8">. The Python script in Method 1 already includes this, but online tools and Excel exports may omit it.

2

Ampersands or angle brackets in contact names break the HTML. If a company name contains “&” (e.g., “AT&T”) or a note contains “<“, these must be HTML-escaped. Python’s html.escape() function handles this. Always escape user data before inserting it into HTML to prevent broken markup and XSS vulnerabilities.

3

Embedded photos make the HTML file very large. VCF files with base64-encoded PHOTO data produce huge HTML files (each photo can be 50-200 KB of base64 text). If you do not need photos in the directory, skip the PHOTO property. If you do need them, consider saving photos as separate image files and referencing them with <img src="photos/contact_1.jpg"> instead of embedding base64.

4

Phone numbers are not clickable on mobile. The HTML output uses plain text for phone numbers instead of <a href="tel:..."> links. To fix this, wrap each phone number in a tel link. The Python script in Method 1 generates these automatically, but online tools and Excel exports typically do not.

Frequently Asked Questions

How do I convert VCF contacts to an HTML page?

Use a Python script with the vobject library to parse VCF properties and generate styled HTML with CSS. If you prefer no code, use an online VCF to HTML converter or a VCF converter tool that supports HTML output.

Can I create a searchable contact directory from a VCF file?

Yes. First convert the VCF to HTML using Method 1, then add a search input and a JavaScript filter function. The filter hides contact cards that do not match the search text. For directories under 500 contacts, this client-side approach works well without a backend.

Can I embed contact photos in the HTML directory?

Yes, but it increases file size significantly. VCF PHOTO data (base64-encoded) can be inserted directly as an <img src="data:image/jpeg;base64,..."> element. For better performance, save photos as separate files and reference them with standard image paths.

What is the difference between VCF to HTML and VCF to PDF?

HTML is interactive (clickable links, searchable, responsive) and editable. PDF is a fixed-layout format designed for printing. Use HTML for web directories and team pages. Use PDF for printable contact lists and offline reference.

Can I convert VCF to HTML and then host it on a website?

Yes. The HTML file generated by any of these methods can be uploaded directly to any web server or included in a website. If you need to embed it within an existing page, copy the <style> and <div class="cards"> sections into your site template.

Conclusion

Last verified: February 2026. Python script tested with vobject 0.9.7 on Python 3.12. HTML output tested in Chrome, Firefox, Safari, and Edge. VCF files tested from iCloud, Google Contacts, Outlook and Samsung exports across vCard 2.1, 3.0 and 4.0.

To convert VCF to HTML, the Python script (Method 1) creates a professional CSS-styled contact directory with card layout, clickable links and responsive design. For quick conversions without styling needs, online tools (Method 2) or a VCF converter tool (Method 3) generate basic HTML from any VCF file. The CSV-to-HTML path (Method 4) is useful if you already have the contacts in a spreadsheet.

Three things to remember: use mailto: and tel: links to make email and phone clickable (especially important on mobile), escape special characters with html.escape() to prevent broken markup, and include <meta charset="utf-8"> in the head to preserve international characters.

About the Author

This guide is written and maintained by the Univik team, developers of file conversion and digital forensics tools since 2013. Our VCF parsers generate styled HTML directories with responsive CSS layouts, clickable contact links, and support for vCard 2.1 through 4.0 from over 15 platforms. Have a conversion issue we did not cover? Let us know.