Open developer data

Country phone number format dataset

Download calling codes, national patterns, E.164 examples, length notes and official-source links for the 31 countries currently supported by GetPhoneNum.

Download JSONDownload CSVView JSON Schema
Fixture data, not subscriber data: a structural example may coincide with an assigned number unless its authority explicitly reserves it. Never call or text these values.

Cite or reuse the dataset

The dataset is available under the MIT license. When it supports documentation, research or an open-source project, link to this canonical page so readers can find the current version and official source notes.

GetPhoneNum country phone format fixtures, version 2026-07-20. https://getphonenum.com/phone-number-dataset

Source code, version history and corrections are available in the GitHub repository. Please report stale numbering rules through GitHub Issues with an official reference.

Validate the data contract

The public JSON Schema Draft 2020-12 contract defines required fields, ISO and E.164 patterns, value types and allowed record properties. Pin the dataset version in reproducible tests and validate updates before importing them.

npx ajv-cli validate -s country-phone-formats.schema.json -d country-phone-formats.json

Dataset fields

FieldMeaning
iso2ISO 3166-1 alpha-2 country code used by the tools.
callingCodeInternational E.164 country calling code.
nationalPatternHuman-readable national presentation pattern.
e164ExampleCanonical test fixture used in examples.
fixtureSafetyWhether the example is reserved or only structurally plausible.
sourceUrlOfficial numbering authority or international reference.

How to evaluate a fixture before using it

Start with the fixtureSafety field. If a record cites a reserved, drama or creative-work example, it is better suited for screenshots and public documentation. If a record is labelled structural, keep it in local or isolated QA environments and disable outbound delivery. The label is part of the data contract; do not strip it when importing the CSV into a spreadsheet or the JSON into a test factory.

Next, review the sourceUrl and the country guide linked below. Some sources describe a complete national plan, while others describe a specific example range. Those two source types support different claims. A national plan can justify formatting and length tests; it does not automatically make every generated value fictional.

For unit tests

Pin the dataset version and assert exact E.164 output. When the version changes, review affected countries instead of accepting every diff automatically.

For documentation

Copy the country, national pattern, E.164 example and safety note together. An isolated phone string loses the warning that tells readers not to call or text it.

For data imports

Keep generated fixtures separate from production contacts. Do not enrich them, upload them to messaging tools or mix them with customer records.

Included countries

Use in tests

Load the JSON into fixture factories or import the CSV into QA tools. Pin the version when reproducibility matters.

Check updates

National plans change. Follow each record's source URL and use a maintained numbering library for production validation.

Contribute a correction

Found a stale pattern or source? Use the contact link in the About page and include the official reference.