mailto, sms and tel links

Also called: mailto URI, tel URI, sms URI, SMSTO, email QR code, phone QR code

Definition

mailto, sms and tel links are standard URI schemes that open a new email, a text message or a phone call. In a QR code they fill in the details, but the person still taps send or call.

The three schemes

Each scheme is a short piece of text a phone knows how to hand to the right app. mailto: opens the email app, tel: opens the dialer and sms: opens the messaging app, with the recipient and sometimes the message already filled in.

Phone numbers work best in international format with a plus sign and country code, such as +15035550123, so the code works for visitors from other countries.

  • mailto:hello@example.com?subject=Order%20question&body=Hi (RFC 6068)
  • tel:+15035550123 (RFC 3966)
  • sms:+15035550123?body=Hello (RFC 5724)
  • SMSTO:+15035550123:Hello (older convention, still widely read)
  • MATMSG:TO:hello@example.com;SUB:Hi;BODY:Hello;; (older email convention)

Encoding the message text

Subjects and message bodies in mailto and sms links must be percent-encoded, so a space becomes %20 and an ampersand inside the text becomes %26. Unencoded characters can cut the message short or break the link.

Platforms have not always parsed the sms body parameter identically, which is one reason the older SMSTO: form is still common in QR generators. Testing on both iPhone and Android before printing is the reliable check.

What these codes cannot do

A QR code cannot send an email, send a text or place a call on its own. It only opens the app with the fields filled in, and the person scanning decides whether to press send or call.

Because the recipient is visible before sending, people should check it matches what they expect. A code that prefills a message to a premium-rate number or an unfamiliar address is a warning sign.

Frequently asked questions

Can a QR code send a text message automatically?

No. An sms or SMSTO code opens the messaging app with the number and text filled in, and the person still has to press send.

How do I make a QR code that calls a phone number?

Encode tel: followed by the number in international format, such as tel:+15035550123. Scanning it opens the dialer with the number ready.

How do I add a subject line to an email QR code?

Use mailto:address?subject=Your%20subject&body=Your%20text, with spaces and special characters percent-encoded.

What is the difference between sms: and SMSTO:?

sms: is the standard URI scheme from RFC 5724, while SMSTO: is an older convention from early QR reader apps. Most phones read both.

Sources and standards

All terms