vCard QR Code Generator

vCard QR Code Generator

Sharing contact details by QR code is basically: put a vCard (.vcf) payload into a QR code, then let the phone’s camera (or QR scanner) offer “Add contact”.

This post shows a simple vCard QR Code Generator workflow using the qrcode CLI from the Node.js package node-qrcode.

If you’re printing a business card or adding a “save my contact” link to a website, a vCard QR Code Generator is often more useful than a plain URL QR code because it can open an “Add Contact” flow on many devices.

What you’re making 📇

A QR code that encodes a vCard like this:

BEGIN:VCARD
VERSION:3.0
N:LastName;FirstName;;;
FN:FirstName LastName
ORG:Organization
TITLE:Job title
TEL;TYPE=CELL:+1234567890
EMAIL:[email protected]
URL:https://vahac.com
END:VCARD

When scanned, many phones can interpret that payload and prompt to save it as a contact (behavior varies by OS/app). 📱

1) Install the CLI 🔧

This is the first step in the vCard QR Code Generator workflow.

Install the CLI globally:

npm install -g qrcode

That gives you a qrcode command you can run from the terminal.

2) Put the vCard into a file ✅

Multi-line strings inside a command are annoying (especially on Windows), so it’s cleaner to store the vCard in a file:

# contact.vcf
cat > contact.vcf <<'VCF'
BEGIN:VCARD
VERSION:3.0
N:LastName;FirstName;;;
FN:FirstName LastName
ORG:Organization
TITLE:Job title
TEL;TYPE=CELL:+1234567890
EMAIL:[email protected]
URL:https://vahac.com
END:VCARD
VCF

Notes (small things that save time) 🧠

  • Avoid trailing spaces at the end of lines.
  • Keep BEGIN:VCARD, VERSION:3.0, and END:VCARD exactly as shown.
  • If the QR becomes too “dense”, shorten fields (e.g., keep one phone, one email, one URL).

3) Generate the QR code (SVG) 🖼️

Here you actually run the vCard QR Code Generator command to produce the QR image.

macOS / Linux (bash)

qrcode -t svg -o contact-qr.svg "$(cat contact.vcf)"

Windows (PowerShell)

qrcode -t svg -o contact-qr.svg (Get-Content .\contact.vcf -Raw)

You now have contact-qr.svg you can:

  • Put on a website
  • Print on a card
  • Embed in a PDF

That’s the core vCard QR Code Generator flow.

4) Make it easier to scan 🎯

A good vCard QR Code Generator output is not just “valid”—it’s easy to scan under real conditions (print, glare, low light).

The CLI supports options that matter a lot for real-world scanning:

  • Error correction: higher survives scratches/print artifacts better, but stores less data.
  • Quiet zone: the white border around the QR. Too small → scanners fail.
  • Size: if you print, bigger is usually better.

Example “print-friendly” SVG:

qrcode -t svg -o contact-qr.svg -e H -q 4 -s 10 "$(cat contact.vcf)"

External reference on why error correction matters (from the QR Code inventor, DENSO WAVE):

https://www.qrcode.com/en/about/error_correction.html

What those do:

  • -e H → high error correction
  • -q 4 → quiet zone (border) size
  • -s 10 → scale factor (bigger output)

(Exact output depends on data size; the tool will choose a suitable QR version automatically unless you force one.)

5) Test on phones 📲

Quick testing checklist:

  • Try the default camera app first.
  • If the camera shows just plain text, try a different QR scanner app.
  • Test on both iOS and Android if you’re printing for other people.

Official scanning references (useful when someone says “my phone can’t scan it”):

iPhone (Apple guide): https://support.apple.com/guide/iphone/scan-a-qr-code-iphe8bda8762/ios
Android (Android.com guide): https://www.android.com/articles/how-do-you-scan-qr-codes-on-android/

This testing step is part of the vCard QR Code Generator checklist—don’t skip it if you plan to print.

6) Common pitfalls (and quick fixes) 🧯

Problem: QR code is too dense / hard to scan

  • Remove optional fields (TITLE, URL) or shorten values.
  • Increase size (-s or -w).
  • Use medium error correction (-e M) if you’re encoding a lot of text.

Problem: It scans, but doesn’t offer “Add contact”

  • Ensure the payload starts with BEGIN:VCARD and ends with END:VCARD.
  • Ensure VERSION:3.0 is present.
  • Remove extra whitespace and blank lines.

Problem: You want PNG instead of SVG

qrcode -t png -o contact-qr.png -e H -q 4 -s 10 "$(cat contact.vcf)"

7) Bonus: Generate many vCard QR codes in one go 🧰

If you’re generating multiple contacts, this turns your one-off command into a repeatable vCard QR Code Generator batch.

If you have multiple .vcf files:

mkdir -p out
for f in *.vcf; do
  base="${f%.vcf}"
  qrcode -t svg -o "out/${base}.svg" -e H -q 4 "$(cat "$f")"
done

Security note 🔐

A vCard QR Code Generator is usually safe when you control the QR code (your card, your website). But QR codes in random places can hide phishing links. If you share QR codes publicly, it’s worth reminding people to scan only from trusted sources.

External guidance:

FTC: https://consumer.ftc.gov/consumer-alerts/2023/12/scammers-hide-harmful-links-qr-codes-steal-your-information
FBI/IC3 PSA: https://www.ic3.gov/PSA/2025/PSA250731

Documentation links 📚

node-qrcode (project + CLI docs): https://github.com/soldair/node-qrcode
npm package page (qrcode): https://www.npmjs.com/package/qrcode
vCard 3.0 spec (RFC 2426): https://www.rfc-editor.org/rfc/rfc2426.html
vCard 4.0 spec (RFC 6350): https://datatracker.ietf.org/doc/html/rfc6350

Wrap-up ✨

A vCard QR Code Generator is just a QR code that contains a valid vCard payload. Once you keep the vCard clean, make the QR big enough, and leave a proper quiet zone, scanning becomes very reliable.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.