Mailto Links Explained: Subject, CC, Body and Copy-Paste Examples
A mailto link opens a ready-to-send email. Here's the exact format, the characters you must encode, and copy-paste examples.
In this article
- The parts of a mailto link
- Characters you must encode
- Copy-paste examples
- As a link on a web page
- In an email signature, a PDF or a QR code
- More templates you can adapt
- Building mailto links in code
- Mailto inside emails and newsletters
- Common mistakes
- Make it clear and accessible
- Other languages, emoji and special characters
- What you can't put in a mailto link
- Test it on four setups
- Mailto link or contact form?
- Mailto buttons in website builders and bio pages
- QR codes that open an email
- What mailto links can't do
- How to count interest in your email link
The short answer: a mailto link opens the visitor's email app with a new message already addressed. The basic form
is mailto:hello@yourbrand.com. Add a subject, CC or message after a question mark, joined with &, and encode spaces
as %20:
mailto:hello@yourbrand.com?subject=Order%20question&body=Hi%2C%20my%20order%20number%20is%20
If you'd rather not encode anything by hand, our free mailto link generator builds the link, the HTML and a QR code for you.
The parts of a mailto link
| Part | Example | What it does |
|---|---|---|
| Address | mailto:hello@yourbrand.com | Who the email goes to |
| subject | ?subject=Order%20question | Fills in the subject line |
| cc | &cc=sales@yourbrand.com | Adds a CC address |
| bcc | &bcc=archive@yourbrand.com | Adds a BCC address |
| body | &body=Hi%20there | Fills in the message |
The first extra goes after a ?, every one after that after an &. The order doesn't matter.
Several recipients: separate addresses with a comma: mailto:anna@yourbrand.com,ben@yourbrand.com.
Characters you must encode
Mailto links are URLs, so spaces and some punctuation must be written as codes:
| Character | Write it as |
|---|---|
| Space | %20 |
| New line | %0D%0A |
| & | %26 |
| ? | %3F |
| # | %23 |
| , in the message | %2C |
Forgetting to encode & is the most common bug: "Fish & chips" in a subject ends the subject at "Fish ". Write
Fish%20%26%20chips.
Copy-paste examples
A support email with a subject:
mailto:support@yourbrand.com?subject=Help%20with%20my%20order
A pre-written message on two lines:
mailto:hello@yourbrand.com?subject=Workshop%20booking&body=Hi%2C%0D%0AI'd%20like%20to%20book%20a%20place.
A sales enquiry with CC:
mailto:sales@yourbrand.com?cc=team@yourbrand.com&subject=Quote%20request
As a link on a web page
In HTML, put the mailto link in an ordinary link:
<a href="mailto:hello@yourbrand.com?subject=Hello">Email us</a>
Use words that say what happens, such as "Email our team", so people aren't surprised when their mail app opens.
In an email signature, a PDF or a QR code
- Email signature: most email apps let you add a link to signature text; paste the mailto link as the address.
- PDF: link text in Word or Google Docs to a mailto link before exporting, and it stays clickable in the PDF.
- QR code: a QR code can hold a mailto link. Scanning it opens a new email on the phone. Keep the message short so the code stays easy to scan; our QR code guide covers sizes and testing.
More templates you can adapt
Event RSVP:
mailto:events@yourbrand.com?subject=RSVP%3A%20Spring%20workshop&body=Name%3A%20%0D%0ANumber%20of%20guests%3A%20
Job application:
mailto:jobs@yourbrand.com?subject=Application%3A%20Designer&body=Hi%2C%0D%0AMy%20portfolio%3A%20
Bug report with prompts:
mailto:support@yourbrand.com?subject=Bug%20report&body=What%20happened%3A%20%0D%0AWhat%20I%20expected%3A%20%0D%0ADevice%3A%20
Quote request with your team copied:
mailto:sales@yourbrand.com?cc=team@yourbrand.com&subject=Quote%20request&body=Company%3A%20%0D%0AWhat%20we%20need%3A%20
Prompts in the body ("Name:", "Device:") make replies more complete, because people fill in the blanks instead of starting from nothing. Keep each template to one purpose, so the subject line alone tells you what the email is about.
Building mailto links in code
Encode the subject and body separately, then join them:
const to = "hello@yourbrand.com";
const subject = "Order question";
const body = "Hi,
My order number is ";
const href = `mailto:${to}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`;
encodeURIComponent turns a new line into %0A rather than %0D%0A. Most email apps accept either; if one shows the message on a single line, replace %0A with %0D%0A.
In Python, urllib.parse.quote does the same job. Don't encode the email address itself, and don't encode the ? and & that separate the parts.
Mailto inside emails and newsletters
A mailto link inside an email is a quick way to collect replies with a fixed subject, which makes them easy to filter: "Reply YES" buttons for event confirmations, "Request the slides" for webinar follow-ups, or a "Send us your feedback" link with prompts in the body.
Email providers use mailto behind the scenes too. Many newsletters include an unsubscribe address in a mailto link in the message's technical headers, so the inbox can show its own unsubscribe button.
Common mistakes
- Using + for spaces. In web forms a plus can mean a space, but in a mailto link most email apps show it as a plus sign. Use %20.
- Two question marks. Only the first extra starts with ?; every one after it starts with &. A second ? ends up inside the subject or body.
- An unencoded & in the text. "Q&A" splits your subject in two. Write Q%26A.
- A typo in the address. The link works, the email bounces, and you never find out. Copy the address from a sent email instead of typing it.
- Spaces around commas between recipients. Write
anna@yourbrand.com,ben@yourbrand.comwithout spaces, or encode them. - Relying on it for something important. For orders, complaints or anything you must not miss, a form that saves each message is safer than an email app that may not be set up.
Make it clear and accessible
People should know an email app will open before they click. Write link text such as "Email our support team" or "hello@yourbrand.com" rather than "Contact", and consider an email icon next to it. Screen readers announce links by their text, so a descriptive label helps there too. Showing the address as text also helps people who want to copy it into a different account than their default one.
Other languages, emoji and special characters
Mailto links carry text as UTF-8 with percent codes, so accented letters and emoji work in most email apps once they're
encoded. "Caf茅" in a subject becomes Caf%C3%A9, and a 馃憢 becomes %F0%9F%91%8B. Our
mailto link generator encodes them for you; if you build links in code, use your
language's URL-encoding function (encodeURIComponent in JavaScript) on the subject and body separately.
The body is always plain text. Bold, links or HTML in the body appear as raw characters, not formatting.
What you can't put in a mailto link
- Attachments. The mailto standard has no way to attach a file. Link to the file in the body instead.
- A sender address. The email is sent from whatever account the person uses.
- Formatting. Only plain text and line breaks.
- Guaranteed delivery. The person still has to press Send, and can edit or delete your text first.
Test it on four setups
A mailto link that works on your laptop can fail elsewhere. Before you publish, click it on:
- A computer with a mail app (Apple Mail or Outlook): the new message should open with every field filled in.
- A computer that uses webmail in the browser: check whether the browser offers Gmail or Outlook on the web, or does nothing.
- An iPhone: it opens Mail or the person's chosen email app.
- An Android phone: it opens Gmail or the default email app.
Check the subject and body for stray %20 codes or cut-off text. Those usually mean a character wasn't encoded.
Mailto link or contact form?
| Mailto link | Contact form | |
|---|---|---|
| Setup | One line, nothing to host | Needs a form tool or code |
| Works without an email app | No | Yes |
| Hides your address from spam bots | No | Yes |
| You can count submissions | No | Yes |
| The sender keeps a copy in their sent folder | Yes | Usually not |
| Feels personal | Yes | Less so |
Many sites use both: a form for most visitors and a visible email address with a mailto link for people who prefer their own inbox.
Mailto buttons in website builders and bio pages
Most website builders accept a mailto link anywhere they accept a web address: paste mailto:hello@yourbrand.com
into the button's link field. Link-in-bio pages usually have an email option too. On a
MiniSnip link-in-bio page, add your address under the email icon in your profile's social
links, and it opens a new email when tapped.
QR codes that open an email
A QR code with a mailto link opens a new email on most phones. Some older QR tools use a different email format (MATMSG) that holds the address, subject and body; modern phone cameras read both. Either way, keep the subject and message short: every extra character makes the code denser and harder to scan from a distance.
What mailto links can't do
- They need an email app. On a computer without a mail app set up, clicking may do nothing or open an app the person doesn't use. Browsers let people choose Gmail or Outlook on the web for email links in their settings, but many never do. Show the address as text too.
- Long messages get cut. Some apps truncate very long mailto links. Keep the body to a sentence or two.
- Addresses on public pages attract spam. Bots collect email addresses from web pages. A contact form, or a dedicated address you can filter, keeps your main inbox cleaner.
- They can't be tracked. A mailto link never touches the web, so no tool can count who clicked it.
How to count interest in your email link
Because a mailto link can't be counted, point people to a short link instead: send them to a contact page with your email button on it, using a link like minisnip.com/contact. MiniSnip accepts web addresses (http and https) as destinations, counts each visit with bots and link previews left out, and shows where people came from. The visits to that page tell you how many people meant to get in touch.
Frequently asked questions
How do I add a subject to a mailto link?
Add ?subject= after the address and encode spaces as %20, for example mailto:hello@yourbrand.com?subject=Order%20question.
How do I add a line break in a mailto body?
Use %0D%0A for each new line, for example body=Hi%2C%0D%0AThanks%20for%20your%20help.
Can a mailto link have more than one recipient?
Yes. Separate the addresses with a comma, and use cc= and bcc= for copies, for example mailto:anna@yourbrand.com,ben@yourbrand.com?cc=team@yourbrand.com.
Should I use %20 or + for spaces in a mailto link?
Use %20. Many email apps show a + as a plus sign rather than a space, so subjects and messages look wrong.
How do I open a mailto link in Gmail instead of a desktop app?
In your browser's settings you can let Gmail handle email links; Chrome, for example, offers this from the protocol handler permission for mail.google.com. After that, mailto links open a Gmail draft.
Can a mailto link include an attachment?
No. The mailto standard has no way to attach a file. Put a link to the file in the message body instead.
Why does my mailto link do nothing on some computers?
Mailto links open the computer's default email app. If none is set up, for example when someone only uses Gmail in a browser, nothing happens. Show your email address as text next to the link.
Can I track clicks on a mailto link?
Not directly, because a mailto link never loads a web page. Link to a contact page through a short link with analytics instead, and count those visits.