Blog
Phone number formats by country: trunk prefixes, lengths and writing styles
How phone numbers are written in the US, UK, France, Germany, Brazil, Japan and more: trunk prefixes, dialing prefixes, lengths and the traps for forms.
Updated 2026-11-24
There is no common way to write a phone number. ITU-T Recommendation E.164 fixes only the frame: a country calling code of one to three digits, then a national number, with 15 digits at most in total. Everything inside that frame is a national decision: how many digits, how they are grouped, which leading digit marks a mobile line and whether you dial an extra digit before the number at home. A form that works in one country because it assumes its plan fails in every other, and that is where most phone validation bugs start.
The frame everyone shares
An international number has two parts.
| Part | What it is | Example |
|---|---|---|
| Country calling code | One to three digits that name a country or a shared plan | 44 for the United Kingdom, 1 for the North American plan |
| National (significant) number | What identifies a line inside the country, without any dialing prefix | 7400123456 |
Written together with a plus sign, they form the E.164 number: +447400123456. The plus sign stands for the international dialing prefix of the country the caller is in. A person in the US dials 011 to start an international call, and a person in the UK dials 00, so a printed + works from both. E.164 explained covers the storage side.
Three kinds of prefix that confuse forms
- The international prefix is what you dial to leave your country. The
libphonenumber-jsmetadata lists011for the United States,00for the United Kingdom, France, Germany, Spain and India,010for Japan and0011as the default for Australia. - The trunk prefix, or national prefix, is what you dial before a national number to call inside the country. It is
0in the UK, France, Germany and Japan, and1in the US and Canada for long distance. It is not part of the number and does not appear in E.164. - The country calling code is the part that stays.
Mixing them up is the commonest mistake. A French user types 06 12 34 56 78. The 0 is the trunk prefix. In E.164 the number is +33612345678, with the 0 gone.
The UK and a few other countries print both forms on purpose: +44 (0) 7400 123456 shows that the 0 is used at home and dropped from abroad. A parser removes the bracketed 0: we ran parsePhoneNumber('+44 (0) 7400 123456') in libphonenumber-js 1.13.17 and it returned +447400123456.
Mobile numbers in sixteen countries
The table lists the example mobile number the libphonenumber-js metadata gives for each country, in the national and international style it prints. The examples are metadata samples, not real subscribers. The last column is the length of the national number in the example.
| Country | Example, national style | International style | Digits in the national number |
|---|---|---|---|
| United States | (201) 555-0123 |
+1 201 555 0123 |
10 |
| United Kingdom | 07400 123456 |
+44 7400 123456 |
10 |
| France | 06 12 34 56 78 |
+33 6 12 34 56 78 |
9 |
| Germany | 01512 3456789 |
+49 1512 3456789 |
11 |
| Spain | 612 34 56 78 |
+34 612 34 56 78 |
9 |
| Italy | 312 345 6789 |
+39 312 345 6789 |
10 |
| Netherlands | 06 12345678 |
+31 6 12345678 |
9 |
| Switzerland | 078 123 45 67 |
+41 78 123 45 67 |
9 |
| Poland | 512 345 678 |
+48 512 345 678 |
9 |
| Brazil | (11) 96123-4567 |
+55 11 96123 4567 |
11 |
| India | 081234 56789 |
+91 81234 56789 |
10 |
| Japan | 090-1234-5678 |
+81 90 1234 5678 |
10 |
| Australia | 0412 345 678 |
+61 412 345 678 |
9 |
| New Zealand | 021 123 4567 |
+64 21 123 4567 |
9 |
| Argentina | 011 15-2345-6789 |
+54 9 11 2345 6789 |
11 |
| Mexico | 222 123 4567 |
+52 222 123 4567 |
10 |
In the United States and Mexico, the example type comes back FIXED_LINE_OR_MOBILE, since those plans do not separate the two. The rest are mobile.
Look at what varies: the grouping, the separators (spaces, dashes, brackets), whether a trunk 0 leads the national form, and the length from 9 to 11 digits for one line type. A single regular expression cannot describe that.
Lengths: what the metadata says
Plans set which lengths are allowed. These are the national number lengths the libphonenumber-js metadata lists as possible for each country, across all line types.
| Country | Possible national lengths |
|---|---|
| United States | 10 |
| France | 9 |
| Spain | 9 |
| Mexico | 10 |
| Switzerland | 9 and 12 |
| Argentina | 10 and 11 |
| United Kingdom | 7, 9 and 10 |
| Germany | 4 to 15 |
| Japan | 8 to 17 |
Germany and Japan show why a fixed length rule breaks: the length varies with the area and the line type. A length check in your own code needs per-country data, and that is what libphonenumber compiles. Length is also only the first test: +44 7400 12345 has a legal UK length of nine digits and is still not a valid UK mobile number, because the plan says numbers starting with 7 have ten.
Country by country traps
United States and Canada
Both sit in the North American Numbering Plan, behind +1, with the same ten-digit structure: a three-digit area code, a three-digit exchange and four digits for the line. The area code and the exchange start with 2 to 9. So +1 alone does not name a country, and the area code decides whether a number is American, Canadian or Caribbean. People may type a leading 1 before a US number, which is the trunk prefix.
United Kingdom
The trunk 0 and the optional (0). UK mobile numbers start with 07 nationally, so +44 7.... In the metadata, the fictional drama range 07700 900000 to 07700 900999 is rejected as invalid, which is a good test case.
France and other countries with a trunk 0
06 and 07 open mobile numbers nationally, and the 0 goes in E.164. Digits are grouped in pairs.
Italy
Italy keeps the leading zero of a landline number inside the number. We parsed +39 06 1234 5678 and the national number was 0612345678, so the 0 stays in E.164 for Italian landlines. A tool that strips every leading zero corrupts those numbers. Mobile numbers begin with 3.
Argentina
A mobile number carries an extra 9 after the country code when dialed from abroad: +54 9 11 2345 6789. Domestically, a mobile may be written with a 15 after the area code. We parsed 011 15 1234-5678 with country AR and got +5491112345678, with the 15 and the trunk digit removed and the 9 added.
Mexico
In the metadata we used, +52 55 1234 5678 is valid and +52 1 55 1234 5678, the old form with a 1 after the country code, is not. If your records hold old Mexican numbers in the longer form, expect them to fail against current data and normalize them.
Brazil
Mobile numbers have 11 digits: a two-digit area code, then nine digits starting with 9. In the metadata we used, +55 11 1234 5678, with eight digits after the area code, is not valid, and +55 11 91234 5678 is a valid mobile number. The international prefix is complicated by carrier selection codes. The metadata lists a pattern for it instead of one value.
Germany
Lengths vary from 4 to 15 digits in the metadata, so never apply a fixed length. German area codes also vary in length.
Japan
The trunk 0 is written in national numbers, such as 090-1234-5678. The international prefix is 010.
What a form should do
- Use one input and a country selector. Split fields fit one plan and break for the rest.
- Default the country from the visitor, such as locale or IP country, and let them change it. A fixed
USdefault fails every non-US number typed at home. IP geolocation accuracy explains how far to trust the location. - Accept any common format. Strip spaces, dashes, dots and brackets, and set an extension apart.
- Parse with the selected country and show the national format back so the person can check it.
- Store E.164 in a text column, with the country.
- Show an example number for the selected country when validation fails.
The phone number formatter shows any number in each style, and the country calling codes tool lists the codes. The country codes pages go through each plan, and format phone numbers to E.164 in Excel handles an existing sheet.
Check a number with the API
Send what the person typed and the country they picked:
curl https://api.qelka.com/v1/phone \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"phone": "06 12 34 56 78", "country": "FR"}'
The response has status: "valid", e164: "+33612345678", national: "06 12 34 56 78" and line_type: "mobile". Without country, the same digits return status: "unknown", because without a + there is no way to know which plan applies. A number written with the 00 international prefix is read like one that starts with +. A basic check costs 1 credit. See the phone API reference, and the phone validation API page for volumes.
Where to go next
- Phone number validation for the layers behind a check.
- libphonenumber: what Google's library knows for the data behind these tables.
- US phone prefixes: who holds them for the North American plan in numbers.
- Area codes for the US and Canada.
Frequently asked questions
Why do phone numbers look so different between countries?
What is a trunk prefix and why does it disappear in international format?
07400 123456 in the UK or the 1 before a US long-distance number. It belongs to national dialing, not to the number, so it is dropped in E.164: +447400123456. Writing +44 (0) 7400 123456 shows both forms. A parser removes the extra 0.How many digits is a phone number?
Should I split a phone number into several form fields?
How do I write a phone number so it works everywhere?
+44 7400 123456. The plus sign stands for the international dialing prefix of the caller's country, so the number dials correctly from anywhere. Spaces are only for readability, and E.164 itself has none.Why does a French or British number fail in my US-only form?
06 12 34 56 78 is a valid French mobile and has no meaning as a US number. Default to the visitor's country, let them change it, and accept the + form for any country.Put this check in your product
Get an API key in under a minute. 100 free credits every month, no card required.
- 100 free credits a month
- No card
- Test keys spend nothing
- Cancel any time