Sponsored placement
What Is a Mailto Link and Where Is It Used
A mailto link is a hyperlink that opens the default email client on the device and pre-fills the compose window with a recipient address, subject line, body text, CC, and BCC. The format is mailto:email@example.com?subject=Hello&body=Message%20here.
Mailto links are used in website contact sections, HTML email templates, documentation, and support pages. They give users a one-click way to start writing an email without copying an address and switching to their email app manually.
For business websites, a mailto link on a contact button is the simplest possible contact mechanism. For technical documentation, mailto links are useful for feedback buttons and bug report templates that pre-fill the subject with the relevant page or feature name.
- Contact buttons on websites: mailto:support@example.com?subject=Support%20Request
- Email signatures: link your address to open a pre-addressed compose window
- Documentation feedback buttons with pre-filled subject lines
- Bug report links that pre-fill the template in the body field
How to Use a Mailto Link in HTML
Once you have generated your mailto link, wrap it in an anchor tag to create a clickable button or text link on your website. The tool shows the ready-to-use HTML below the generated link. Copy it directly into your webpage.
You can style the anchor tag with CSS classes or inline styles to make it look like a button. The link itself works in all browsers and opens the default mail application on the device - whether that is Outlook, Apple Mail, Gmail in the browser, or any other email client configured on the system.
Keep mailto link bodies reasonably short. Very long pre-filled bodies (over 1000 characters) may not work in all email clients because some browsers and clients have URL length limits. If you need a long template, consider a contact form instead.
The HTML for a mailto button looks like this: wrap the link in an anchor tag with href set to your mailto URL. The tool generates the ready-to-use HTML anchor code below the link so you can copy and paste it directly into your page.
- Basic: <a href="mailto:you@example.com">Email us</a>
- With subject: <a href="mailto:you@example.com?subject=Hello">Email us</a>
- Full example: <a href="mailto:support@example.com?subject=Support&body=Hi">Contact support</a>
- Style as a button by adding CSS classes or inline styles to the anchor tag
Why marketers use this tool
- Generate a mailto: link with subject, body, CC, and BCC pre-filled
- Copy the ready-to-use HTML anchor tag for website buttons
- Test the link directly in your email client before using it
- Works in website contact buttons, email signatures, and documentation
- Character count warning for links that may exceed email client limits
- No login required - runs entirely in your browser
Frequently Asked Questions
What is a mailto link?
A mailto link is a URL that starts with mailto: and opens the default email application on the device when clicked. It can pre-fill the recipient address, subject line, body text, CC, and BCC. Example: mailto:hello@example.com?subject=Hello&body=Hi%20there.
Does a mailto link work in all browsers?
Yes. All major browsers support mailto links. When clicked, the link opens whatever email application is set as the default on the device. If no email client is configured, the browser may do nothing or show an error.
Why is my mailto link not working?
The most common cause is no default email client being set on the device. On mobile, this is rare. On desktop, users who only use webmail like Gmail in the browser may not have a default mail app configured. Consider adding a fallback visible email address next to the mailto button.
Can I use a mailto link in an HTML email?
Yes, but be cautious. Mailto links in email newsletters open the email client to compose a new message to compose a new message. This is useful for reply-to links and feedback buttons. However, some email clients strip or disable mailto links for security reasons.
What is the maximum length for a mailto link?
There is no official limit, but most email clients and browsers handle up to 2000 characters reliably. Very long pre-filled bodies may be truncated or ignored. The tool shows a warning when the link exceeds 1000 characters.