Skip to content

mailto Link Generator

Build a mailto link from an email address and an optional subject. user@example.com and Hello becomes mailto:user@example.com?subject=Hello. The page does not send the mail.

Result

Enter an email address

How to Use

  1. 1 Enter an email address.
  2. 2 Enter a subject, or leave it empty.
  3. 3 Copy the link. The page does not open a mail program.

Example Output

  • user@example.com and Hello is mailto:user@example.com?subject=Hello.

About This Tool

The subject is encoded for a URL. A blank subject leaves the subject parameter off the link.

Using the Mailto Link Generator

This page builds a mailto link from an email address and a subject you can leave blank. The sample address is user@example.com and the sample subject is Hello. Together they become mailto:user@example.com?subject=Hello. The headline is that full link, and the label above it reads Mailto link. The Email line repeats user@example.com. The Subject characters line reads 5, because Hello is five characters after the field is trimmed. Copy result copies the link. The waiting line, before a successful build, reads Enter an email address.

A blank subject is a finished link, not an error. Clear the subject and the headline is mailto:user@example.com. There is no question mark and no subject parameter. The Subject characters line reads 0. The page does not invent a subject when the field is empty. Hello is the sample that the form starts with. It is not a fallback that reappears after you delete it.

The subject is URL-encoded before it is placed after subject=. Hello needs no escape, so the characters stay Hello. A space does not stay a space in the link. The subject Hello there becomes Hello%20there, and the headline is mailto:user@example.com?subject=Hello%20there. The Subject characters line still counts the characters you typed, so Hello there is 11, not the length of the encoded text. An ampersand is encoded too. The subject a&b becomes a%26b, the link ends in subject=a%26b, and the character line reads 3.

The page does not send mail. It does not open a mail program, and it does not check that a mailbox exists for user@example.com. An address that fails the email check is rejected with Enter an email address. The same message is used when the address is longer than 200 characters. A subject longer than 200 characters is rejected with Keep the subject to 200 characters or fewer. The button is labeled Build the link. Reset puts user@example.com and Hello back into the fields and returns the headline to the waiting line.

What the Mailto Link Contains

The headline is one link. It starts with mailto: and then the trimmed address. When the trimmed subject is not empty, the page adds ?subject= and the encoded subject. When the trimmed subject is empty, the link stops after the address. There is no body parameter, no cc parameter, and no second address. The sample with Hello is mailto:user@example.com?subject=Hello. The sample with the subject field cleared is mailto:user@example.com. Those two strings are the whole result. Nothing else is appended. The steps under the result repeat that order: start with mailto: and the address, add the encoded subject when one was typed, and remember that the page does not send a message.

Under the headline, the Email line is the address that passed the check, and the Subject characters line is the length of the trimmed subject. Hello is 5. A blank subject is 0. Hello there is 11, even though the link shows Hello%20there. Copy result copies the link, which matches the headline, and it does not copy the two lines. Reset restores the fields to user@example.com and Hello, and it returns the headline to the waiting line Enter an email address. A link you already copied stays wherever you pasted it. The page does not keep a list of earlier subjects.

How the Subject Is Encoded

The address is trimmed and checked before any link is built. user@example.com passes. A string with no at-sign, such as not-an-email, fails with Enter an email address, and the previous link is cleared. Spaces at the ends of the address are removed by the trim. The subject is trimmed the same way, then measured. A subject of 200 characters is allowed. A subject of 201 characters is rejected with Keep the subject to 200 characters or fewer, and no link is returned. Encoding happens only after those checks. A subject that is only spaces trims to empty, so it is treated as a blank subject rather than as a subject made of space characters. Spaces become %20. An ampersand becomes %26. Hello has no character that needs encoding, which is why the sample can be read as ordinary text after subject=.

A phone link is a different page. The WhatsApp Link Generator builds an https://wa.me/ link from a phone number and an optional message. The sample number 15551234567 and the message Hello become https://wa.me/15551234567?text=Hello. An empty message leaves the text parameter off that link. Digits are kept and other characters in the number are dropped, and the number must contain 8 to 15 digits. That page does not send the message. Use it when the link should open a chat by number. Use this page when the link should name an email address and, when you typed one, a subject.

