testing
Fake Test Data That Can't Reach a Real Person
The reserved emails, domains, phone numbers, IPs, MACs, card numbers and SSNs that are safe for test data, each with its source and what goes wrong if you guess.
By Kyle Hurst ·
Test data escapes. It ends up in a staging database wired to a real mail provider, in an SMS integration test someone forgot to mock, in a screenshot in your docs that a reader copies. If a fake value happens to be real, the message goes to a real person. The fix is to use values that are reserved so that nobody can ever own them. Every type of identifier you’re likely to seed has one. The RFCs and regulators each document their own. Here they are side by side, with the source for each and what goes wrong when you guess instead.
We have a stake in this. Until this week, our own fake data generator produced addresses at gmail.com and yahoo.com and phone numbers with random area codes. That’s fixed now, and the details are further down.
The reference table
| Type | Safe values | Source | If you guess instead |
|---|---|---|---|
| Email / URL domain | example.com, example.org, example.net and names under them; the .example and .test TLDs | RFC 2606 §2–3, RFC 6761 §6.2, §6.5 | Mail lands in someone’s real inbox |
| US phone | 555-0100 to 555-0199, any area code | NANPA 555 line numbers | A stranger gets your SMS or call |
| UK phone | Ofcom drama ranges, e.g. 07700 900000–900999, 020 7946 0000–0999 | Ofcom | Same, in the UK |
| IPv4 | 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 | RFC 5737 §3 | Health checks or scans hit someone’s server |
| IPv6 | 2001:db8::/32 (also 3fff::/20) | RFC 3849 §2, RFC 9637 | Same |
| MAC (EUI-48) | 00-00-5E-00-53-00 to 00-00-5E-00-53-FF (unicast) | RFC 9542 §2.1.4 | May match a real vendor’s OUI |
| Card number | Your processor’s test numbers, e.g. Stripe’s 4242 4242 4242 4242 | Stripe testing docs | A Luhn-valid random number can be a real card |
| US SSN | Area 000 (SSA suggests 000-00-0000); 666 and 900–999 are never issued | SSA randomization, POMS RM 10201.020 | Someone’s real identity in your fixtures |
Email and URL domains
RFC 2606 reserves four top-level domains in §2 and three second-level domains in §3: example.com, example.net and example.org. RFC 6761 §6.5 extends the reservation to every name under them, so mail.example.com and qa.example.org are just as safe, and says registrars must not register any of them.
The four reserved TLDs are not interchangeable. Each has a stated job:
| TLD | Intended use (RFC 2606 §2, RFC 6761 §6) | Good for test data? |
|---|---|---|
.example | Documentation and examples | Yes |
.test | Testing; resolvers return negative answers by default | Yes |
.invalid | Names “sure to be invalid”; resolvers should return NXDOMAIN | Only when you want a guaranteed failure |
.localhost | Always the loopback address | No. It resolves to your own machine |
The example.* domains go one step further than the RFCs require. They publish a null MX record (RFC 7505), which tells senders the domain accepts no mail, so a delivery attempt fails at once instead of sitting in a retry queue:
$ dig +short MX example.com
0 .
(example.org and example.net returned the same when we checked on 19 November 2026.)
The domains people think are fake
Developers invent “obviously fake” domains all the time. Most of them are registered. We checked each one against its registry on 19 November 2026 (RDAP for .com and .net, WHOIS for .co and .io, which have no RDAP server in IANA’s bootstrap list):
| Domain | Registered since | MX record |
|---|---|---|
test.com | 1997-06-18 | none |
foo.com | 1997-08-13 | 0.0.0.0 |
asdf.com | 1998-11-04 | mx10.asdf.com |
corp.com | 1994-06-04 | present |
company.io | 2013-06-22 | none, but has an A record |
dev.io | 2004-10-27 | mail.dev.io |
example.co | 2026-05-18 | present |
That example.co is not example.com. It was registered six months ago by somebody who isn’t IANA. And “no MX record” doesn’t mean safe. RFC 5321 §5.1 says that when a domain has no MX but does have an address record, senders treat it as an implicit MX pointing at that host. So mail to company.io would be attempted at its web server’s IP.
Two more traps: .dev and .app are real, delegated TLDs run by Google’s registry (IANA’s RDAP bootstrap file points both to pubapi.registry.google). They are not developer placeholders. If you want to check a particular domain, our email validator looks up its MX records and recognises a null MX. The broader point, that a well-formed address says nothing about where mail actually goes, is in syntax valid doesn’t mean deliverable.
US phone numbers: only 555-0100 to 555-0199
The folk rule is “use 555”. That rule is out of date. NANPA’s 555 page explains that 555 line numbers were opened for assignment in 1994. In May 2016 the Industry Numbering Committee (INC) agreed to sunset the 555 assignment guidelines, the FCC approved the decision in September 2016, and “all 555 line numbers have been returned to the inventory of NANPA resources.” Two are still in national use: 555-1212 (directory assistance) and 555-4334. And one block keeps its special status:
The fictitious, non-working numbers, 555-0100 through 555-0199, will remain reserved for entertainment/advertising.
So (415) 555-0142 is safe. (415) 555-2368 relies on a range that NANPA now holds as ordinary inventory. The area code can be any real one, because the safety comes from the line number. A random seven digits, or a random area code with a random exchange, can be someone’s phone.
If you only need the last two digits to vary, our random number generator set to 0–99 will do it. Pad to two digits and append to 555-01.
UK phone numbers: Ofcom’s drama ranges
Ofcom publishes blocks of 1,000 numbers for TV and radio drama. It says they “cannot be allocated to communications providers for their customers” and “will not be allocated to communications providers in the foreseeable future.” A selection (the page was last updated 11 May 2023):
| Type | Range |
|---|---|
| Mobile | 07700 900000 to 900999 |
| London | 020 7946 0000 to 7946 0999 |
| Birmingham | 0121 496 0000 to 496 0999 |
| Manchester | 0161 496 0000 to 496 0999 |
| No area | 01632 960000 to 960999 |
| Freephone | 08081 570000 to 570999 |
| UK-wide | 03069 990000 to 990999 |
Ofcom lists 15 geographic area codes in total and suggests 01632 for any area code it doesn’t list. We haven’t found a regulator source for other countries we could verify, so we’ve left them out.
IPv4: the three TEST-NETs
RFC 5737 §3 gives three /24 blocks “for use in documentation”: 192.0.2.0/24 (TEST-NET-1), 198.51.100.0/24 (TEST-NET-2) and 203.0.113.0/24 (TEST-NET-3). §4 says they “SHOULD NOT appear on the public Internet,” and that operators should treat them as non-routable and add them to packet filters.
What people reach for instead:
1.2.3.4is not imaginary. APNIC’s RDAP lists1.2.3.0/24as an APNIC Debogon Project prefix. It’s real, allocated address space.10.x.x.x,172.16.x.x–172.31.x.xand192.168.x.xare the RFC 1918 private ranges. They don’t exist on the internet, but they very likely exist on your network. A test that pings192.168.1.1may reach your router. RFC 5737 says outright that the TEST-NETs “are not for local use,” which makes them the right choice for test data.
Only 254 usable hosts in each block feels tight until you remember the goal is a value that looks right, not a realistic address plan. For the arithmetic of what a /24 actually contains, see CIDR and subnetting, explained.
IPv6: 2001:db8::/32
RFC 3849 §2 reserves 2001:DB8::/32 for documentation, and §3 tells operators to treat it as non-routable. That’s 96 bits of room, enough for any test data. RFC 9637 later added 3fff::/20, because the /32 “is inadequate to describe many realistic, current deployment scenarios”. It matters if your examples need to show several /32-sized allocations.
MAC addresses
RFC 9542, which obsoletes RFC 7042, sets aside two blocks under IANA’s own OUI 00-00-5E in §2.1.4: 00-00-5E-00-53-00 through 00-00-5E-00-53-FF for unicast, and 01-00-5E-90-10-00 through 01-00-5E-90-10-FF for multicast. Any other OUI you type may belong to a real vendor, which will confuse every vendor-lookup tool that sees your data.
Card numbers
Never generate “random valid” card numbers. As our post on regex PII redaction works out, about one in ten random 16-digit strings passes the Luhn check. A number that passes is structurally a real card number, and it may belong to someone. Use the numbers your processor publishes for its test mode. Stripe’s testing page lists 4242424242424242 (Visa), 5555555555554444 (Mastercard) and 378282246310005 (American Express), with any future expiry and any three-digit CVC (four digits for Amex). They work with your test API keys, and the page is blunt about the alternative: “Don’t use real card details.”
US Social Security numbers
The SSA’s randomization page says that since 25 June 2011, previously unassigned area numbers have been opened for assignment, “excluding area numbers 000, 666 and 900-999.” Those are the only area numbers that page excludes. For display, the SSA’s own operations manual (POMS RM 10201.020) tells staff to suggest 000-00-0000, or at least a number beginning with 000, because “any other combination of numbers could potentially be a valid SSN.” The often-repeated 987-65-4320 to 4329 “advertising range” may well be real, but we couldn’t find it stated on any SSA page, so we’re not repeating it as fact.
What our generator did, and what changed
The generator’s email field used to choose from this list:
gmail.com, yahoo.com, outlook.com, hotmail.com, icloud.com, protonmail.com,
example.com, mail.com, fastmail.com, hey.com, company.io, corp.com, dev.io,
webmail.net, inbox.com
Only one of those fifteen was reserved. The last five look invented, and all five are registered domains (we checked every one). The phone field built (NXX) NXX-XXXX from three independent random numbers. That produces ordinary, dialable-looking numbers, and some will be assigned to real people. Combine a few hundred rows with a staging environment that sends real SMS and you have the HBO Max problem in miniature. In June 2021 the service emailed part of its subscriber list a message titled “Integration Test Email #1.” Its help account apologised with “yes, it was the intern.” That was a template mistake, not bad fake data. It shows how quickly test sends reach real inboxes once the wiring is live.
Now every email domain is example.com, example.org, example.net, a name under one of them, or a .example or .test name. Every US phone is 555-01XX behind a real area code. We also added four field types that draw only from reserved ranges: UK phones from Ofcom’s drama blocks, IPv4 from the TEST-NETs, IPv6 from 2001:db8::/32, and https URLs on example hosts. A sample of the new output, from seed blog-post-seed:
{
"email": "[email protected]",
"phone": "(718) 555-0152",
"phoneUk": "01632 960012",
"ipv4": "203.0.113.87",
"ipv6": "2001:db8:ad33:93fc:ea96:b35b:856e:30d6",
"url": "https://inbox.test/quae"
}
Tests in our suite generate 5,000 rows per type and check that every value falls inside its range. We didn’t add an option to bring the real domains back. Half the email picks are bare example.* addresses, so a strict validator that rejects .test still gets plenty of rows it accepts. One consequence: if you saved a seed before this change, it now produces different emails and phones.
What we can’t make safe: street addresses and names. No regulator reserves a block of street addresses (we found no such source), and common names belong to many people. Our generator doesn’t emit ZIP codes, and you should never post physical mail to its addresses. It doesn’t emit cards, SSNs or MACs either. Use the values above if your schema needs them.
Making the whole system safe, not just the data
Reserved values are the last line of defence. The first is making sure staging can’t send anything real:
- Mail: point non-production at a local SMTP catcher or your provider’s sandbox, not a live sending key. As a backstop, add an allowlist that drops any recipient domain other than your own and
example.*. - SMS and voice: Twilio’s test credentials don’t charge your account or “connect to real phone numbers.” Its magic numbers let you exercise each path:
+15005550006as the From number passes validation, and To numbers such as+15005550001(invalid) or+15005550009(can’t receive SMS) trigger specific errors. - Payments: test API keys plus the processor’s test cards, as above.
- Logs and exports: if real data does get mixed in, run it through a PII scrubber before sharing, and read the output afterwards.
The short version
Emails at example.com or .test, US phones at 555-0100 to 0199, IPs in 192.0.2.0/24 or 2001:db8::/32, cards from your processor’s test page, SSNs starting 000. The fake data generator produces the email, phone and IP values by default, up to 1,000 rows at a time, and exports JSON, CSV or SQL. For keys, the UUID generator fills in the IDs.