Leadmetrics
Free tool, no sign-up

Mailto link generator

Build a mailto: link with recipients, subject and body, encoded the way mail clients expect.

Several addresses separated by commas.

Line breaks are preserved.

Test it

Fill the form to build a link.

mailto link

Before you ship this

  • Note: Add the address the email should go to.

How to use it

  1. Enter the recipient. Several addresses are separated by commas.
  2. Add cc, bcc, a subject and a body if you want them pre-filled.
  3. Copy the link into an href.
  4. Keep the body short — some clients truncate long ones.

Address in the path, everything else in the query

The recipient goes straight after mailto: with commas separating multiple addresses, and those commas and the @ must stay unencoded or the client cannot read them.

Subject, body, cc and bcc are query parameters and are encoded normally. That split is the whole of RFC 6068, and getting it backwards is why hand-written mailto links break.

Spaces encode as %20

A plus in a mailto query is shown literally by many clients, so a subject written with pluses arrives looking like "Enquiry+from+the+website".

This generator uses %20 throughout, which every client handles correctly.

What a mailto link cannot do

It cannot attach a file, cannot send anything by itself, and cannot guarantee the body survives — Outlook in particular truncates long ones.

It opens whatever mail client the visitor has configured, which on many desktops is nothing at all. Always show the address as readable text as well as linking it.

What mailto cannot do

It cannot attach a file, cannot send HTML, and cannot send anything without the person pressing send in their own client. Long bodies are also risky: older clients truncate around 2,000 characters, and the limit is the whole encoded URL, not just the body.

It also assumes a desktop mail client is configured. For anyone using webmail in a browser, the link may open nothing — which is the main argument for a contact form over a mailto link on a high-traffic page.

Mailto link generator FAQ

Can a mailto link have a subject and body?

Yes, as query parameters after the address. Both must be percent-encoded, and line breaks in the body become %0A. Most clients honour both; a few webmail handlers ignore the body.

Is a bcc in a mailto link actually hidden?

Only from other recipients. The address sits in the page source where anyone can read it, including scrapers. It hides nothing from the visitor.

Will a mailto link get my address spammed?

Yes, eventually. Address harvesters read page source. For a high-volume address, a contact form is the better answer; for a small business, the convenience usually outweighs the spam.

How do I put a line break in the body?

Encode it as %0A, which this generator does for you. Some older Windows clients prefer %0D%0A, the carriage-return pair, and most modern ones accept either. If the body arrives as one run-on paragraph in Outlook, that is the pair to try.

How long can a mailto link be?

There is no formal limit but there is a practical one around a couple of thousand characters, and individual clients truncate sooner. A pre-filled body of more than a short paragraph is a sign the job belongs to a form, where you control the fields and can validate them.

Can a mailto link attach a file?

No. There is no attachment parameter and there never will be — a web page that could silently attach a local file to an outgoing email would be a security hole. The same applies to setting the sender address.

What happens if the visitor has no mail client set up?

Nothing visible, which is the worst failure mode there is. On a desktop with no default handler the click does nothing at all. Print the address as readable text beside the link so there is always a way to copy it.

Can I open Gmail or Outlook on the web instead?

Yes, both have their own compose URLs taking the same parameters, and you can link to one directly. The cost is that you have assumed which provider the visitor uses, which for most audiences is a worse bet than the default handler they already chose.

Is it worth obfuscating the address to defeat scrapers?

The common tricks — JavaScript assembly, HTML entities, an image of the address — all trade accessibility or usability for a delay that modern harvesters do not notice for long. Either accept the spam and filter it, or use a form. Half-measures mostly inconvenience your customers.

Why does my subject line arrive mangled?

Almost always an encoding problem: a space, ampersand or accented character that was not percent-encoded. The ampersand is the usual culprit, because an unencoded one ends the subject and starts a new parameter, silently truncating the rest.