What the Link Leaves to the Mail Program

The string is ready to paste into a page, a document, or a note. What happens after someone follows it depends on the mail program on that computer. This page does not choose a mail program, does not fill a message body, and does not record whether the link was followed. If the address is a placeholder such as user@example.com, the link is still well formed. The mailbox may not exist. The page has no way to know, and it does not ask.

Keep the subject you typed next to the encoded link when the subject contains a space or an ampersand. The link shows Hello%20there or a%26b. A reader who sees only the link has to decode it to recover the words. The Subject characters line is a count, not a copy of the original words. Write the unencoded subject in the note if the wording matters. A subject you change after copying is your edit. The page will not update a link that has already left the result area. If you need the address without the mailto: prefix, read it from the Email line.

Hello, a Blank Subject, and a Space

Leave the fields at user@example.com and Hello. Choose Build the link. The headline is mailto:user@example.com?subject=Hello. Email is user@example.com. Subject characters is 5. Clear the subject and build again. The headline is mailto:user@example.com, and Subject characters is 0. Type Hello there. The headline is mailto:user@example.com?subject=Hello%20there, and Subject characters is 11. Type a&b. The headline ends in subject=a%26b, and Subject characters is 3. Replace the address with not-an-email and confirm the rejection Enter an email address. The old link does not remain beside that message. Build Hello again afterward so the sample is the last successful result on the page.

A watch link with a start time is a different page. The YouTube Timestamp Link builds a YouTube watch URL from an 11-character video ID and a time. The sample ID abcdefghijk at 1 minute and 30 seconds is https://www.youtube.com/watch?v=abcdefghijk&t=90s, because 1 times 60, plus 30, is 90. That page does not open YouTube, and it does not build a mailto link or encode an email subject. Use it when the task is a t= parameter on a watch URL. Use this page when the task is mailto: and an optional subject.

Address Length, Subject Length, and the Check

The address must pass an email check, and it must be at most 200 characters. user@example.com passes. not-an-email fails. An address longer than 200 characters fails with the same sentence, Enter an email address. The page does not return a second message that names the length. The subject, when present, must be at most 200 characters. The length is measured after trimming, and it is measured on the characters you typed, not on the encoded form. Hello there is 11 characters even though the link contains Hello%20there, which is longer. A subject of only spaces trims to empty, so the link is built without ?subject=, and the character line reads 0. A subject of exactly 200 characters is accepted and then encoded. One more character is refused.

The link uses one address and, at most, one subject. There is no field for a message body, a cc address, or a bcc address. If you need those, they are not added by this page. Encoding follows the URL rules used for the subject parameter: a space is %20, and an ampersand is %26. The page does not leave a raw space or a raw ampersand inside the subject value. Reset returns the sample address and the sample subject Hello. It also clears the result, so copy the link before you reset if the note lives outside the page.

Common Mistakes with the Subject

A common miss is to expect a blank subject to keep ?subject= with nothing after it. The blank subject omits the parameter, and the link is mailto:user@example.com. Another miss is to count the encoded characters as the subject length. Hello there is 11 on the Subject characters line, not the length of Hello%20there. A third is to treat the page as a sender. The steps under the result say the page does not send a message. A fourth is to leave a failed address on screen and assume the previous headline is still current. A rejection replaces the headline with Enter an email address and clears the lines. A fifth is to paste the link into a note and drop the original subject, then wonder why a%26b does not look like a&b.

Cleaning tracking parameters is a different page. The URL Cleaner removes parameters whose names start with utm_, and it also removes fbclid, gclid, mc_eid, igshid, and si. The sample https://example.com/page?id=2&utm_source=news becomes https://example.com/page?id=2. Other parameters, such as id, stay. The page does not open the link. A mailto string is not an http or https URL, so this cleaner is the wrong tool for it. Use the cleaner when the task is a web address with tracking parameters. Use this page when the task is a mailto link.

Filing the Link Beside the Subject You Typed

