How to Create an HTML Mailto Link with a Subject and Body (The Easy Way)
Created on 19 September, 2025 • Generator Tools • 210 views • 2 minutes read
Want to make it easier for users to contact you? Learn how to create a pre-filled HTML mailto link with a custom subject and body using our free online generator.
A simple "Contact Us" link on your website is good, but you can make it significantly better. What if, when a user clicked that link, it not only opened their email client but also pre-filled the subject line and even a starting message in the body? This is possible with an advanced HTML mailto link.
This simple feature streamlines the communication process, reduces friction for your users, and ensures you get the exact information you need. Instead of receiving emails with blank subject lines, you can guide the user, making their experience and yours much more efficient.
This guide will show you how to create an HTML mailto link with a subject and body, both manually and with an easy-to-use tool.
The Anatomy of an Advanced Mailto Link
A standard mailto link is incredibly simple:
<a href="mailto:[email protected]">Email Me</a>
To add a subject and body, you need to add "parameters" to this link using a question mark ? for the first parameter and ampersands & for any subsequent ones.
- subject=Your%20Subject%20Here
- body=Your%20Body%20Text%20Here
Notice the %20? This is crucial. In URLs, you cannot have spaces. Any space must be "percent-encoded" as %20. Forgetting this is a common mistake that will break your link.
So, a full manual link looks like this:
<a href="mailto:[email protected]?subject=Inquiry%20from%20Website&body=Hello,%20I%20have%20a%20question%20about...">Contact Support</a>
While this works, building it manually is tedious and prone to errors, especially with longer body text.
The Instant Solution: A Free Mailto Link Generator
Why bother with manual coding and remembering to encode spaces? You can create a perfect, error-free mailto link in seconds using a dedicated online tool.
For this, we highly recommend the Mailto Link Generator from Shortus.xyz.
Try the free tool here: https://shortus.xyz/tools/mailto-link-generator
This tool provides a simple, intuitive interface that handles all the complex formatting and encoding for you behind the scenes.
How to Use the Mailto Link Generator
Creating your custom link is a breeze:
- Visit the Tool: Navigate to the Mailto Link Generator page.
- Fill in the Details:To: Enter the primary recipient's email address.CC / BCC: Optionally, add any emails you want to be copied.Subject: Write the subject line you want to appear automatically.Body: Write the initial message you want pre-filled in the email.
- To: Enter the primary recipient's email address.
- CC / BCC: Optionally, add any emails you want to be copied.
- Subject: Write the subject line you want to appear automatically.
- Body: Write the initial message you want pre-filled in the email.
- Generate and Copy: Click the "Generate Link" button. The tool will instantly provide both the direct link and the ready-to-use HTML <a> tag. Simply click "Copy" to grab the code you need.
- Paste into Your Website: Add the copied HTML code to your website's editor where you want the link to appear.
Common Uses for Pre-filled Mailto Links
- Customer Support: Pre-fill the subject as "Support Request" to automatically sort incoming emails.
- Sales Inquiries: Use a subject like "Question about [Product Name]" and a body that prompts for details.
- Content Sharing: Create "Email this article to a friend" links with the article title in the subject.
- Job Applications: Pre-fill the subject with the job title the person is applying for.
Stop using basic mailto links. Elevate your user experience and streamline your inbox by using a generator to create smart, pre-filled links every time.