# QR Code Generator

A free QR code generator at https://linksense.net/tools/qr-code-generator. It encodes URLs, plain text,
WiFi credentials, email, phone numbers, SMS and vCard contact cards, with custom colours, quiet zone and
error correction, and downloads as PNG or SVG.

Everything runs in the browser. Nothing typed into the tool — WiFi passwords included — is sent to a
server, and there is no account, watermark, expiry or usage limit. Codes may be used commercially.

The codes it produces are **static**: the destination is encoded in the pattern itself and cannot be
changed after printing. See "Static vs dynamic" below.

## What each type encodes

| Type | Encoded payload |
|---|---|
| URL | The URL itself, e.g. `https://example.com/page` |
| Text | The text verbatim |
| WiFi | `WIFI:` credential string (ZXing/MECARD convention) |
| Email | `mailto:` URI with optional subject and body |
| Phone | `tel:` URI |
| SMS | `SMSTO:` string with optional message |
| vCard | A vCard 3.0 contact record |

## Payload formats

These are the exact strings the tool writes. Any QR library will produce the same code from them, so this
section is enough to generate these codes without using the tool.

### URL

The trimmed input. If it carries no scheme (no leading `scheme:` matching `^[a-z][a-z0-9+.-]*:`), `https://`
is prepended. Existing schemes are preserved, including `mailto:`, `tel:` and custom app schemes such as
`myapp://open`.

```
https://example.com/summer-sale
```

### Plain text

The trimmed input, unmodified. QR byte mode is 8-bit clean, so no escaping is applied.

### WiFi

```
WIFI:T:<WPA|WEP|nopass>;S:<ssid>;P:<password>;[H:true;];
```

- `T:` — `WPA` covers WPA, WPA2 and WPA3. `WEP` for legacy networks. `nopass` for open networks.
- `S:` — the network name (SSID).
- `P:` — the password. **Omitted entirely** when `T:nopass`.
- `H:true;` — present only for hidden networks. Omitted (not written as `H:false`) otherwise.
- The string ends with a double semicolon: the final field's `;` plus the record terminator `;`.

Inside `S:` and `P:`, these five characters are escaped with a leading backslash: `\` `;` `,` `:` `"`

An SSID of `My;Net,work"A:B\C` with password `p;w\d` on WPA becomes:

```
WIFI:T:WPA;S:My\;Net\,work\"A\:B\\C;P:p\;w\\d;;
```

### Email

```
mailto:<address>
mailto:<address>?subject=<subject>&body=<body>
```

`subject` and `body` are percent-encoded, and each is omitted when blank. With both blank the payload is a
bare `mailto:` with no query string.

### Phone

```
tel:<number>
```

Spaces, parentheses, hyphens and dots are stripped from the number; a leading `+` is kept. Include the
country code so the code dials correctly from any region.

### SMS

```
SMSTO:<number>
SMSTO:<number>:<message>
```

The number is cleaned as for `tel:`. The trailing colon is omitted when there is no message. `SMSTO:` is
used rather than RFC 5724 `sms:?body=` because every ZXing-derived scanner implements it, as do current
iOS and Android camera apps.

### vCard

vCard 3.0, **CRLF (`\r\n`) line endings**. Lines whose value is blank are omitted entirely.

```
BEGIN:VCARD
VERSION:3.0
N:<last>;<first>;;;
FN:<first> <last>
ORG:<company>
TITLE:<job title>
TEL;TYPE=CELL:<phone>
EMAIL;TYPE=INTERNET:<email>
URL:<website>
END:VCARD
```

Within a value, `\` `;` and `,` are escaped with a leading backslash and newlines become `\n` (backslash
followed by `n`). In the structured `N:` line each component is escaped individually and the `;`
separators between components stay unescaped. Colons are not escaped in vCard values.

No RFC 2426 line folding is applied. Scanners read unfolded vCards, and a contact card small enough to fit
in a QR code never approaches the 75-octet fold limit.

## Error correction levels

Higher levels survive more damage but pack in more modules, making the pattern denser.

| Level | Recovers | Use for |
|---|---|---|
| L | ~7% | Clean digital display only |
| M | ~15% | Default. Right for almost everything |
| Q | ~25% | Small print, busy backgrounds |
| H | ~30% | Fabric, curved surfaces, anywhere it may scuff or be partly covered |

A payload that is too long for the chosen level will fail to encode. Dropping to a lower level or
shortening the content resolves it.

## Colours and print

- Foreground and background are any hex colour; the background can be fully transparent, which is written
  as the 8-digit hex `#ffffff00` and produces a PNG with a real alpha channel.
- Contrast must stay strong and **not** be inverted — scanners expect a dark pattern on a lighter
  background. The tool warns inline when a colour pair falls below a 3:1 contrast ratio or is inverted.
- The quiet zone is the blank margin around the code, measured in modules. The default is 4; going below
  that risks scan failures.
- Download SVG for print (vector, sharp at any size) and PNG for screens.
- Size rule of thumb: at least 2 x 2 cm, and roughly one tenth of the intended scanning distance. A poster
  read from 3 m wants about 30 cm.

## Static vs dynamic QR codes

A **static** QR code — everything this tool produces — contains the destination itself. It works forever
and needs no account, but the destination cannot be changed once printed, and scans cannot be counted.

A **dynamic** QR code contains a short link that redirects. The printed pattern never changes while the
destination behind it does. Encoding a LinkSense link instead of a raw URL adds:

- Editing the destination at any time, without reprinting
- Click analytics — device, country and referrer
- Per-device routing: separate iOS, Android and desktop destinations
- Opening a mobile app when installed and the store listing when not
- Deferred deep linking, so the destination survives an app install (Pro)
- A custom domain on the link (Pro)

The first four are available on the free plan (1 project, up to 1,000 links). Sign-up:
https://linksense.net/register

## Frequently asked questions

### Is the generator free?
Yes — unlimited, watermark-free, no sign-up, and usable commercially.

### Do the codes expire?
No. A static code keeps working as long as its destination does. It cannot be switched off remotely.

### Can the destination be changed after printing?
Not for a static code. Encode a LinkSense link instead to get an editable destination.

### Is any data uploaded?
No. Codes are generated in the browser; nothing typed into the tool reaches a server.

## Links

- Tool: https://linksense.net/tools/qr-code-generator
- All free tools: https://linksense.net/tools
- Pricing: https://linksense.net/pricing
- Docs: https://linksense.net/docs
- REST API spec: https://linksense.net/openapi.json
