The 50-country table
The Mobile NSN column is the digit count you should expect after the country code, with the trunk prefix already removed. The two right-hand columns show the same libphonenumber example number twice: once the way a person in that country dials it, once the way it goes into E.164.
| Country | Code | Trunk | Mobile NSN | National form | E.164 |
|---|---|---|---|---|---|
| India | +91 | 0 | 10 | 081234 56789 | +918123456789 |
| United States | +1 | 1 | 10 | (201) 555-0123 | +12015550123 |
| Indonesia | +62 | 0 | 9 | 0812-345-678 | +62812345678 |
| Pakistan | +92 | 0 | 10 | 0301 2345678 | +923012345678 |
| Morocco | +212 | 0 | 9 | 06 50 12 34 56 | +212650123456 |
| Bangladesh | +880 | 0 | 10 | 01812-345678 | +8801812345678 |
| Iran | +98 | 0 | 10 | 0912 345 6789 | +989123456789 |
| United Kingdom | +44 | 0 | 10 | 07400 123456 | +447400123456 |
| Philippines | +63 | 0 | 10 | 0905 123 4567 | +639051234567 |
| Nigeria | +234 | 0 | 10 | 0802 123 4567 | +2348021234567 |
| Netherlands | +31 | 0 | 9 | 06 12345678 | +31612345678 |
| Ukraine | +380 | 0 | 9 | 050 123 4567 | +380501234567 |
| Egypt | +20 | 0 | 10 | 010 01234567 | +201001234567 |
| Germany | +49 | 0 | 11 | 01512 3456789 | +4915123456789 |
| Canada | +1 | 1 | 10 | (506) 234-5678 | +15062345678 |
| China | +86 | 0 | 11 | 131 2345 6789 | +8613123456789 |
| Vietnam | +84 | 0 | 9 | 0912 345 678 | +84912345678 |
| Russia | +7 | 8 | 10 | 8 (912) 345-67-89 | +79123456789 |
| Algeria | +213 | 0 | 9 | 0551 23 45 67 | +213551234567 |
| Brazil | +55 | 0 | 11 | (11) 96123-4567 | +5511961234567 |
| Malaysia | +60 | 0 | 9 | 012-345 6789 | +60123456789 |
| Turkey | +90 | 0 | 10 | 0501 234 56 78 | +905012345678 |
| Australia | +61 | 0 | 9 | 0412 345 678 | +61412345678 |
| Singapore | +65 | — | 8 | 8123 4567 | +6581234567 |
| Italy | +39 | — | 10 | 312 345 6789 | +393123456789 |
| Poland | +48 | — | 9 | 512 345 678 | +48512345678 |
| France | +33 | 0 | 9 | 06 12 34 56 78 | +33612345678 |
| Uganda | +256 | 0 | 9 | 0712 345678 | +256712345678 |
| United Arab Emirates | +971 | 0 | 9 | 050 123 4567 | +971501234567 |
| Myanmar | +95 | 0 | 8 | 09 212 3456 | +9592123456 |
| Thailand | +66 | 0 | 9 | 081 234 5678 | +66812345678 |
| Mexico | +52 | — | 10 | 222 123 4567 | +522221234567 |
| Ethiopia | +251 | 0 | 9 | 091 123 4567 | +251911234567 |
| Saudi Arabia | +966 | 0 | 9 | 051 234 5678 | +966512345678 |
| Kenya | +254 | 0 | 9 | 0712 123456 | +254712123456 |
| Spain | +34 | — | 9 | 612 34 56 78 | +34612345678 |
| South Africa | +27 | 0 | 9 | 071 123 4567 | +27711234567 |
| Israel | +972 | 0 | 9 | 050-234-5678 | +972502345678 |
| Japan | +81 | 0 | 10 | 090-1234-5678 | +819012345678 |
| South Korea | +82 | 0 | 10 | 010-2000-0000 | +821020000000 |
| Hong Kong SAR China | +852 | — | 8 | 5123 4567 | +85251234567 |
| Ghana | +233 | 0 | 9 | 023 123 4567 | +233231234567 |
| Greece | +30 | — | 10 | 691 234 5678 | +306912345678 |
| Iraq | +964 | 0 | 10 | 0791 234 5678 | +9647912345678 |
| Jordan | +962 | 0 | 9 | 07 9012 3456 | +962790123456 |
| Cambodia | +855 | 0 | 8 | 091 234 567 | +85591234567 |
| Ireland | +353 | 0 | 9 | 085 012 3456 | +353850123456 |
| Romania | +40 | 0 | 9 | 0712 034 567 | +40712034567 |
| Switzerland | +41 | 0 | 9 | 078 123 45 67 | +41781234567 |
| Uzbekistan | +998 | — | 9 | 91 234 56 78 | +998912345678 |
Sorted by search impressions for this site, not by country code. A dash in the Trunk column means the country has no trunk prefix at all.
What each column means
Three numbers describe one phone line, and mixing them up is where most bad data starts.
- Trunk prefix is the digit residents dial before the area or mobile code when calling inside the country. It exists only for domestic dialling. It is not part of the international number, and it is not part of the number stored in your database.
- NSN (national significant number) is everything after the country code, with the trunk prefix removed. This is the part that has a length requirement, and it is the number E.164 is built from.
- E.164 is a plus sign, the country code, then the NSN, with nothing else: no brackets, no spaces, no dashes, no leading zero.
Take India, the first row. A subscriber dials 081234 56789. The NSN is 8123456789, ten digits. The stored and transmitted form is +918123456789. Three representations, one line.
The rule that catches people is the leading zero. 42 of these 50 countries use one, and it disappears the moment the number leaves the country. Databases that keep it end up with numbers one digit too long, which is why a validator that only counts digits rejects records that were perfectly good before import.
Five ways a list breaks on this table
These are the failure modes that survived a run over all 50 rows, written down because each one produces a different error message and a different fix.
1. A prefix hidden inside brackets
Pakistan prints the national form as (021) 23456789. Strip every non-digit and you get eleven digits starting with a zero that should not be there. The bracket placement moves the trunk prefix from the front of the string to the inside of a group, so a rule that says "remove a leading 0" no longer matches. Parse first, then strip.
2. Shared country codes
7 rows here share a calling code with another territory. +1 on its own covers 25 regions, and the North American Numbering Plan puts the area code inside the NSN, so a US number is ten digits with no separate area code field. +44 covers four, +61 three, +7, +212 and +39 two each. If your import only records the calling code, you cannot tell which country you have, and validation against the wrong national rule fails on real numbers.
3. Open numbering plans
12 of the 50 have no single fixed-line length: ID, BD, IR, PH, DE, CN, IT, MM, KE, IL, KR, IE. Germany is the extreme, accepting anything from 5 to 15 digits depending on the area code, because the area code consumes part of the subscriber number. A length check written against one German example will reject valid numbers from a different Land. Check length against the allocated range, not a constant.
4. Mobile and fixed line the same length
In 22 of the 50, the mobile and fixed-line length ranges are identical. The digit count tells you nothing about line type. Line type comes from the numbering range or from a carrier lookup, never from length, and this is the assumption behind most "we classified it ourselves" bugs in lead scoring.
5. Ten countries where mobile length is not one number
ID, NL, DE, BR, MY, IT, MM, ZA, KR, KH accept more than one mobile length. Brazil is the familiar case: the extra 9 that was added to mobile numbers in the 2010s still leaves both forms in circulation. A regex anchored on a single length silently drops the other half of the list.
How it was built
The numbers here are not copied from a directory or retyped from memory. They come from the metadata bundle in libphonenumber, Google's phone number library, version 9.0.41. For each of the 50 regions the build reads the calling code, the national prefix, the possible lengths per line type, and the canonical example number, then formats that example in national and E.164 form.
Each row then runs eight checks, and the page only publishes a row when all eight pass:
- the mobile example is valid under the metadata
- the mobile example classifies as mobile
- parsing the E.164 string and formatting it back reproduces the published national form
- the mobile example's length sits inside the declared set
- the declared typical mobile length lies inside the accepted range
- the fixed-line example is valid under the metadata
- the fixed-line example classifies as fixed line
- the declared typical fixed-line length lies inside the accepted range, where a typical value is published
400 checks across 50 rows, 0 failures. The typical-length check exists because the first build of this page failed it: three rows published a typical length one digit longer than the validator accepts, because the national format wrapped the trunk prefix inside brackets and the digit count picked it up. That is the sort of error a hand-made table carries for years.
What this table does not tell you: whether a specific number is allocated, active, or still belongs to the carrier you expect. Format is the floor, not the answer. For the difference, read possible versus valid.
The generator lives in tools/build-phone-format-dataset.py, so the whole page can be rebuilt against a newer metadata bundle in one command.
CSV and field notes
The table on this page is a subset. The download carries the same 50 rows plus the fields a build needs: accepted ranges per line type, the national-format mask, the fixed-line example, and a per-country note recording the trunk-prefix behaviour.
phone-number-formats.csv — 50 rows, UTF-8, comma separated.
| Field | Meaning |
|---|---|
iso | ISO 3166-1 alpha-2 region code |
calling_code | E.164 country calling code, with the plus sign |
trunk_prefix | Domestic dialling prefix, empty when the country has none |
mobile_nsn_typical | Digits in the canonical mobile example, after the country code |
mobile_nsn_accepted | Range the validator accepts, which can be wider than typical |
fixed_nsn_typical | Empty where the plan is open and no single length applies |
mobile_mask | Grouping of the national form, digits replaced by X, trunk prefix kept literal |
shared_with | Filled when the calling code is used by more than one region |
checks_passed | Self-test result for the row, e.g. 8/8 |
notes | Trunk-prefix behaviour and plan quirks, pipe separated |
Attribution: metadata from Google libphonenumber, Apache-2.0. The example numbers are that project's canonical examples, not real subscribers.
FAQ
Does a number that matches this format actually exist?
No. This table tells you what a number from a country looks like when it is well formed. Whether it is allocated, active, or still owned by the carrier is a separate question, and it is the one that possible versus valid answers. A number can pass every rule on this page and still be disconnected.
Why is there no single fixed-line length for some of these countries?
Because those countries run open numbering plans, where the area code takes part of the subscriber number's digits. 12 of the 50 work this way. Germany is the clearest case: a Berlin number under area code 30 has a different total length from a five-digit rural area code. The mobile column is stable in every one of the 50 countries, which is why it is the column this table publishes.
Which countries here have no trunk prefix at all?
8 of the 50: SG, IT, PL, MX, ES, HK, GR, UZ. In those countries the number you dial domestically is the same digit string that goes into E.164, so the usual advice to "drop the leading zero" is the wrong instruction and will shorten the number.
Can I redistribute this table?
The lengths, prefixes and formats come from Google's libphonenumber metadata, which is Apache-2.0 licensed. The CSV is a derived extract, so the same licence applies: keep the attribution and you can reuse it. The example numbers are libphonenumber's canonical examples, not real subscribers.
How current is it, and what breaks first?
This snapshot was generated against libphonenumber 9.0.41 on 2026-10-21. Lengths and trunk prefixes change rarely; what moves faster is area-code splitting and mobile range reallocation. A range that was mobile last year can be reassigned, so re-run the source before you hard-code a prefix table into production.
Related
- E.164 phone number format — converting and validating the stored form
- Possible versus valid — why a well-formed number can still be dead
- How to validate phone numbers, step by step — the full pipeline
- Phone validation API — running the same checks at volume