Ruthlessly Helpful

Stephen Ritchie's offerings of ruthlessly helpful software engineering practices.

Fake 555 Telephone Number Prefix and More

Unless you want your automated tests to send a text message to one of your users, you ought to use a fake phone number. In the U.S., there is the “dummy” 555 phone exchange, often used for fictional phone numbers in the movies and television.

These fake phone numbers are very helpful. For example, use these fake numbers to test the data entry validation of telephone numbers through the user interface.,,, and

What about automated tests that verify email address validation? Try using

In all the testing that you do, select fake Internet data:

Fake URLs:
Fake top-level domain (TLD) names: .test, .example, .invalid
Fake second-level domain names:,,,
Fake host names:,,,


Fake Social Security Numbers

In the U.S., a Social Security number (SSN) is a nine-digit number issued to an individual by the Social Security Administration. Since the SSN is unique for every individual, it is personally identifiable information (PII), which warrants special handling. As a best practice, you do not want PII in your test data, scripts, or code.

There are special Social Security numbers which will never be allocated:

  • Numbers with all zeros in any digit group (000-##-####, ###-00-####, ###-##-0000).
  • Numbers of the form 666-##-####.
  • Numbers from 987-65-4320 to 987-65-4329 are reserved for use in advertisements.

For many, changing all the SSNs to use the 987-00-xxxx works great, where xxxx is the original last four digits of the SSN. If duplicate SSNs are an issue then use the 666 prefix or 000 prefix (or use sequential numbers for the center digit group) as a way to resolve duplicates.


More Fake Data

There are tons of sources of fake data out on the Internet. Here is one such place to start your search:


One response to “Fake 555 Telephone Number Prefix and More

  1. James Nail March 2, 2012 at 9:53 am

    Good tips, Stephen. I didn’t know about those reserved top-level domains — that’s good stuff!
    Also, I see you’ve finally acknowledged the uniqueness of SSNs ;-)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: