Phone Number Validator and Formatter for 240+ Regions
This phone number validator checks each number against the numbering plan of its country, then rewrites it in the formats you actually need: E.164 for databases and SMS APIs, international for display, national for local users, and an RFC 3966 tel: URI for links. It also reports the country, calling code and line type, and handles up to 500 numbers in one go.
What does "valid" mean for a phone number?
Validation here uses libphonenumber metadata, the numbering-plan data that originated with Google's phone library. A number is valid when its length and leading digits fall inside a range the country has assigned, for example a UK geographic block or an Indian mobile prefix. There are three possible results:
- Valid: the right length and inside an assigned range.
- Invalid (right length, but not an assigned range): it looks plausible but the prefix is not in use.
- Invalid (wrong length for this country): too many or too few digits.
Keep in mind that valid does not mean reachable. The check cannot tell whether a number is connected, who owns it, or whether it has been ported to another carrier. To confirm ownership you still need a verification code sent by SMS or a call.
Example
With the default country set to United States, these inputs:
(415) 555-2671
+91 98765 43210
555-1234
produce (abridged):
(415) 555-2671
✔ Valid
Country: US (United States), calling code +1
Type: landline or mobile
E.164: +14155552671
National: (415) 555-2671
RFC 3966 URI: tel:+14155552671
+91 98765 43210
✔ Valid
Country: IN (India), calling code +91
Type: mobile
E.164: +919876543210
National: 098765 43210
555-1234
✘ Invalid (wrong length for this country)
The last line fails because US numbers need a three-digit area code. North American numbers are reported as "landline or mobile" because their ranges do not separate the two, while countries like India and the UK use distinct mobile prefixes.
Options explained
Default country only applies to numbers written in national format, without a leading +. A number such as +49 30 901820 is always parsed as German, whatever the default is. If you choose Detect from +code, national numbers cannot be placed and report "unknown country", which is a quick way to find entries in a list that are missing their country code.
Extensions written as ext. 204 or x204 are recognized and shown on their own line, so they do not break the main number.
Why store numbers in E.164?
E.164 is the international standard form: a plus sign, the country calling code and the subscriber number, with no spaces or punctuation and at most 15 digits. Storing that single canonical form makes duplicates easy to spot, sorts cleanly, and is what SMS and voice APIs such as Twilio expect. Format for display only at the edges, using the international or national version this tool produces.
Common errors and fixes
- A leading 0 plus a country code. People often write
+44 (0)20…. The trunk prefix 0 is dropped in international form, and the parser handles this for you. - The international dialing prefix.
00(Europe) or011(North America) replace the plus sign when dialing abroad. Rewrite them as+before storing. - Letters in vanity numbers. A number like 1-800-FLOWERS is not translated; letters are dropped and it fails as too short. Enter the keypad digits instead.
- Fictional numbers. Many 555 numbers are reserved for film and TV, but the validator reports on numbering-plan rules, not on whether a line is in service.
Cleaning a whole contact export? Deduplicate it with remove duplicate lines after formatting everything to E.164, and check the email column with the email validator.
Privacy
Parsing and validation run entirely in your browser using a bundled copy of the metadata. The numbers you paste are never uploaded or stored.