What is a mailto link?

A mailto link is a URL that opens a draft in the visitor's default email application. It starts with mailto: and can prefill the recipient, subject, message body, CC, and BCC fields.

The shortest version is:

mailto:support@example.com

Mailto links do not send email automatically. The visitor still reviews and sends the message from their email app.

How to create a mailto link

  1. Enter one or more recipient addresses in the To field.
  2. Add optional CC and BCC recipients.
  3. Write the subject and body that should appear in the draft.
  4. Choose the visible link text for the HTML anchor.
  5. Generate the link, then copy either the URL or HTML code.

All values stay in your browser. This tool does not submit recipient addresses or message text to a server.

Mailto link format and parameters

A mailto URL puts the main recipient directly after mailto:. Optional fields form a query string:

mailto:support@example.com?subject=Support%20request&body=Hello%20team

The first optional parameter begins with ?. Additional parameters use &.

  • To sets the main recipient, as in mailto:support@example.com.
  • CC adds a visible copy recipient with cc=team@example.com.
  • BCC adds a hidden copy recipient with bcc=archive@example.com.
  • Subject sets the draft subject line with subject=Support%20request.
  • Body sets the draft message content with body=Hello%20team.

When the URL is placed in HTML, ampersands are written as & inside the href attribute. The generator handles that detail in the HTML output.

Why mailto values need URL encoding

Spaces, line breaks, ampersands, question marks, percent signs, and other special characters can change the meaning of a URL. Encoding keeps the subject and body intact.

Common encoded values include:

  • %20 for a space
  • %0A for a line break
  • %26 for an ampersand
  • %3F for a question mark
  • %25 for a percent sign

The generator encodes each dynamic value separately. It also escapes the link text and the generated href so the HTML can be pasted safely into a page.

Multiple recipients, CC, and BCC

You can enter multiple addresses separated by commas, semicolons, or line breaks. The generator trims them and creates a comma-separated list.

Client support is not identical. Keep recipient lists short and test the final link in the browsers and email applications your audience uses. Do not put private addresses or sensitive message content in a public page: mailto values remain visible in its HTML source.

Test mailto links before publishing

Check more than the URL syntax. A correct link can still behave differently when a device has no default email application or routes email links to an unexpected client.

Test that:

  • the expected email app opens
  • To, CC, and BCC recipients appear correctly
  • subject punctuation and body line breaks survive
  • desktop and mobile behavior is acceptable
  • the page offers another contact path when the client handoff fails

For deeper syntax examples and client limitations, read the HTML mailto link guide.

When to use mailto and when to use a form or API

Mailto works well for a simple, optional contact action where the visitor should send from their own email account. It is less suitable for support intake, account recovery, billing, or other workflows that require reliable capture, validation, tracking, attachments, or automation.

For those flows, use a form or email API and test the full send-and-receive path. MailSlurp provides private inbox APIs, webhooks, email content assertions, and browser-testing integrations for Playwright and Cypress, so teams can verify that important messages arrive with the right recipients, subject, body, links, and attachments.

Explore email integration testing when the workflow needs more than a client-side mailto handoff.