Calling codes have variable length
Geographic country calling codes contain one to three digits. A parser must match an assigned code from maintained metadata rather than slicing a fixed number of characters. The leading plus sign indicates that the following digits begin with an international code.
Look up the 20 currently supported plans with the calling-code tool or download the JSON/CSV dataset.
One calling code can cover multiple countries
The North American Numbering Plan uses +1 across the United States, Canada and several Caribbean countries and territories. Country context can require later numbering-plan digits or application knowledge. Do not label every +1 value as United States solely from the country code.
Remove trunk prefixes at the right stage
Many countries use a domestic access digit such as 0. It is normally removed when converting a national value to international E.164. Italy demonstrates why the rule cannot be global: a leading zero can be significant for geographic numbers. Parse with a country-aware library before modifying digits.
Do not confuse code, prefix and area
- Country calling code: selects an international numbering area.
- National destination or area code: routes within that plan.
- Trunk prefix: domestic dialing instruction, usually not part of E.164.
- International access prefix: local digits such as 00 or 011 that a user may dial instead of displaying
+.
Use current authoritative metadata
Calling-code assignments and national procedures are coordinated through the ITU, while national authorities manage subsequent digits. Consult the ITU dialing procedures registry and the regulator source linked in each GetPhoneNum country guide.