.vcf MIME type
vCard contacttext & code
text/vcardContact cards (vCard, RFC 6350) that phones and mail apps import into the address book.
| MIME type | text/vcard |
|---|---|
| Extensions | .vcf, .vcard |
| Also seen as | text/x-vcard, text/directory |
| Content-Type | text/vcard; charset=utf-8 |
| Compress in transit? | Yes — enable gzip or Brotli |
Good to know
- Apache's stock config still maps
.vcfto the oldtext/x-vcard. Phones accept both, buttext/vcardis the registered type. - vCard 4.0 is UTF-8 only; older 2.1 files can declare a different charset on each property.
Serve .vcf files with the right type
The response header to send:
Content-Type: text/vcard; charset=utf-8
Most servers pick the type from the file extension. If yours sends the wrong one, map it explicitly:
nginx (inside the types block in mime.types)
text/vcard vcf vcard;
Apache (.htaccess or server config)
AddType text/vcard .vcf .vcard
Express
res.set("Content-Type", "text/vcard; charset=utf-8");Python
import mimetypes
mimetypes.add_type("text/vcard", ".vcf")
mimetypes.add_type("text/vcard", ".vcard")HTML file input
<input type="file" accept=".vcf,.vcard,text/vcard">
Check it
See what a server sends for a file, and what type a local file really is by its contents:
curl -sI https://example.com/file.vcf | grep -i '^content-type:' file --mime-type file.vcf
Frequently asked questions
What is the MIME type for .vcf files?
text/vcard. You may also see text/x-vcard, text/directory, but text/vcard is the one to send. The same type covers .vcard.
What Content-Type header should a .vcf file be served with?
Content-Type: text/vcard; charset=utf-8. As a text format, include the charset so browsers don't guess the encoding. It compresses well, so let the server apply gzip or Brotli.
Related types
Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options