Free email toolsWrite
Mailto link generator
Fill in the fields, then copy the link or the HTML. Spaces, line breaks and ampersands are encoded the way the standard says, so the email opens as you wrote it.
A mailto link opens a new email in the reader’s mail app with the address, and anything else you put in the link, already filled in. This generator follows RFC 6068, the standard for mailto links, and decodes the link again under the tool so you can see what a mail app will read from it.
How a mailto link is written
The address comes right after mailto:. Everything else is a field: the first one after a ?, the rest after an &. Fields are named after mail headers, like subject, cc and bcc, plus body for the text.
| You want | The link |
|---|---|
| Just an address | mailto:[email protected] |
| Two people | mailto:[email protected],[email protected] |
| A subject | mailto:[email protected]?subject=Lunch%20on%20Friday |
| A copy to someone | mailto:[email protected][email protected]&body=hello |
| Two lines of text | mailto:[email protected]?body=send%20current-issue%0D%0Asend%20index |
| An accent | mailto:[email protected]?subject=caf%C3%A9 |
The last three come straight from the RFC’s own examples. The rules behind them:
- A space is
%20. HTML forms write spaces as+, and the RFC warns against it, because a mail app can’t tell that plus from a real one. That’s also why this tool writes a plus in an address (bill+ietf@) as%2B, which the RFC allows. - A line break in the body “MUST be encoded with %0D%0A.” Some generators write
%0Aalone; the RFC asks for both characters. ?,=,&and#inside a subject or body become%3F,%3D,%26and%23. Otherwise “Q&A” ends the subject at the Q.- Accented and non-Latin letters go as UTF-8 bytes in percent form, like
caf%C3%A9. - Only one
?. The RFC printsmailto:[email protected][email protected]?body=helloand marks it “WRONG!” - Inside HTML, every
&in the link is written&, as in<a href="mailto:[email protected][email protected]&body=hello">. Browsers turn it back into&.
Open “What a mail app reads back from it” under the tool to see the link decoded again, field by field. If it says what you typed, the link is right.
What happens when someone clicks it on a Mac
macOS opens the Mac’s default email app with a new message. Out of the box that’s Apple Mail. Apple’s steps to change it:
- Install the mail app you want to use.
- Open Mail and make sure it has an email account set up. Apple says you can remove it again after the remaining steps.
- Choose Mail › Settings, click General, and pick the app from the Default email reader menu. If it isn’t in the menu, choose Select and find it.
Apple adds that if you’d rather not set up an account in Mail just for this, the other app may have its own setting to make itself the default. Roost does (below).
In a browser, a web mail service can ask to open mailto links for you: the web standard for that is registerProtocolHandler(), and MDN lists mailto among the schemes a site may ask for. MDN also marks the feature as limited availability, since it doesn’t work in some widely used browsers. I couldn’t find a page in Google’s Gmail help on making Gmail handle mail links (I looked on 19 November 2026), so I won’t give steps that may have moved.
What a mailto link can’t do
It can’t attach a file. There is no attachment field, and the RFC describes body as the first plain-text part of the message, not meant “for general MIME bodies.” Put a link to the file in the body instead. The body is plain text as well, so bold and pictures are out.
It can’t choose who sends. The RFC says a From field in the link “MUST be ignored,” so the reader’s own mail app picks the address. Nor can it fill in anything about the reader, since a mailto link has no variables.
And it can’t be sure of anything beyond the subject and body. In the RFC’s words, “the creator of a ‘mailto’ URI cannot expect the resolver of a URI to understand more than the ‘subject’ header field and ‘body’.” Cc and Bcc are worth using, but test them in the apps your readers have.
Mailto links in Roost
I make Roost, a Mac mail app that keeps several inboxes in one window, and it can be the app that opens these links. In Roost, open Settings, and next to Default mail app click Make Roost the Default. macOS asks you to confirm. From then on a mail link in Safari or any other app opens a new message in Roost.
Roost reads to, cc, bcc, subject and body, and ignores any other field. A + stays a plus. The body goes in above your signature as plain words, so Roost won’t turn someone’s *stars* into bold. With several inboxes, the message goes from the inbox you last wrote to that person from; for someone new, from the inbox you’re looking at or the one set under Send new mail from.
Questions
Can a mailto link attach a file?
No. RFC 6068 has no attachment field, and the body is plain text. Put a link to the file in the body instead.
How do I add a line break to a mailto body?
Write it as %0D%0A. RFC 6068 says line breaks in the body must be encoded that way. Type the lines in the Body box above and the tool does it.
Why do the spaces in my subject show up as plus signs?
The link was made with + for spaces, the way HTML forms encode them. In a mailto link a space should be %20; RFC 6068 says a mail app can’t tell a plus that means a space from a real plus.
Can I set the From address in a mailto link?
No. RFC 6068 says mail apps must ignore a From field in the link. The person clicking sends from their own address.
Will a mailto link open Gmail?
It opens whatever handles mail links on that computer: the default email app on a Mac, or a web mail service the browser was allowed to hand mail links to. The link itself is the same either way.
How long can a mailto link be?
RFC 6068 sets no limit. It describes the body field as meant mainly for short messages, so keep long text out of links and put a short opening line in instead.
Sources
- RFC 6068, “The ‘mailto’ URI Scheme,” sections 2 to 6, rfc-editor.org/rfc/rfc6068, read 19 November 2026.
- Apple, “Change the default web browser or email app on Mac,” support.apple.com/en-us/102362, read 19 November 2026.
- Apple, “Change General settings in Mail on Mac” (Default email reader), support.apple.com/guide/mail/cpmlprefgen/mac, read 19 November 2026.
- MDN, “Navigator: registerProtocolHandler() method,” developer.mozilla.org, read 19 November 2026.