Point a phone camera at the right QR code and it offers to save the contact โ name, number, email, company, straight into the address book, no typing. Business cards, email signatures, conference badges, "contact the office" posters, staff directory pages: same trick everywhere. Generator websites make these one at a time; if you're rendering a badge for every attendee or a card for every employee from a template, you want an API.
Mockbird's QR endpoint has dedicated contact parameters โ you pass the fields, the server builds the vCard:
<img src="https://mockbird.mockbird.workers.dev/m/demo/qr?name=Jane+Doe&phone=%2B15551234567&email=jane%40example.com" width="256">
# or download it
curl -o contact.png "https://mockbird.mockbird.workers.dev/m/demo/qr/400?name=Jane+Doe&phone=%2B15551234567&email=jane%40example.com"
Scan that with any modern phone camera and it prompts to add Jane Doe to contacts. No key, no signup, no watermark โ and the same URL returns the same bytes forever, so it's safe to cache, print, and re-render in build pipelines.
Contact QR codes encode a vCard โ a plain-text format phone cameras recognize:
BEGIN:VCARD
VERSION:3.0
N:Doe;Jane;;;
FN:Jane Doe
TEL;TYPE=CELL:+15551234567
EMAIL:jane@example.com
END:VCARD
Simple โ until you hand-build it. The format has rules that are easy to miss: values must escape ; , \ and newlines (RFC 2426), lines are CRLF-separated, N: wants Family;Given order while FN: wants the display name, and FN is required in vCard 3.0 โ omit it and some readers show an empty contact. Then the whole multi-line string must be URL-encoded to survive a query string. Even QuickChart's own vCard documentation example writes N: twice where the second line should be FN: โ that's how easy this is to get wrong. With ?name= + ?phone= you skip all of it โ standard URL encoding of your values is all that's left, and the server handles the payload layer:
# company name is `Smith, Jones & Co; Ltd` โ no payload escaping on your side, just URL encoding
โฆ/qr?name=Alex+Smith&org=Smith%2C+Jones+%26+Co%3B+Ltd
# raw ?data= still works if you'd rather build the vCard yourself
โฆ/qr?data=BEGIN%3AVCARD%0D%0AVERSION%3A3.0%0D%0AN%3ADoe%3BJane%3B%3B%3B%0D%0AFN%3AJane%20Doe%0D%0AEND%3AVCARD
Those two paths return byte-identical images for the same vCard โ the contact params are sugar over the same encoder, not a different code path.
| Param | vCard property | What it does |
|---|---|---|
name | FN + N | Display name, โค64 chars. Presence of name switches contact mode on; don't combine with data or ssid. The last whitespace-separated word is treated as the family name for N:. |
phone | TEL;TYPE=CELL | โค32 chars. Include the country code (+1โฆ) so it dials from anywhere; URL-encode the + as %2B. |
email | EMAIL | โค64 chars. |
org | ORG | Company / organization, โค64 chars. |
title | TITLE | Job title, โค64 chars. |
url | URL | Website, โค200 chars. (In contact mode ?url= is the website field; on its own it stays an alias for ?data=.) |
address | ADR;TYPE=WORK | Free-form address, โค128 chars โ placed in the street slot, which readers render fine for a one-line address. |
Everything from the base QR endpoint composes: /qr/:size or ?size= (64โ2000), ?format=svg or .svg, ?ecc=L|M|Q|H, ?margin=, ?fg=/?bg=. | ||
Why vCard 3.0 and not MECARD or vCard 4.0? vCard 3.0 is the one both iOS and Android camera apps parse natively and completely; MECARD is terser but supports fewer fields, and 4.0 still trips up some readers. If you specifically want MECARD, build it in ?data= โ the encoder doesn't care.
# full business card
โฆ/qr?name=Ada+Lovelace&title=Chief+Engineer&org=Analytical+Engines&phone=%2B442079460958&email=ada%40example.com&url=https%3A%2F%2Fada.example
# print-quality badge: bigger, high error correction (survives lanyard scuffing)
โฆ/qr/800?name=Jane+Doe&phone=%2B15551234567&ecc=H
# crisp vector for a PDF card
โฆ/qr.svg?name=Jane+Doe&email=jane%40example.com
# email-signature sized, brand colors
โฆ/qr/120?name=Jane+Doe&phone=%2B15551234567&fg=003366
A badge for every row of a staff list is a shell loop:
> while IFS=, read -r name phone email; do
curl -s -G -o "badge-${name// /-}.png" \
"https://mockbird.mockbird.workers.dev/m/demo/qr/400" \
--data-urlencode "name=$name" --data-urlencode "phone=$phone" \
--data-urlencode "email=$email" --data-urlencode "ecc=Q"
done < staff.csv
curl -G --data-urlencode is the easy way to get the URL encoding right from a shell โ it handles the +, spaces and @ for you.
A contact QR code's purpose is to hand out the details printed next to it, so the scan-side privacy story is simple. But the URL contains the phone number and email too: it sits in browser history, shell history, and proxy logs. Mockbird redacts phone=, email= and address= (and hand-built vCard payloads in ?data=) from its own request inspector โ on every project, because the shared demo project's inspector is public. For a card you'd rather not have in living URLs at all, generate the image once with curl -o and keep the file.
| Mockbird | QuickChart /qr | goqr.me (api.qrserver.com) | |
|---|---|---|---|
| Dedicated contact params in the API | โ ?name=/?phone=/?email=/?org=/?title=/?url=/?address= | โ โ build + URL-encode the vCard yourself in ?text= (their Google Sheets add-on helps for batches) | โ โ ?data= only |
| Payload escaping handled | โ server-side (RFC 2426) | your job | your job |
| Key / signup | none | none | none |
| PNG + SVG | โ | โ | โ (+ GIF/JPEG/EPS) |
| Styling (logo, dot shapes) | โ (colors only) | โ | โ |
| Deterministic bytes | โ | not guaranteed | not guaranteed |
Being upfront: QuickChart documents the vCard format itself, supports logo embedding and styled dots we don't, and their Google Sheets add-on is genuinely handy for one-off batches โ if you want a branded code, use it. goqr.me has run a reliable free QR endpoint for over a decade and can also decode codes. Mockbird's angle is the API case: fields in, image out, escaping handled, deterministic output โ and the endpoint lives next to a full mock REST API, Wi-Fi QR codes, placeholder images, avatars, OG cards and charts under one project URL.
name โค64, phone โค32, email โค64, org โค64, title โค64, url โค200, address โค128 chars โ a full card still encodes comfortably at ?ecc=H.?format=svg beyond that.demo project and work forever. Want your own namespace (and a full mock REST API + image endpoints alongside it)? One click creates a project โ no signup.Full reference in the docs. More image guides: QR code API ยท Wi-Fi QR code API ยท placeholder image API ยท OG image API ยท chart image API ยท avatar API ยท identicon API. Create your API โ