In depth
Real results for 12 numbers
Each row below was classified by the checker. Numbers that are not valid in their country are left out, so you only see types that the library actually returned.
| Number | Country | Type |
|---|---|---|
| +44 7400 123456 | United Kingdom | Mobile |
| +44 20 7946 0958 | United Kingdom | Fixed line |
| +1 800 555 0199 | United States | Toll-free |
| +1 213 373 4253 | United States | Fixed line or mobile |
| +49 151 23456789 | Germany | Mobile |
| +33 6 12 34 56 78 | France | Mobile |
| +44 909 879 0123 | United Kingdom | Premium rate |
| +44 845 46 47 | United Kingdom | Premium rate |
| +44 70 1234 5678 | United Kingdom | Personal number |
| +44 56 1234 5678 | United Kingdom | VoIP |
| +61 412 345 678 | Australia | Mobile |
| +91 98765 43210 | India | Mobile |
What to do with each type
The type matters for what you plan to do with the number.
- Mobile: the type most likely to receive a text message, so use it for verification codes and text alerts.
- Fixed line: a landline. Good for voice calls and business contact. Most landlines cannot receive texts, though a few carriers support it.
- Fixed line or mobile: the country does not separate the two, as in the US and Canada. You cannot tell from the number alone, so ask the user or try SMS.
- Toll-free: free for the caller. Fine to display as a contact number, but usually not a good target for text messages.
- Premium rate and shared cost: these cost money to call. Warn or block them in forms where users type their own number.
- VoIP: calls over the internet. Its ranges are marked only in some countries, so absence of VoIP in a result does not prove a number is a normal line.
Why the type needs the strict data
This tool uses the library's max data set. The default smaller min set has type data for only some countries: for the German mobile number +49 151 23456789 it returns nothing, while the max set returns Mobile. If your own code calls getType(), import from libphonenumber-js/max.
What the type does not tell you
The type comes from the range a number was first assigned from. A mobile number can be moved to another carrier, or turned into a virtual number, without changing range. Treat the type as a strong hint, not a guarantee.