What is Mailto Link?

A mailto link is an HTML hyperlink that opens the user's email client with a message pre-addressed and optionally pre-filled.

A mailto link is a special type of hyperlink that, when clicked, opens the visitor's default email application with a new message already addressed to a specified recipient. Instead of pointing to a web page, its href uses the mailto: scheme followed by an email address, turning a simple link into a one-click way to start an email.

Beyond the recipient, mailto links can pre-fill many fields through URL parameters. You can set a subject, body text, and cc or bcc recipients by appending them as query parameters, letting you hand visitors a ready-to-send message that only needs their personal touch - useful for support requests, feedback, or structured inquiries.

Values in these parameters must be URL-encoded, because subjects and bodies often contain spaces, line breaks, and punctuation that would otherwise break the link. Spaces become %20, line breaks become %0A, and so on. Getting this encoding right is what separates a working pre-filled link from a broken one.

Mailto links are convenient but come with a caveat: because the address is written in plain text in the page source, scrapers harvest it easily, which can attract spam. They also depend on the visitor having a configured email client. Despite these limits, they remain a clean, dependable way to invite direct contact.

Examples

  • <a href="mailto:hello@example.com">Email us</a> - a basic contact link
  • mailto:sales@example.com?subject=Demo%20request&body=Hi%20there - pre-filled subject and body
  • mailto:support@example.com?cc=manager@example.com - a link that adds a cc recipient

Common questions

How do I pre-fill a subject in a mailto link?
Append ?subject= followed by URL-encoded text, for example mailto:hi@example.com?subject=Hello%20there. Add more fields with &body=, &cc=, and &bcc=. Our Mailto Link Generator builds these for you.
Why must mailto parameters be encoded?
Subjects and bodies contain spaces, line breaks, and symbols that are invalid in URLs. Encoding them - spaces as %20, line breaks as %0A - ensures the link opens correctly with all fields intact.
Do mailto links attract spam?
They can, because the address sits in plain text in the page source where scrapers find it. Some sites obfuscate addresses or use contact forms to reduce harvesting, at the cost of the one-click convenience.

Related tools

Related terms for Mailto Link