Developer Tools
Mailto Link Generator
Mailto Link Generator is part of Toolspire and is ready as soon as this page loads. The href opens the visitor’s mail program. Spaces in the body are encoded. The page does not send the message.
On this page
What you can do here
Encoding included
You do not hand-escape the body. A question mark in the subject will not break the query.
Empty subject or body omitted
A blank box is left off the query so the href is not full of empty parameters.
No send button
The result is a link. Putting it on a page opens the visitor’s own mail app. This page does not transmit mail.
The sequence
How to use the Mailto Link Generator
- 1
Type the mailbox you want the link to open
Use the full address. A name without a domain is refused.
- 2
Put the subject in its own box
Do not prepend “Subject:” inside the body. The subject parameter is separate.
- 3
Copy the href into an anchor
The headline is the href value. Wrap it as <a href="..."> if you are writing HTML. The angle brackets are yours to add.
Worth knowing
- Mailto Link Generator on Toolspire: the link is
mailto:plus the address, then?subject=and&body=when those boxes are not empty. - Subject and body go through URLSearchParams, so a space becomes a plus and reserved characters are escaped.
- hello@example.com with subject Hello and body “Hi there” includes
subject=Helloandbody=Hi+there. - An address without @ or without a dot in the domain is rejected. The page still cannot know the mailbox exists.
What the visitor’s mail app receives
A mailto link does not send email by itself. The browser hands the address, subject and body to whatever program is registered for mailto. Encoding with URLSearchParams keeps an ampersand in the body from looking like a new parameter. The address check is only a shape check: one @, no spaces, and a dot after the @. It will accept a made-up domain. It will not accept two words.
FAQ
Questions about Mailto Link Generator
Where does Mailto Link Generator run?
Does this send the email?
How are spaces encoded?
What if the subject is empty?
Why was my address rejected?
Keep going
Related tools
Last updated Report a problem or suggest a feature