QR Code for an Email Address
A QR code for email opens a draft to the address, with the subject and body already filled in. mailto:ADDRESS?subject=SUBJECT&body=BODY, with the subject and body percent-encoded. The working example below is 38 bytes, which fits a version 3 code at level M.
QR code
- Version
- 3 (29 x 29 modules)
- Error correction
- M - Medium, recovers about 15%
- Payload
- 38 of about 42 bytes used
- Mask The lowest penalty of the eight mask patterns, which scored 695, 624, 636, 703, 612, 726, 753, 808.
- 4 of 0-7, penalty 612
How the QR Code Generator works
This generator encodes an email address payload. The grammar is: mailto:ADDRESS?subject=SUBJECT&body=BODY, with the subject and body percent-encoded.
The example above, mailto:hello@example.com?subject=Hello, is 38 bytes, which at error correction level M fits a version 3 symbol, 29 modules square. The encoder scored all eight mask patterns and chose 4, which is not a preference: the specification requires the lowest-penalty mask, so any correct encoder given this text produces this identical image.
A mailto: URI, which means the subject and body have to be percent-encoded like any query string: a space is %20, an ampersand in the body is %26, and a newline is %0A. Skipping that is the usual failure: an unencoded ampersand silently ends the subject and starts a parameter nobody wanted. Note what this does: it opens the user's mail client with a draft and sends nothing. On a device with no mail client configured it does nothing visible at all. For a printed poster the plain address is often better, because a scanner shows it as text that can be copied even when mailto: is not handled.
On the error correction level: M recovers about 15% of the symbol. That is the single most useful dial on a QR code and the one most often left alone. Raising it costs capacity, which pushes the version up, which makes each module smaller at the same printed size. So the right level is the lowest one that survives where the code will live. A code on a screen needs almost none; a code on a sticker on a machine needs a lot.
Nothing about this is sent anywhere. The code is built from the text in the field, in your browser, and the site has no server that could receive it. It also does not expire, because there is no redirect in it: what the camera reads is your payload, not a reference to a row in somebody's database. A QR code that goes through a shortener stops working the day the shortener does.
QR Code Generator FAQ
What is the exact format for an email address QR code?
mailto:ADDRESS?subject=SUBJECT&body=BODY, with the subject and body percent-encoded. The working example above is mailto:hello@example.com?subject=Hello.
What goes wrong with this format?
A mailto: URI, which means the subject and body have to be percent-encoded like any query string: a space is %20, an ampersand in the body is %26, and a newline is %0A. Skipping that is the usual failure: an unencoded ampersand silently ends the subject and starts a parameter nobody wanted. Note what this does: it opens the user's mail client with a draft and sends nothing. On a device with no mail client configured it does nothing visible at all. For a printed poster the plain address is often better, because a scanner shows it as text that can be copied even when mailto: is not handled.
How big does this code come out?
38 bytes at level M gives a version 3 symbol, 29 by 29 modules. Each version is four modules wider than the last (21, 25, 29 and so on), so adding a few characters can jump the whole symbol up a size. Print it at least 2 cm across, and keep the four-module quiet zone around it.
Does it expire, or track anyone?
Neither. The payload is encoded directly into the image, so there is no redirect to switch off and nothing to log. The encoding happens in your browser, on your own device.
More from the QR Code Generator
- URL QR Code Generator
- WiFi QR Code Generator
- QR Code for a Phone Number
- QR Code for Text
- vCard QR Code Generator