Phone Number Generator

US phone numbers that follow the North American Numbering Plan, by state or from anywhere in the country.

555-0100 through 555-0199 is reserved for fiction and never rings anyone. Turn this off if your validation rejects 555.

The rules a US number has to follow

A number in the North American Numbering Plan is (NXX) NXX-XXXX, and the letters are not decoration. N means a digit from 2 to 9: neither the area code nor the central office prefix may start with 0 or 1, because those were reserved for the operator and for long distance.

Two more rules that catch naive generators. The prefix cannot be N11 — 211, 311, 411, 611, 911 and the rest are service codes. And an area code ending in 99 is held back for future expansion.

555 does not mean what people think

Films use 555 numbers, so the whole prefix is widely assumed to be fake. It is not. Only 555-0100 through 555-0199 is reserved for fiction. The rest of the 555 range is assignable, and some of it is assigned — 555-1212 is directory assistance across the continent.

That hundred-number block is the default here, because a test number that actually rings someone's phone is worse than one that fails a validator. If your validation rejects 555 outright, the switch above turns it off and the generator uses any legal prefix instead.

Area codes by state, and why the list is short

Picking a state gives you an area code that genuinely serves it, which matters when the system under test derives a region, a timezone or a tax rule from the number.

The list covers the more populous states rather than all 300-plus codes in the plan. A full table would need updating every time a new overlay opens, and a stale table that claims a code exists where it does not is worse than a short one that is right.

Frequently asked questions