Autype can embed QR codes in your documents using the :::qrcode directive. QR codes are rendered as images in the exported document.
URL QR Code
:::qrcode{type="url" size=150 align=center}
https://example.com
:::
You can also use the url: prefix:
:::qrcode{type="url" size=200}
url: https://autype.io/docs
:::
Both formats are equivalent. If the content doesn’t start with url:, the entire first line is used as the URL.
WiFi QR Code
Generate a QR code that lets users connect to a WiFi network by scanning:
:::qrcode{type="wifi" size=200}
ssid: MyNetwork
password: secret123
encryption: WPA
:::
WiFi fields
| Field | Required | Values | Description |
|---|
ssid | Yes | String | Network name |
password | No | String | Network password |
encryption | No | WPA, WEP, nopass | Encryption type |
hidden | No | true, false | Whether the network is hidden |
Example: Guest WiFi
:::qrcode{type="wifi" size=150}
ssid: GuestWiFi
password: guest2024
encryption: WPA
hidden: false
:::
vCard QR Code
Generate a contact card QR code:
:::qrcode{type="vcard" size=180}
firstName: John
lastName: Doe
organization: Acme Corp
phone: +1-555-123-4567
email: [email protected]
url: https://johndoe.com
address: 123 Main St, City, Country
:::
vCard fields
| Field | Required | Description |
|---|
firstName | No | First name |
lastName | No | Last name |
name | No | Full name (auto-split into first/last) |
phone | No | Phone number |
email | No | Email address |
organization | No | Company / organization name |
url | No | Website URL |
address | No | Physical address |
note | No | Additional note |
The name field is a shortcut that splits on the first space into firstName and lastName. Use firstName and lastName separately for more control.
Minimal vCard
:::qrcode{type="vcard"}
firstName: Jane
lastName: Smith
email: [email protected]
phone: +49-123-456789
:::
Attribute reference
| Attribute | Values | Description |
|---|
type | url, wifi, vcard | QR code type (required) |
size | Number (pixels) | Size of the QR code image |
errorCorrection | L, M, Q, H | Error correction level |
align | left, center, right | Horizontal alignment |
Error correction levels
| Level | Recovery | Best for |
|---|
L (Low) | ~7% | Clean environments, maximum data capacity |
M (Medium) | ~15% | Default, good balance |
Q (Quartile) | ~25% | Moderate damage tolerance |
H (High) | ~30% | Printed materials that may get damaged |
If no size is specified, the QR code renders at a default size. For print documents, use size=200 or larger for reliable scanning.