Mailto link generator

How it worksA mailto link looks like mailto:you@example.com?subject=Hello&body=Hi%20there. Fill in the fields and the tool encodes spaces, line breaks and symbols correctly and writes the matching <a href> tag.
mailto URL
HTML code
Try it

Runs entirely in your browser — nothing you type here is uploaded.

The encoding rules that trip people up

  • Spaces must be %20, not + — many mail apps show a literal plus sign otherwise.
  • Line breaks in the body are %0D%0A.
  • An & or ? inside the subject must be encoded, or it ends the field early.
  • Several recipients are separated by commas, with no spaces.

The generator handles all four.

Limits of mailto

A mailto link opens the visitor's default mail app; on a computer with no mail app configured, nothing seems to happen. Keep the body short (very long mailto URLs are cut off by some clients) and show the plain address next to the link so people can copy it.

Questions

Can a mailto link add an attachment?
No. The mailto standard does not support attachments.
Does a mailto link expose my email to spammers?
Yes, the address is visible in the page source like any plain email address.
Can I prefill the sender?
No — the sender is always the visitor's own mail account.