FormatterHQ

Mailto Link Generator

Create "email us" links that open the visitor’s mail app with the recipient, subject and message already filled in — encoded correctly so line breaks and symbols survive.

Output HTML
Ready.

How to use the Mailto Link Generator

  1. Fill in To, optional CC and BCC, Subject, Body and the link text in the options panel.
  2. Click Generate link. With auto-update on, the output refreshes as you type.
  3. Review the result in the output editor.
  4. Copy it to the clipboard or download it as a file.

Create mailto links that work in every mail app

A mailto: link opens the user's default e-mail program with a new message. Adding a subject and a pre-written body helps visitors write to you and helps you sort incoming mail. The catch is encoding: spaces, line breaks, ampersands and question marks must be percent-encoded or the message arrives truncated. This mailto link generator handles that and outputs both the raw link and an HTML anchor.

Example

mailto:hello@example.com?subject=Question%20about%20your%20product&body=Hi%2C%0D%0A%0D%0AI%20would%20like%20to%20know%20more

<a href="mailto:hello@example.com?subject=…">Email us</a>

Fields in the mailto link generator

  • To: one or more addresses separated by commas.
  • CC / BCC: added as cc= and bcc= parameters.
  • Subject and Body: encoded with encodeURIComponent; line breaks become %0D%0A, as RFC 6068 recommends.
  • Link text: the visible text of the generated <a> tag.

Every address is validated, so a typo such as a missing @ is reported before you publish the link.

Things to keep in mind

Mailto links depend on a configured mail client. On computers without one — common with webmail users — clicking does nothing useful, so also show the address as text or offer a contact form. Very long bodies may be cut off by some clients; keep the pre-filled text to a few lines. Addresses published in plain HTML can be harvested by spam bots, so consider a dedicated contact address.

Common mailto mistakes

  • Plus signs for spaces. Mailto URLs use percent-encoding, not form encoding, so subject=Hello+there shows a literal plus in many mail apps. Spaces must be %20, which the generator writes for you.
  • Unencoded ampersands. An & typed into the body by hand ends the body parameter and starts a new one, cutting the message short.
  • Semicolons between addresses. Outlook accepts them, but the standard separator is a comma; other clients may ignore everything after a semicolon.
  • Exposing the address to bots. Addresses in mailto: links are easy for spam harvesters to collect. For high-traffic pages, consider a contact form or a dedicated address with good spam filtering.

Related tools

Put the link in a QR code for printed material with the QR code generator (choose E-mail), or offer a chat alternative with the WhatsApp link generator. To encode other text for URLs, use URL encode.

Using the HTML

The second part of the output is a complete anchor tag, for example <a href="mailto:hello@example.com?subject=…">Email us</a>. Paste it into your HTML, a CMS HTML block or an e-mail signature editor. You can style it like any other link or button. If you use the link in Markdown, copy only the first line — the raw mailto: URL — and place it in [Email us](mailto:…). Pre-filled subjects such as "Support request – order number:" make it easier to route and answer incoming messages, and a short body template reminds people which details to include.

Privacy

The tool runs entirely in your browser. Nothing you type or paste is sent to our servers.

Frequently asked questions

How do I add a line break in a mailto body?
Use %0D%0A. Type your message with normal line breaks in the Body field and the generator converts them for you.
Can I send to multiple recipients?
Yes. Separate addresses with commas in the To, CC or BCC fields.
Why does my mailto link not open anything?
The visitor probably has no default e-mail program configured, which is common for webmail users. Always show the address as text as well.
Can I attach a file with mailto?
No. The mailto scheme does not support attachments; you can only pre-fill recipients, subject and body.

Last updated October 3, 2026

Related tools

HTML Link Generator Create an HTML anchor tag with link text, title, target _blank, nofollow or sponsored rel and simple inline styling. WhatsApp Link Generator Create a wa.me click-to-chat link with a pre-filled message for your website, e-mail signature or QR code. Broken Link Checker Find broken links on a web page: every link is checked and 404s, errors and redirects are listed. Barcode Generator Generate Code 128, EAN-13, UPC-A, Code 39, ITF-14, ISBN, Data Matrix, PDF417 and more barcodes. Download PNG or SVG for free. Basic Auth Header Generator Build an HTTP "Authorization: Basic" header from username:password, or decode an existing Basic auth header back to credentials. Favicon Generator Make favicon.ico, Apple touch and Android icons plus site.webmanifest and HTML tags from an image or from text/emoji. ZIP download. Marquee Generator Generate HTML marquee code for scrolling text with direction, speed, behaviour, colours and pause-on-hover, with live preview. HTML Minifier Minify HTML online including inline CSS and JavaScript. Pug to HTML Converter Compile Pug templates to HTML online: tags, #id/.class shortcuts, attributes, block text, interpolation and comments. Responsive Website Tester Preview any website on phone, tablet, laptop and desktop screen sizes side by side to check your responsive design. Text to HTML Converter Paste formatted text from Word, Google Docs or a web page, or type plain text, and get clean HTML code. Removes inline styles, classes and Word markup. Word to HTML Converter Convert Word .docx documents to clean, semantic HTML with headings, lists, tables, links and images — right in your browser.