Every developer runs into the same problem. You need to test account creation, password resets, or email notifications, and you need a unique email address for each test. Using your real email gets messy fast. Using example.com addresses means you never see the actual emails arrive. And hardcoding fake addresses into test suites breaks the moment someone else runs them.
Everyone has that one staging database full of test@test.com entries.
There are several ways to generate test email addresses that actually work, from built-in alias features in Gmail and Outlook to disposable email services and scripted generation. This guide covers the practical options, with code examples you can drop into your workflow today.
TextExpander Snippets can generate unique test addresses with a single keystroke in your browser, terminal, or IDE. Start a free trial or read on for all your options.
What is an email address generator?
An email address generator is any method or tool that creates unique, functional email addresses for testing, development, or privacy purposes. These range from simple plus-addressing tricks built into major email providers to dedicated temporary email services and custom scripts that produce randomized addresses on demand.
Using Gmail aliases for test emails
Gmail ignores everything after a + sign in the local part of an address. That means yourname+test1@gmail.com, yourname+signup-flow@gmail.com, and yourname+anything@gmail.com all deliver to the same inbox. Most registration forms treat each variation as a distinct address.
This makes Gmail aliases the fastest way to generate test emails when you need to verify that messages actually arrive. A few examples:
dev+qa-2026-02-26@gmail.comfor date-stamped test runsdev+signup-test-001@gmail.comfor sequential account creation testsdev+password-reset@gmail.comfor specific flow testing
Gmail also ignores dots in the local part. your.name@gmail.com and yourname@gmail.com are the same mailbox. You can combine both tricks for even more variations, though plus-addressing is more readable in test logs.
The limitation: some forms strip or reject the + character during validation. If your own app does this, fix the validation. Plus-addressing is a widely supported convention recognized in RFC 5233, the Sieve Subaddress Extension, and the + character is valid in email addresses per RFC 5321.
Email aliases beyond Gmail
The plus-addressing trick is not exclusive to Gmail. Several other providers support it.
If your team uses Microsoft accounts, Outlook and Microsoft 365 support plus-addressing the same way Gmail does. yourname+test@outlook.com delivers to yourname@outlook.com, and the setup requires zero configuration on the admin side.
Fastmail supports both plus-addressing and subdomain addressing. You can use yourname+test@fastmail.com or use subdomain addressing like anything@yourname.fastmail.com, where your alias becomes a subdomain. This works automatically with any Fastmail alias and does not require a custom domain.
Apple Hide My Email takes a different approach. Available with an iCloud+ subscription, or in limited form through Sign in with Apple, it generates a random address like dq5x8r7g4n@privaterelay.appleid.com that forwards to your real inbox. Each generated address is unique and can be deactivated independently. This is more useful for privacy than for automated testing, but it works well for manual QA sessions where you need a fresh address quickly.
For quick manual QA where you do not want to expose your real address at all, Firefox Relay provides a similar masking service. Free accounts get five email masks, each forwarding to your real address with an on/off toggle. Like Hide My Email, this suits manual testing better than scripted automation.
Disposable email services
When you need a test address with no connection to your real email, disposable services fill the gap.
Mailinator provides public inboxes that require no signup. Send mail to anything@mailinator.com and check the inbox at mailinator.com. The catch: inboxes are public, so anyone can read them. Do not use Mailinator for anything involving real user data. It works well for testing that outbound emails render correctly.
If you need a private inbox rather than a public one, Guerrilla Mail gives you a temporary address that lasts about an hour. It handles attachments, requires no registration, and works well for one-off testing sessions.
temp-mail.org auto-generates a random address and displays incoming messages in the browser. The address expires after a set period. Good for quick smoke tests of signup flows.
The trade-off with all disposable services is reliability. They go down, they get blocked by spam filters, and some registration systems maintain blocklists of known disposable domains. Nothing derails a demo quite like discovering your throwaway email service is offline at the worst possible moment. For automated test suites, scripted generation is more dependable.
Generate test emails with one keystroke
You need a unique test address every time you run a flow. TextExpander Snippets use JavaScript or date macros to produce a fresh address the moment you type your abbreviation, right in your IDE, browser, or terminal.
Free for 30 days. No credit card required.
Automating test email generation with TextExpander
Aliases and disposable services cover ad hoc testing. Automation covers everything else.
If you generate test email addresses regularly, typing them out by hand is wasted effort. TextExpander lets you create Snippets that produce unique addresses on the fly using JavaScript, shell scripts, or built-in date and time macros.
Simple date-stamped alias. Create a Snippet with the abbreviation ;testemail that expands to your Gmail address with today’s date appended:
yourname+test-%Y-%m-%d-%H%M%S@gmail.com
Using TextExpander’s built-in date/time macros, this produces something like yourname+test-2026-02-26-143022@gmail.com every time you trigger it. Each expansion is unique down to the second.
Random address via shell script. For addresses that need to look more like real signups, use a Snippet that runs a shell script:
#!/bin/bash
echo "testuser$(( RANDOM % 90000 + 10000 ))@yourdomain.com"
This generates addresses like testuser28374@yourdomain.com with a random five-digit number in the range 10000 to 42767, limited by Bash’s $RANDOM ceiling of 32767. For a wider range, use the JavaScript approach below. Adjust the prefix to match your test naming conventions.
JavaScript-based generation. TextExpander also supports JavaScript in Snippets. This example generates a random string for the local part:
const chars = 'abcdefghijklmnopqrstuvwxyz0123456789';
let local = 'test-';
for (let i = 0; i < 8; i++) {
local += chars.charAt(Math.floor(Math.random() * chars.length));
}
return local + '@yourdomain.com';
This produces addresses like test-k7m2x9p4@yourdomain.com. The 8-character random suffix gives you over 2.8 trillion possible combinations, so collisions are not a practical concern.
The advantage of using TextExpander for this is that the Snippets work everywhere: in your browser, terminal, IDE, or testing tool. Your team can share the same Snippets through a shared group so everyone generates addresses in a consistent format. Set up a free trial to try it.
Frequently asked questions
Can I use plus aliases for testing in production?
Plus aliases work in production, but use them carefully. They are real addresses tied to real inboxes. For load testing or large-scale automated tests, use a dedicated test domain or a service like Mailinator instead. Plus aliases are best for manual QA and small-scale functional tests where you want to verify that emails actually arrive and render correctly.
What happens to emails sent to plus-addressed Gmail accounts?
They arrive in the same inbox as mail sent to the base address. Gmail does not create separate folders or labels automatically. You can set up Gmail filters that match the to: field to sort test emails into a dedicated label and keep your inbox clean during test runs.
How many unique test email addresses can I generate?
With plus-addressing, there is no hard limit. Gmail, Outlook, and Fastmail do not restrict the number of aliases you can use. The practical limit depends on the receiving system. If you need thousands of unique addresses for automated tests, scripted generation with random strings gives you effectively unlimited supply without hitting any provider constraints.
Automate your test email workflow
Every Snippet on this page works in your browser, terminal, IDE, or testing tool. Build one, share it with your team, and generate consistent test addresses across every environment.
No credit card required.
