Create mailto links that work in every mail app
A mailto: link opens the user's default e-mail program with a new message. Adding a subject and a pre-written body helps visitors write to you and helps you sort incoming mail. The catch is encoding: spaces, line breaks, ampersands and question marks must be percent-encoded or the message arrives truncated. This mailto link generator handles that and outputs both the raw link and an HTML anchor.
Example
mailto:hello@example.com?subject=Question%20about%20your%20product&body=Hi%2C%0D%0A%0D%0AI%20would%20like%20to%20know%20more
<a href="mailto:hello@example.com?subject=…">Email us</a>
Fields in the mailto link generator
- To: one or more addresses separated by commas.
- CC / BCC: added as
cc=andbcc=parameters. - Subject and Body: encoded with
encodeURIComponent; line breaks become%0D%0A, as RFC 6068 recommends. - Link text: the visible text of the generated <a> tag.
Every address is validated, so a typo such as a missing @ is reported before you publish the link.
Things to keep in mind
Mailto links depend on a configured mail client. On computers without one — common with webmail users — clicking does nothing useful, so also show the address as text or offer a contact form. Very long bodies may be cut off by some clients; keep the pre-filled text to a few lines. Addresses published in plain HTML can be harvested by spam bots, so consider a dedicated contact address.
Common mailto mistakes
- Plus signs for spaces. Mailto URLs use percent-encoding, not form encoding, so
subject=Hello+thereshows a literal plus in many mail apps. Spaces must be%20, which the generator writes for you. - Unencoded ampersands. An
&typed into the body by hand ends the body parameter and starts a new one, cutting the message short. - Semicolons between addresses. Outlook accepts them, but the standard separator is a comma; other clients may ignore everything after a semicolon.
- Exposing the address to bots. Addresses in
mailto:links are easy for spam harvesters to collect. For high-traffic pages, consider a contact form or a dedicated address with good spam filtering.
Related tools
Put the link in a QR code for printed material with the QR code generator (choose E-mail), or offer a chat alternative with the WhatsApp link generator. To encode other text for URLs, use URL encode.
Using the HTML
The second part of the output is a complete anchor tag, for example <a href="mailto:hello@example.com?subject=…">Email us</a>. Paste it into your HTML, a CMS HTML block or an e-mail signature editor. You can style it like any other link or button. If you use the link in Markdown, copy only the first line — the raw mailto: URL — and place it in [Email us](mailto:…). Pre-filled subjects such as "Support request – order number:" make it easier to route and answer incoming messages, and a short body template reminds people which details to include.
Privacy
The tool runs entirely in your browser. Nothing you type or paste is sent to our servers.