Free Mailto Link Generator

Create RFC-compliant HTML email links with subject, body, CC/BCC. Generate QR codes for mobile. Works with Gmail, Outlook, and all clients.

Live Preview

What your users will see

Button Style

Send Email

Link Style

Send Email

Generated Mailto Link

0 chars

Generated HTML <a> Tag

QR Code for Mailto Link

Click "Generate QR" to create QR code

Share this tool

Help others discover this free tool!

Need to Attach Files to a Mailto Link?

Standard mailto links do not support file attachments due to browser sandboxing and mail client limitations. If you are looking to send PDFs, images, or documents, check out our recommended compliant workarounds.

Read the Mailto Attachment Guide →

The Complete Mailto Syntax: A Deep Dive

Understanding the syntax of mailto links is key to unlocking their full potential. Let's break down the structure from the simplest form to a complex, multi-parameter link.

The Anatomy of a Mailto Link

A mailto link is constructed with specific components that must be in the correct order:

  • The Scheme: Every mailto link must begin with mailto:.
  • The Recipient: Immediately follows the scheme (e.g., mailto:[email protected]).
  • The First Parameter: Added after the recipient using a question mark ? (e.g., ?subject=Hello).
  • Subsequent Parameters: Chained together using an ampersand & (e.g., &body=Hi).

A Deep Dive into All Mailto Parameters

While the recipient's email is the only mandatory part, you can add several optional parameters to pre-fill the email draft, making it easier for your users.

The `subject` Parameter

This parameter pre-fills the email's subject line. This is one of the most useful parameters. Remember to URL-encode any special characters to avoid breaking the link.

<a href="mailto:[email protected]?subject=Urgent%20Support%20Request">Request Support</a>

The `body` Parameter

The `body` parameter pre-populates the main content of the email. A common challenge is adding line breaks. To do this correctly, you must use %0A to represent a new line.

<a href="mailto:[email protected]?body=Hello%20Team,%0A%0AI have a question...%0A%0ABest regards,">Ask a question</a>

The `cc` & `bcc` Parameters

You can add "carbon copy" (`cc`) and "blind carbon copy" (`bcc`) recipients. This is useful for keeping team members in the loop without requiring the sender to manually add them.

<a href="mailto:[email protected][email protected][email protected]">Email Project Team</a>

Putting It All Together: A Real-World Example

Let's combine multiple parameters into one powerful mailto link. This example sets a recipient, a CC recipient, a subject, and a multi-line body, showing the true power of mailto links.

<a href="mailto:[email protected][email protected]&subject=New%20Inquiry%20%26%20Feedback&body=Hello%20Sales%20Team,%0A%0AI have an inquiry about your product...%0A%0AThanks!">Contact Sales and Support</a>

Avoid Errors, Use the Generator!

Manually encoding special characters and line breaks is tedious and error-prone. Use the interactive generator at the top of this page to create perfect mailto links every time. It's the best way to ensure your links work flawlessly across all email clients.

Multiple Recipients in Mailto Links

Adding Multiple Recipients

To add multiple recipients in a mailto link, separate email addresses with commas. This works for the main recipient (To), CC, and BCC fields.

Advanced Multiple Recipient Patterns

Best Practices & Tips

  • Always URL encode email addresses that contain special characters

  • Test your mailto links with different email clients to ensure compatibility

  • Consider using our generator above to automatically handle encoding and syntax

Common Issues & Solutions

  • Outlook Character Limit

    Some versions of Outlook have a character limit. Keep your total mailto URL under 2000 characters.

  • Special Characters

    Email addresses containing periods or plus signs must be properly encoded.

How to Create Mailto Links: Code Examples

Plain HTML

Standard HTML anchor tag:

<a href="mailto:[email protected]?subject=Hello">Send Email</a>

JavaScript

Dynamic creation with JavaScript:

function createMailtoLink(to, subject, body) {
  const encodedSubject = encodeURIComponent(subject);
  const encodedBody = encodeURIComponent(body);
  return `mailto:${to}?subject=${encodedSubject}&body=${encodedBody}`;
}

// Usage
const link = createMailtoLink(
  '[email protected]',
  'Question about your service',
  'Hi,\n\nI have a question...'
);

// Create a clickable link
const anchor = document.createElement('a');
anchor.href = link;
anchor.textContent = 'Send Email';
document.body.appendChild(anchor);

Tired of Hand-Coding?

Worried about encoding errors and syntax mistakes? Our free Mailto Link Generator above creates perfect, error-free links in seconds.

Try the Generator

