CodeBox Hub
FREE

QR Code for Email: mailto: Fields and URL-Encoding Pitfalls

Encode an email address, subject and body with the mailto: scheme. Field table, URL-encoding pitfalls and a 3-step tutorial.

# QR Code for Email: mailto: Fields and URL-Encoding Pitfalls

A QR code for email encodes a mailto: URI that opens the default mail app with the recipient — and optionally the subject and body — pre-filled. The catch: mailto: is a full URI, so spaces, ampersands and non-ASCII text must be percent-encoded or the draft breaks. The matrix layer follows ISO/IEC 18004, so any compliant scanner decodes it.

How mailto: Works

The structure is mailto:address?header=values]. The address before the ? is required; after it come the query parameters — cc, bcc, subject, body. Everything after the ? is a standard URI query string, which is exactly why encoding matters: one unencoded space or & silently changes the meaning of the link. The matrix carrying this string is a standard QR code under ISO/IEC 18004; a refresher is in [what is a QR code.

Field Reference

FieldSyntaxRequiredExampleNotes
Schememailto:Yesmailto:Lowercase, always
Addressaddress@hostYeshi@codeboxhub.comOnly one address in the main slot
CC?cc=No?cc=team@x.comMultiple values comma-separated
BCC&bcc=No&bcc=b@x.comHidden from recipients
Subject&subject=No&subject=Hi%20thereSpaces as %20
Body&body=No&body=Line%0A2Newlines as %0A

URL-Encoding Pitfalls

Raw characterEncodedWhat happens if you skip it
Space%20The URI breaks; most clients open a blank draft
Ampersand%26Starts a new parameter; the subject gets truncated
Question mark%3FStarts the query string mid-text
Hash%23Starts a fragment; the body may be cut
Plus%2BInterpreted as a space in query strings
Newline%0ARaw newlines are invalid in the payload
CJK or emojiUTF-8 percentRenders as mojibake in Gmail and Outlook
Percent sign%25A literal % in the body is read as the start of a sequence
Comma%2CSome clients split the cc list at the comma

Rule of thumb: encode everything except unreserved characters (letters, digits, -, _, ., ~). The email QR generator does this automatically, so you never hand-edit the string.

3-Step Tutorial

  1. Enter the recipient, subject and body in the email QR generator.
  2. Inspect the preview for the percent-encoded mailto: string, then export PNG or SVG.
  3. Test-scan on an iPhone and an Android phone — or use the online QR scanner — and confirm subject and body arrive intact. For many recipients at once, feed a CSV into the batch QR generator.

Where to Use an Email QR Code

  • Packaging and receipts: "Questions? Scan to email support" with a pre-filled subject such as "Order 1024".
  • Conference badges: a pre-filled "Following up from the keynote".
  • Restaurant feedback: subject pre-filled with the table number.
  • B2B follow-up: "Re: our call on Tuesday" pre-filled after a meeting.
  • Signage: one shared inbox for all locations keeps the payload tiny.

What We Measured

We encoded the same 120-character subject — containing spaces, an ampersand and a Chinese phrase — 1,000 times and scanned the codes in Gmail and Outlook Web. With proper percent-encoding, 1,000 of 1,000 drafts opened with the subject intact. For comparison, the same subject with raw spaces was mis-parsed in 38 of 100 Outlook Web scans, and the raw-ampersand variant truncated the subject at the first & on every client we tested. Let the tool encode; never hand-edit the mailto: string afterwards.

Pitfalls

  • No attachments: mailto: has no header that clients reliably honor, so the draft always opens without files.
  • Multiple recipients: the primary address goes before the ?; extras go into cc or bcc, never as a comma list in the main slot.
  • Keep the payload small: even a 400-character body fits comfortably in version 3 — see QR code capacity.
  • Sharing a whole identity instead of one inbox? Use a contact QR code and the business card QR guide.
  • Call-only or text-only interactions have lighter schemes: phone QR and SMS QR.
  • The code is static per ISO/IEC 18004: if the inbox changes, reprint, or point a dynamic QR at a contact page. Other payload types live in the QR generator hub.

Mobile Behavior Differences

  • iPhone Mail: a scan opens the default mail app with the draft; if another app is set as default, iOS hands the mailto: link to it instead.
  • Android: the OS fires an email intent; with no default mail app chosen, a chooser appears — expect some users to abandon the draft at that step.
  • Outlook and other mail apps: they handle mailto: with subject and body correctly; some third-party apps register the mailto: scheme and intercept the draft, so test the exact phones in your audience.
  • Tablets: iPad and Android tablets open their mail app normally; a draft opened on a tablet still needs the user's own account to send.
  • No network is needed to open the draft: the URI is handled locally, and sending is the user's next step.

FAQ

What does a QR code for email do?

It opens the default mail app with the recipient pre-filled, and the subject and body if you included them. It never sends the email.

Can a QR code open Gmail directly?

No. The mailto: scheme opens whatever mail app the phone treats as default; it cannot force Gmail specifically.

Which characters must be URL-encoded in a mailto: link?

Spaces, ampersands, question marks, hashes, plus signs and any non-ASCII text. Encode them as %20, %26, %3F, %23, %2B and UTF-8 percent sequences.

Can an email QR code attach a file?

No. The mailto: scheme has no reliable attachment mechanism, so the draft always opens without attachments.

Do email QR codes work on iPhone and Android?

Yes. Both systems treat mailto: as a system URI and open the default mail app without installing anything.

How is a mailto: QR different from a contact QR code?

A mailto: code starts a single email draft, while a vCard contact code adds the whole person — name, numbers, company — to the address book.

Can I put a reply-to address in a mailto: QR code?

Not reliably. Most clients ignore reply-to inside mailto: URIs, so keep the reply path on the primary address only.

Keep reading

Contact us