Mailto link generator

Generate a mailto link with a subject, message body, CC, and BCC, and get its HTML code.

Rated 5 out of 5 (total ratings: 1)
Mailto link generator

Mailto link generator is a free tool that creates a mailto URI and HTML code from recipient, CC, BCC, subject, and message body values.

What does each form field put in the email draft?

Each form field maps to either the recipient portion of the mailto URI or an hfield name/value pair in its query component. A basic link begins with mailto:, followed by the primary recipient. The cc, bcc, subject, and body values are hfields that come after a question mark and are separated with ampersands.

Form field Mailto component What the email app receives
To email Address after mailto: The primary recipient in the To field
CC cc hfield A recipient who receives a visible copy
BCC bcc hfield A recipient whose address is hidden from other recipients after sending
Subject subject hfield The draft's subject line
Body content body hfield Prewritten text in the message body

The first hfield name/value pair follows a question mark. Each additional pair follows an ampersand. A typical structure is mailto:recipient@example.com?cc=copy@example.com&subject=Order%20question&body=Please%20send%20an%20update.

The values are starting content rather than locked instructions. The person clicking the link can edit recipients, the subject, and the body before sending the message.

Diagram showing a mailto link opening a prefilled email

How should mailto values be formatted?

Mailto values should use consistent wording and percent-encoding so spaces, punctuation, and line breaks do not break the URI. Lowercase hfield names such as cc, bcc, subject, and body are conventional and easier to inspect later.

  • Use no literal spaces in mailto hfield values. Spaces are commonly encoded as %20.
  • Encode punctuation when it has a reserved meaning in a mailto hfield value. For example, an ampersand inside the message must be encoded as %26 so it is not mistaken for the next hfield.
  • Keep subject labels consistent. A pattern such as "Pickup request 1048" is easier to filter than changing between "Request," "Pickup," and "Order pickup" for the same workflow.
  • Use deliberate line breaks. A body line break must be encoded as a carriage return followed by a line feed: %0D%0A.
  • Use lowercase email domains. Domain names are case-insensitive, and consistent casing makes copied lists easier to review.

Numbers in mailto subject and body hfields do not need special treatment unless they appear with reserved punctuation. Accented and non-Latin body text is represented as UTF-8 bytes and then percent-encoded in a URI. Internationalized email addresses are a separate compatibility issue because support varies among email providers and mail apps.

Very long body content produces a very long URI. Browsers, operating systems, document formats, and mail apps do not share one universal mailto length limit, so a short template is more dependable than a full letter. For longer messages, link to a contact form or ask the sender to add details after the draft opens.

The Mailto link generator tool on biolink.page, showing its input form

A complete link from five field values

Suppose a warehouse pickup page uses the following values.

To email: dispatch@example.com; CC: receiving@example.com; BCC: records@example.com; Subject: Pickup request 1048; Body content: Please hold 2 cases, followed by a line break and Pickup date: October 3, 2026

The composed mailto URI is:

mailto:dispatch@example.com?cc=receiving%40example.com&bcc=records%40example.com&subject=Pickup%20request%201048&body=Please%20hold%202%20cases.%0D%0APickup%20date%3A%20October%203%2C%202026

When that URI is placed inside an HTML link, ampersands in the href value should be written as & in the HTML source. The corresponding source begins like this:

<a href="mailto:dispatch@example.com?cc=receiving%40example.com&amp;bcc=records%40example.com&amp;subject=Pickup%20request%201048&amp;body=Please%20hold%202%20cases.%0D%0APickup%20date%3A%20October%203%2C%202026">Email a pickup request</a>

The visible link text can describe the action. It does not need to display the email address or the full URI.

Why can a valid mailto URI still behave differently?

A valid mailto URI can behave differently because the browser and operating system decide which email app handles the mailto scheme. One person may see a draft in Outlook, another may open Apple Mail, and another may be prompted to choose or configure an email application.

The generated values become visible in the recipient fields and message area of that draft. Clicking does not send the email. The sender still reviews the message and uses the email app's send command.

A mailto URI does not create an analytics report by itself. A website can record a click event through its own analytics setup, but it generally cannot confirm from the mailto action alone that the user sent the message or that the recipient received it. If you need web campaign parameters for a normal destination URL, the UTM link generator addresses that different use case.

Mistakes and practical limits

Most mailto problems come from encoding, HTML escaping, or assumptions about the visitor's email setup.

  • Leaving reserved characters unencoded. A literal ampersand in a subject or body can be interpreted as a separator between hfields.
  • Using URI separators directly in HTML source. Inside an HTML href attribute, mailto query-component ampersands should be escaped as &amp;.
  • Assuming every click opens the same app. The result depends on the mail handler configured on that device and browser.
  • Treating prefilled values as fixed. The sender can change or remove any recipient or message text before sending.

The values are embedded in the mailto URI and may be exposed when the link or resulting draft is viewed or inspected. Do not place passwords, access tokens, private case details, or other sensitive material in the subject or body. BCC hides an address from other recipients in a sent message, but it does not hide that address inside the original URI.

Building mailto URIs by hand also does not scale well for large email campaigns. Repeated manual editing increases the chance of inconsistent subjects, outdated recipients, and encoding errors. For many email destinations or draft templates, generate the mailto URIs from structured data in a spreadsheet or script, then review a sample from each group.

Frequently asked questions

What is the difference between the generated mailto URI and HTML code?

The mailto URI contains the recipient and prefilled draft values. The HTML code places that URI in a link and adds visible link text.

Why does my browser ask me to choose an application?

The device may not have a default handler assigned to the mailto scheme. The user can select an installed mail app or, in some browsers, authorize a supported webmail service to handle email links.

Can a mailto link set the sender address?

A mailto link cannot reliably choose the From account. The email app controls which configured account sends the message, and the sender may be able to switch accounts before sending.

Can mailto links be used for click or conversion tracking?

The link itself does not report delivery, opens, replies, or completed sends. A page can record that its link was clicked, but that event should not be counted as a confirmed email conversion.

Will a mailto address published on a web page attract spam?

It may. An email address in HTML or in a mailto URI can be collected from public page source, so use an address intended for public contact rather than a private mailbox. Before publishing, test the finished link on both a desktop and a phone and confirm that every visible recipient and prefilled line is appropriate.

Popular tools