RFC 6068 Mailto Link & Attachment Specification Guide

Why consult RFC 6068 guidelines instead of hardcoding email links? Compliance, cross-client compatibility, and understanding file attachment boundaries.

What is an RFC-Compliant Email Link?

An RFC 6068 compliant mailto link is an email URI that strictly conforms to the official internet standards. It ensures that complex parameters like subject, body, cc, and bcc are URL-encoded, safely chained, and correctly interpreted by native mail clients and webmail applications.

Why Manual Chaining Fails

  • Forgotten URL encoding (e.g. spaces breaking browser link execution)
  • Incorrect parameter delimiters (? vs &) breaking email clients
  • Outlook character limit overflows on long pre-filled templates

RFC-Compliant Mailto Link Generation

Our tool is designed around RFC 6068 specifications to guarantee syntactical correctness and cross-client compatibility:

  • RFC 6068 Encoding Compliance Strictly encodes subject, body, and query parameters following internet standards.
  • QR Code Generator Instantly create mailto QR codes for business cards.
  • Privacy Focused Generating happens locally in your browser. No data collected.
  • RFC 6068 Standard Compliant Strict adherence to the official mailto URL scheme standards.

Ready to create the perfect email link?

Start Generating Now

Why Is Your Mailto Link Not Working?

You've crafted what you think is the perfect mailto link, but when you click it... nothing happens. Don't panic! Most mailto link issues have simple fixes.

7 Common Problems & How to Fix Them

1. Encoding Special Characters

This is the #1 cause of broken mailto links. Special characters like spaces, ampersands, and question marks must be properly URL-encoded.

❌ BROKEN:
<a href="mailto:[email protected]?subject=Hello World&body=Hi there, How are you?">
✅ CORRECT:
<a href="mailto:[email protected]?subject=Hello%20World&body=Hi%20there%2C%0AHow%20are%20you%3F">

2. Link Not Opening in Gmail/Outlook

The mailto protocol depends on having a default email client configured. If users haven't set one up, clicking links won't work.

Does mailto work with Gmail? Yes! Gmail handles mailto links excellently in web browsers.

3. Character Limits

Outlook has a roughly 2,000-character limit for mailto URLs. Keep your links concise to ensure compatibility.

4. Simple Syntax Errors

Common "face-palm" moments include:

  • Missing colon after mailto
  • Missing question mark ? before first parameter
  • Using question mark instead of ampersand & between parameters

5. Line Break Issues

Line breaks in the body must be encoded as %0A. Using actual line breaks will break the URL parsing in many email clients.

6. CMS or Framework Conflicts

Some content management systems or JavaScript frameworks automatically modify href attributes, potentially breaking your mailto links. Always check the final rendered HTML.

7. Mobile Device Configuration

On mobile devices, mailto links depend on having an email app installed and configured. If users only use webmail, mailto links might not work as expected.

RFC-Compliant Link Generation

The safest way to avoid client parsing issues is to follow proper encoding and standard parameter chaining.

Our RFC-compliant mailto generator automatically handles URL percent encoding, basic syntax checks, and flags character limit overflows for safer client compatibility.

Use the Generator Now

Frequently Asked Questions

What is the maximum length for a mailto link?

While there's no official limit, we recommend keeping mailto links under 2000 characters for maximum compatibility. Some email clients (especially older versions of Outlook) may have issues with longer links.

Can I use HTML in the body of a mailto link?

No, mailto links don't support HTML formatting in the body. The body text will be plain text only. Any HTML tags will be shown as literal text.

Why isn't my mailto link opening in Gmail?

If you're using Gmail in a browser, you need to set Gmail as your default email client in your browser settings. Alternatively, you can configure your operating system to use Gmail as the default email application.

How do I add line breaks in the email body?

Use %0A or %0D%0A for line breaks. For example: body=Line1%0ALine2

Can I attach files using mailto links?

No, the mailto protocol doesn't support file attachments. For security reasons, you cannot pre-attach files to an email using a mailto link.

How do I create a QR code for my mailto link?

Use the "Generate QR" button above to create a QR code for your mailto link. The QR code can be scanned by mobile devices to quickly open the email composition with all your pre-filled details.

What are the benefits of using QR codes for mailto links?

QR codes make it easy to share complex mailto links on printed materials, business cards, or websites. Users can simply scan the code to open their email client with all fields pre-populated, eliminating typing errors.

Related Topics & Resources

Ready to Create Perfect Mailto Links?

Stop wrestling with URL encoding and syntax errors. Use our free generator above!

Try the Generator
Have feedback? We'd love to hear it!