Mailto URI Builder
Build or parse RFC 6068 mailto: URIs
/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
{
"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
How to Use
1. Choose `mode`: "build" to create a mailto: URI, or "parse" to decode an existing one.
2. For build mode: provide `to` (required), plus optional `cc`, `bcc`, `subject`, and `body`.
3. For parse mode: provide the `uri` field with the mailto: link to decode.
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
- Contact page links — Generate properly encoded mailto: links for website contact buttons
- Email template pre-filling — Create links that open the user's email client with pre-written content
- QR code generation — Build mailto: URIs to embed in QR codes for offline-to-email workflows
- URI validation — Parse and validate existing mailto: links to check for encoding issues
Frequently Asked Questions
Why not just build mailto: URIs in my code?
Can I include multiple recipients?
What's the maximum body length for a mailto: URI?
Start using Mailto URI Builder now
Get your free API key and make your first request in under a minute.