Skip to content
Toolspire

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.

Runs in this tabFreeNo account

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. 1

    Type the mailbox you want the link to open

    Use the full address. A name without a domain is refused.

  2. 2

    Put the subject in its own box

    Do not prepend “Subject:” inside the body. The subject parameter is separate.

  3. 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=Hello and body=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?

Mailto Link Generator runs in this tab on Toolspire. What you type or drop in is not sent to us and is not stored on a server.

Does this send the email?

No. It writes the href. The visitor’s mail program sends, if they choose to.

How are spaces encoded?

As plus signs, which is the form URLSearchParams uses. Mail clients accept that in a mailto query.

What if the subject is empty?

The subject parameter is left off. The same is true of an empty body.

Why was my address rejected?

It needs a local part, an @, and a domain with a dot, and no spaces. “hello@example.com” passes. “hello” does not.

Keep going

Open the full directory

Last updated Report a problem or suggest a feature