Phone validation · Phone number formatter
Free tool
Phone Number Formatter and E.164 Converter
What you get
Get 100 free checks a monthNo credit card required.
Format a phone number.
Results never get a public URL.
Or try
Example: one number, three formats
Example data. A real result for +1 415 992 9960.
Valid
+1 415 992 9960
This number is valid. Store the E.164 version.
- 1
E.164: +14159929960
A plus, country code 1, then the 10-digit national number, no spaces. Store this one.
- 2
International: +1 415 992 9960
For showing the number to people in other countries.
- 3
National: (415) 992-9960
For showing the number inside the US.
E.164, international or national: which to use
| Format | Example | Use it for |
|---|---|---|
| E.164 | +14159929960 | Storing numbers, and sending them to SMS and voice APIs. |
| International | +1 415 992 9960 | Showing a number to people in other countries. |
| National | (415) 992-9960 | Showing a number inside one country. |
The rules behind E.164 are in the E.164 format guide.
Why a number shows as invalid
Trueguard still returns the formats when it can read the number. The reason says what is wrong with it.
| validity.reason | What it means |
|---|---|
unknownRange | The number does not match any range in its country. |
unallocatedRange | The number range has not been assigned to a carrier. |
fictionalRange | The number sits in a range set aside for fiction. |
ambiguousCountry | Without a country code we cannot tell which country the number is in. |
invalidCountryCode | The country code does not exist. |
tooShort | The number has too few digits. |
tooLong | The number has too many digits. |
invalidLength | The number has a length its country does not use. |
notANumber | The input is not written like a phone number. |
Leading zero in a national number
Many countries write a 0 in front of the national number. It is not part of the E.164 number. Take the UK number 07911 123456 with country GB. Trueguard returns +447911123456 as E.164, +44 7911 123456 as international and 07911 123456 as national. The input +44 07911 123456 gives the same E.164 result.
Convert phone numbers to E.164 in code
POST /v2/phone/validation, one number per request. Read format.e164, format.international and format.national, plus validity.isValid.
curl -X POST https://api.trueguard.io/v2/phone/validation \
-H "X-API-KEY: $YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"phone":"+14159929960"}'5 checks a day in the browser with no account. A free API key gives 100 checks a month with no card. Above that, the Standard plan is $49.99 a month for 20,000 checks, then $0.0025 a check. To format a list, send one request per number.
Questions about phone number formatting.
Anything missing? Contact support or read the documentation.
How do I convert a phone number to E.164 format?
Enter it above and Trueguard returns format.e164, for example +14159929960: a plus, the country code and the national number, with no spaces and no trunk zero. From your code, POST /v2/phone/validation returns the same field. 100 checks a month are free.
Do I need the country code to format a phone number?
Not if you pick the country in the tool or send country to the API. Otherwise start with + and the country code. A leading 00 is read as +. Without either, the number could belong to several countries.
Why does my phone number say invalid?
The number is too short, too long, has a length its country does not use, or sits in a range that is not assigned. Trueguard names the reason and still shows the formats when it can read the number.
What is the difference between international and E.164 format?
They use the same digits. International format adds spaces for reading, as in +1 415 992 9960. E.164 has none, as in +14159929960.
Should I store phone numbers with the plus sign?
Yes. Store the E.164 version with the +. It is one string per number with no spaces, and SMS and voice APIs expect it. The E.164 format guide covers the rules in full.
How do I remove the leading 0 when adding a country code?
Drop the 0 and put the country code in front. The UK number 07911 123456 becomes +447911123456. Pick the country in the tool or send country to the API and Trueguard does this for you. A +44 07911 123456 input gives the same E.164 result.
Can I format a list of phone numbers at once?
Not in the browser. Through the API, send one request per number. 100 checks a month are free, then $49.99 a month for 20,000 checks and $0.0025 a check after that.
Is my phone number stored when I use this tool?
Trueguard keeps a record of each free check: the number and its result. It is not published, and results never get a public URL.
More free tools
Format and validate numbers from your backend.
100 free checks a month, no card required.
Get your free API keyNo credit card required.

