📬

Mailto URI Builder

Build or parse RFC 6068 mailto: URIs

POST 1 credit /v1/email/mailto
curl -X POST "https://email.toolkitapi.io/v1/email/mailto" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "mode": "build",
    "to": ["[email protected]"],
    "cc": ["[email protected]"],
    "subject": "Support Request",
    "body": "Hello, I need help with my account."
  }'
import httpx

resp = httpx.post(
    "https://email.toolkitapi.io/v1/email/mailto",
    json={
    "mode": "build",
    "to": ["[email protected]"],
    "cc": ["[email protected]"],
    "subject": "Support Request",
    "body": "Hello, I need help with my account."
  },
)
print(resp.json())
const resp = await fetch("https://email.toolkitapi.io/v1/email/mailto", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "mode": "build",
    "to": ["[email protected]"],
    "cc": ["[email protected]"],
    "subject": "Support Request",
    "body": "Hello, I need help with my account."
  }),
});
const data = await resp.json();
console.log(data);
# See curl example
Response 200 OK
{
  "uri": "mailto:[email protected]?cc=manager%40toolkitapi.io&subject=Support%20Request&body=Hello%2C%20I%20need%20help%20with%20my%20account.",
  "fields": {
    "to": ["[email protected]"],
    "cc": ["[email protected]"],
    "bcc": [],
    "subject": "Support Request",
    "body": "Hello, I need help with my account."
  },
  "mode": "build"
}

Description

Build or parse RFC 6068 mailto: URIs

How to Use

1

1. Choose `mode`: "build" to create a mailto: URI, or "parse" to decode an existing one.

2

2. For build mode: provide `to` (required), plus optional `cc`, `bcc`, `subject`, and `body`.

3

3. For parse mode: provide the `uri` field with the mailto: link to decode.

4

4. Use the generated `uri` in HTML anchor tags: `Contact Us`.

About This Tool

The Mailto URI Builder creates and parses RFC 6068 compliant mailto: links. In "build" mode, provide recipients, subject, body, CC, and BCC fields and get a properly URL-encoded mailto: URI. In "parse" mode, provide an existing mailto: URI and get the structured fields back.

Mailto URIs are used in web pages, emails, and documents to create clickable links that open the user's email client with pre-filled fields. Proper URL encoding is critical — this tool handles all the escaping automatically.

Why Use This Tool

Frequently Asked Questions

Why not just build mailto: URIs in my code?
Proper RFC 6068 encoding has subtle rules — commas in addresses, special characters in subjects and bodies, and proper percent-encoding. This tool handles all edge cases correctly.
Can I include multiple recipients?
Yes, the `to`, `cc`, and `bcc` fields all accept arrays of email addresses. Multiple recipients in the `to` field are comma-separated in the resulting URI.
What's the maximum body length for a mailto: URI?
While the RFC doesn't specify a limit, browsers and email clients typically truncate URIs over ~2000 characters. Keep body text short for reliable cross-client compatibility.

Start using Mailto URI Builder now

Get your free API key and make your first request in under a minute.