Convert db to vcf

Convert DB to VCF

Extract contacts from a DB database and export them as a compatible VCF file.

Convert DB files online

We don’t have a dedicated online converter for DB to VCF yet, but you can convert DB files online to these and more formats:

How to convert db to vcf file

A phone, desktop address book, or backup utility may store contacts in a .db database while the destination accepts only vCard files. Exporting the records as .vcf allows them to be imported into Contacts, Google Contacts, Outlook, Thunderbird, or another compatible device.

What the DB format is

.db is a filename extension, not a single contact format. The file may be a SQLite database, an application-specific database, a Palm or mobile backup, or a proprietary binary file. The program or device that created it determines how its records must be decoded.

A SQLite database can be inspected with DB Browser for SQLite, SQLiteStudio, or the SQLite command-line utility. Work on a copy and identify the format before modifying anything. On systems with the file command, file contacts.db may identify a SQLite file, but it cannot interpret proprietary databases.

SQLite contact data may be distributed across tables such as contacts, phone_numbers, emails, and addresses. Other databases may contain encrypted, deleted, hashed, or application-internal values rather than exportable contact fields. A generic converter cannot reliably process every file using the .db extension.

What the VCF format is

VCF is the usual filename extension for vCard, a text-based contact-exchange format. One file can contain one contact or multiple BEGIN:VCARD and END:VCARD records. Common properties include names, telephone numbers, email addresses, organizations, postal addresses, birthdays, photographs, notes, and contact-group information.

vCard 3.0 is commonly accepted by older phones and desktop address books; vCard 4.0 has better-defined modern properties but is not supported by every importer. VCF preserves contact boundaries and field labels more effectively than a spreadsheet, although unsupported properties can still be discarded during import.

Export from the source application

  1. Identify the application or device that created the database and make a backup copy of the file.
  2. Open the database through that application instead of editing its internal tables directly.
  3. Use a command such as Contacts → Export, File → Export → vCard, or the application’s migration or backup function.
  4. Select vCard, vCard 3.0, or .vcf and save the exported file.
  5. Open the result in a text editor and verify that it contains complete BEGIN:VCARD and END:VCARD blocks.

This is the preferred method for phone and proprietary databases because the original software can resolve linked tables, character encoding, contact photos, custom fields, and application-specific record markers.

Extract contacts from SQLite

Open a copy of a readable SQLite file in DB Browser for SQLite or SQLiteStudio and inspect the tables and columns. From a terminal, these commands list tables and show the columns in a table:

sqlite3 contacts.db ".tables"
sqlite3 contacts.db "PRAGMA table_info(contacts);"

After identifying the correct schema, export the relevant fields to CSV. This example assumes one contact per row; change the table and column names to match the database:

sqlite3 -header -csv contacts.db "SELECT first_name, last_name, phone, email FROM contacts;" > contacts.csv

If phone numbers or email addresses are stored in separate tables, use SQL joins or a script to group them under the correct person. Do not assume that a table named contacts exists or that its columns use these names.

Convert extracted data to VCF

For a small dataset, import the CSV into an address-book application, map the name, phone, email, address, and note columns, then export vCard. On macOS, Apple Contacts can import compatible CSV data and use File → Export → Export vCard. Thunderbird with the CardBook add-on can import mapped CSV fields and export vCard. Outlook can import CSV contact data, but bulk vCard export is not consistently available in all Outlook versions, so use a vCard-capable address-book application when Outlook cannot produce the required file.

For repeatable processing, use a script or a library such as Python’s vobject. A minimal vCard 3.0 record is:

BEGIN:VCARD
VERSION:3.0
N:Smith;Jane;;;
FN:Jane Smith
TEL;TYPE=CELL:+15551234567
EMAIL:jane@example.com
END:VCARD

Generate one complete record per contact, encode the file as UTF-8, and escape backslashes, commas, semicolons, and line breaks according to the vCard version. Fold long lines where required by the specification. Multiple phone numbers or email addresses should be written as repeated TEL or EMAIL properties, not concatenated into one value.

Online conversion options

Online converters are practical only after the database has been opened and exported to a supported format, usually CSV. A service such as ConvertCSV can be used for CSV-to-vCard conversion when its current tool accepts the required columns; upload a small test file first and verify the generated records. Online services generally cannot infer the schema of an arbitrary proprietary .db file.

Contact databases contain personal information, so use local tools for complete address books whenever possible. If an online service is necessary, check its privacy, retention, and deletion terms, avoid uploading passwords or unrelated database tables, and remove the uploaded file afterward if the service provides deletion controls.

Quality and compatibility checks

  • Names, telephone numbers, and email addresses usually transfer successfully; photos, groups, labels, addresses, birthdays, notes, custom fields, and linked relationships may be lost.
  • Use vCard 3.0 and UTF-8 when importing into an older phone or an unknown destination, then test a few contacts before importing the full file.
  • Check non-Latin names, accented characters, international telephone numbers, multiline notes, duplicate contacts, and multiple values for the same field.
  • A database may be encrypted or dependent on an application key; opening it in SQLiteStudio or DB Browser does not decrypt it or make its records meaningful.
  • Preserve the original database and keep the exported CSV or VCF as a separate backup until the destination has been checked.

Frequently asked questions

Will converting a DB file to VCF export all my contacts?

Only contact records and fields that can be identified in the DB database can be exported. Other tables, application-specific data, notes, relationship data, and unsupported fields may be left out.

Are names, phone numbers, and email addresses preserved from DB to VCF?

Usually, standard contact fields such as names, telephone numbers, and email addresses are mapped to their VCF equivalents. Custom columns or unusual field formats may be omitted or placed in a less compatible notes field.

Why does my DB to VCF conversion produce an empty or unreadable contact file?

The .db extension can represent many different database structures, so the conversion fails if the database is not a contact database, is encrypted, or uses an unsupported schema. Incorrect text encoding or malformed contact fields can also cause missing or unreadable characters.

Can I convert a VCF file back to the original DB database?

No, not as an equivalent database; VCF stores contact information rather than the original tables, relationships, indexes, and application-specific structure. A reverse conversion can create a new database, but it cannot restore information that was not exported.