If you've ever clicked a "Contact Us" button on a website and your email app opened automatically with the recipient already filled in, you've experienced a mailto link. It's a small thing, but it removes a real friction point — the user doesn't have to copy an address, open their inbox, and paste it. They just click and type.
This guide covers everything: the basic mailto syntax, how to pre-fill subject lines and message bodies, what to do with special characters, and when a mailto link is the right choice versus a contact form.
What Exactly Is a Mailto Link?
A mailto link is an ordinary HTML anchor tag that uses the mailto: URI scheme instead of http://. When a browser encounters it, rather than loading a web page, it hands control to the operating system, which passes it to the user's default email client.
The simplest version looks like this:
<a href="mailto:hello@example.com">Send us an email</a>
That's it. One line. The user clicks, their email app opens, and hello@example.com is already in the To field. Nothing more required on your end.
Adding a Pre-Filled Subject Line
The subject parameter saves your recipients — and you — a lot of back-and-forth. If someone clicks "Request a Quote," you probably want the email to arrive with "Quote Request" in the subject, not a blank line or "no subject."
<a href="mailto:hello@example.com?subject=Quote%20Request">Request a Quote</a>
Notice the %20 replacing the space. URLs can't contain raw spaces, so you need to encode them. Our mailto generator handles this automatically — you type normally, and it produces the correctly encoded URL.
Pre-Filling the Email Body
You can go further and pre-fill the message body. This is particularly useful for support requests, where you might want to prompt the user to include their order number or account details:
<a href="mailto:support@example.com?subject=Support%20Request&body=Hello%2C%0A%0AOrder%20number%3A%20%0A%0AIssue%3A">Contact Support</a>
That looks messy written by hand. The encoded version of a simple template like "Hello, Order number: Issue:" ends up being a string of percent signs that's nearly impossible to write or read manually. This is exactly why a mailto generator exists — paste your template in plain English, get the encoded link out.
CC, BCC, and Multiple Recipients
The mailto scheme also supports CC and BCC fields, and you can add multiple addresses to any field by separating them with commas:
mailto:primary@example.com?cc=manager@example.com&bcc=archive@example.com&subject=Project%20Update
A few things to know: not all email clients handle BCC in mailto links consistently. Most do, but if you're relying on BCC for something critical, test it across the email apps your audience is likely to use (Gmail, Apple Mail, Outlook). CC is more universally reliable.
When to Use a Mailto Link vs. a Contact Form
Mailto links get a bad reputation in some circles, and that reputation isn't entirely unfair. Here's an honest breakdown:
Use a mailto link when: you want the simplest possible contact option, your audience is technical or professional (they definitely have a configured email client), you're building a lightweight static site with no backend, or you're adding a secondary contact method alongside a form.
Use a contact form when: you need to collect structured data (name, company, project type), you want to prevent your email address from being scraped by spam bots, or you need server-side validation and confirmation emails.
The spam-scraping concern is real. Email harvesters crawl the web looking for mailto: links. If you're adding an email address to a high-traffic public page, consider obfuscating it slightly — JavaScript-rendered links, for instance — or using a contact form with a CAPTCHA.
Special Characters and URL Encoding
If your subject or body contains any of the following characters, they need to be encoded: spaces become %20, line breaks become %0A, the @ sign becomes %40, commas become %2C, ampersands become %26.
You don't need to memorize these. Our generator handles encoding automatically. But it's useful to understand why the link looks the way it does if you ever need to debug a malformed mailto URL.
Practical Use Cases
Portfolio websites: A simple "Hire me" mailto link with your name and rate pre-filled in the subject does the job without the overhead of a full contact form system.
Email newsletters: "Forward to a colleague" buttons in HTML emails often use mailto links. The subject and body encourage the reader to share specific content.
Event invitations: RSVP links in email campaigns can use mailto to open a compose window addressed to the organizer, with the event name and the word "Attending" or "Declined" pre-filled.
Internal tools: Bug-report buttons in dashboards often use mailto with a pre-filled body template that includes placeholders for browser version, URL, and steps to reproduce.
How to Generate a Mailto Link Without Writing Code
If you'd rather not deal with URL encoding at all, our free mailto generator lets you fill in each field — To, CC, BCC, Subject, Body — as plain text, and outputs both the raw mailto URL and a ready-to-paste HTML snippet.
The process takes about thirty seconds: enter your email address, write a subject and optional body, and copy the result. No account, no signup, no expiry.
Create your mailto link now
Fill in your email, subject, and body. Get a ready-to-use link in seconds.
Open Mailto Generator