Mailto Link Generator
Free mailto link generator. Add a subject, body, CC and BCC, then copy the mailto link, the HTML code, or a Gmail and Outlook compose link.
Free, no sign-up, runs in your browser. Updated
Separate several addresses with commas.
The words people click, used in the HTML code.
Mailto link
mailto:hello@example.com?subject=Question%20from%20your%20websiteHTML code
<a href="mailto:hello@example.com?subject=Question%20from%20your%20website">Email us</a>Gmail link
https://mail.google.com/mail/?view=cm&fs=1&to=hello@example.com&su=Question%20from%20your%20websiteOpens a new message in Gmail in the browser, with every field filled in.
Outlook.com link
https://outlook.live.com/mail/0/deeplink/compose?to=hello@example.com&subject=Question%20from%20your%20websiteOutlook on the web fills in To, subject and body. CC and BCC are left out because it doesn't reliably read them.
Outlook link for work or school accounts
https://outlook.office.com/mail/deeplink/compose?to=hello@example.com&subject=Question%20from%20your%20websiteHow a mailto link works
A mailto link is a normal link whose address starts with mailto: instead of https://. Clicking it opens a new message in the visitor's default email app, with the address, subject and body you set already filled in.
mailto:hello@example.com?subject=Hello&cc=sales@example.com&bcc=archive@example.com&body=Hi%20there| Part | What it sets | Example |
|---|---|---|
| Address | To, one or more addresses | mailto:hello@example.com |
| subject | Subject line | ?subject=Order%20question |
| cc | Copy to | &cc=sales@example.com |
| bcc | Blind copy to | &bcc=archive@example.com |
| body | Message text | &body=Hi%20there |
The first parameter after the address starts with ? and each one after it starts with &. Their order doesn't matter, and you can leave out any of them.
Encoding spaces, line breaks and symbols
Links can't contain spaces or some symbols, so the subject and body are percent-encoded. Letters, numbers and the @ in an address stay as they are. The generator encodes everything for you.
| Character | Write it as |
|---|---|
| Space | %20 |
| Line break | %0D%0A |
| & | %26 |
| ? | %3F |
| # | %23 |
An unencoded & or # cuts the subject or body short, because the email app reads it as the start of the next parameter or the end of the link.
Copy and paste examples
Email link with a subject
<a href="mailto:hello@example.com?subject=Website%20question">Email us</a>With a subject and a prefilled body
<a href="mailto:hello@example.com?subject=Booking%20request&body=Name%3A%0D%0ADate%3A%0D%0AGuests%3A">Request a booking</a>Inside an HTML attribute, write each & between parameters as &. Browsers usually forgive a bare &, but the escaped form is valid HTML and the HTML code above uses it.
To several people, with a copy
<a href="mailto:sales@example.com,support@example.com?cc=manager@example.com">Contact the team</a>Gmail and Outlook compose links
A mailto link only works when the visitor has an email app set up. Many people read email in Gmail or Outlook in a browser, and for them the click does nothing or asks them to set up an app. A compose link opens a new message in webmail directly, so you can show "Email us with Gmail" next to the mailto link.
https://mail.google.com/mail/?view=cm&fs=1&to=hello@example.com&su=Hello&body=Hi%20thereGmail reads to, cc, bcc, su for the subject and body. Outlook on the web reads to, subject and body. Use the outlook.live.com link for personal Outlook.com and Hotmail accounts and the outlook.office.com link for Microsoft 365 work or school accounts.
Mailto link or a contact form
A mailto link hands the message to the visitor's email app, so you never see the people who clicked and gave up. Your address also sits in the page source, where scrapers collect it for spam lists.
A contact form sends the message from the page itself. It works for every visitor, keeps your address out of the page, and can filter spam before it reaches you. Nisuform gives any HTML form an endpoint that emails you each submission and saves it to an inbox. Start from the free contact form template, or read how to add a contact form to a static site without a backend.
Frequently asked questions
How do I add a subject to a mailto link?
Add ?subject= after the address, followed by the subject with spaces written as %20. For example, mailto:hello@example.com?subject=Question%20about%20pricing. The generator above encodes it for you.
How do I add a line break to the body of a mailto link?
Write each line break as %0D%0A. Type the body with normal line breaks in the generator and it encodes them. Most email apps also accept %0A on its own.
Can a mailto link send to more than one address?
Yes. Separate the addresses with commas, like mailto:sales@example.com,support@example.com. CC and BCC take comma-separated lists too.
Can a mailto link attach a file?
No. The mailto standard has no attachment parameter, so no email app will attach a file from a link. Ask people to attach it themselves, or use a form with a file upload field.
Why does my mailto link do nothing when I click it?
A mailto link opens the default email app on the device. If none is set up, which is common for people who only use Gmail or Outlook in a browser, the click does nothing or shows an error. Offer a Gmail or Outlook compose link next to it, or a contact form.
Do mailto links attract spam?
They can. The address sits in the page source, where scrapers collect it for spam lists. A contact form keeps the address out of the page and filters the spam before it reaches you.
Is this mailto link generator free?
Yes. It runs in your browser, nothing you type is sent to a server, and there is no sign-up.