Copy the link, then write the subject in the words you typed on the next line of the note. For the sample, the link line is mailto:user@example.com?subject=Hello and the subject line is Hello. For a blank subject, write that the subject field was empty, so a later reader does not add ?subject= by habit. For Hello there, write Hello there beside mailto:user@example.com?subject=Hello%20there. The character count 11 can sit on that same note if you need to show that the length was taken before encoding.

Rebuilding the Hello Link

Enter user@example.com and Hello. Confirm the headline mailto:user@example.com?subject=Hello, the Email line user@example.com, and Subject characters 5. Clear the subject and confirm mailto:user@example.com with Subject characters 0. Enter Hello there and confirm subject=Hello%20there with Subject characters 11. Enter a&b and confirm subject=a%26b with Subject characters 3. Enter not-an-email and confirm Enter an email address. Reset and confirm the fields return to user@example.com and Hello, and the headline returns to Enter an email address. Build the Hello sample once more before you file a different address. The copied text and the headline should match on that last build.

A chat timestamp is a different page. The Discord Timestamp Generator builds a Discord timestamp tag from a Unix time and a format letter. The sample 1600000000 and the letter t become <t:1600000000:t>. The format letters are t, T, d, D, f, F, and R. The page does not convert a calendar date into that Unix time, and it does not post the tag. It does not build a mailto link. Use it when you already have a Unix time and need the tag. Use this page for an email address and a subject.

The Three Results Worth Keeping

The sample with Hello, the blank subject, and the rejected address are enough to see the page working. Hello produces mailto:user@example.com?subject=Hello and a subject length of 5. A cleared subject produces mailto:user@example.com and a subject length of 0. not-an-email produces Enter an email address and no link. Hello there and a&b then show that encoding changes the link without changing the character count: 11 and 3 are the lengths of the subjects you typed. Run the rejection after a successful build so you can see the old link clear.

Checking a New Subject

Confirm the Hello sample before you change the subject. The headline should be mailto:user@example.com?subject=Hello and the character line should be 5. Then replace only the subject with Hello there. The headline should end in subject=Hello%20there and the character line should be 11. If the character line stays 5, the subject field did not change. Restore Hello and confirm 5 again. A blank check is the reverse: clear the subject and confirm that the question mark is gone and the character line is 0. The address should stay user@example.com through each of those checks. Change only one field at a time so a wrong headline has one cause.

A character count against 280 is a different page. The Twitter Character Counter counts Unicode characters and compares the total with 280. Hello is 5 characters, with 275 remaining. A URL is counted by the characters you typed. That page does not shorten a link to 23 characters, and it does not build a mailto link or encode a subject. Going past 280 still returns a count. Use it to count a post. Use this page to build the mailto link.

Frequently Asked Questions

What link does user@example.com and Hello produce?

mailto:user@example.com?subject=Hello. The Subject characters line reads 5.

What happens when the subject is blank?

The link is mailto:user@example.com. The page omits ?subject=. The Subject characters line reads 0.

How is the subject encoded?

The subject is URL-encoded. Hello stays Hello. Hello there becomes Hello%20there. a&b becomes a%26b. The character line counts the subject you typed, so Hello there is 11 and a&b is 3.

What if the email is invalid?

The page rejects it with Enter an email address. The same message is used when the address is longer than 200 characters. not-an-email is rejected.

How long can the subject be?

The subject may be at most 200 characters. A longer subject is rejected with Keep the subject to 200 characters or fewer. The length is the trimmed text you typed, not the encoded form.

Does the page send the mail?

No. It builds the link. It does not open a mail program, and it does not check that the mailbox exists.

Does the link include a message body?

No. The link has the address and, when you typed a subject, one subject parameter. There is no body, cc, or bcc field.

What does copy return?

The mailto link, which is the same string as the headline. It does not copy the Email line or the Subject characters line.

What does reset restore?

The address user@example.com and the subject Hello. The headline returns to Enter an email address.

Why is Hello there 11 characters when the link looks longer?

Subject characters counts Hello there, which is 11 characters. The link shows the encoded form Hello%20there, and that encoding is not the length on the line.