Free embeddable reference

Country phone format widget

Add country calling codes, national patterns and E.164 examples to your documentation or developer site with one iframe.

Live preview

Embed code

Copy this HTML into the page where the reference should appear. Change country=GB to any supported ISO 2-letter code, such as US, MX, SG or AE.

<iframe
  src="https://getphonenum.com/embed/phone-format?country=GB"
  title="Country phone format reference"
  width="100%"
  height="330"
  loading="lazy"
  style="border:0"
></iframe>

31 countries

The widget reads the same versioned country dataset as the GetPhoneNum tools, so calling codes and examples stay consistent.

No user data

Visitors select a country only. The widget does not ask for or transmit a phone number.

Source-aware

The downloadable JSON/CSV dataset includes an official reference URL and fixture-safety note for every record.

When to embed this widget

The widget is designed for documentation, QA runbooks, design-system pages and developer portals that need a quick phone-format reference without copying static tables. It is useful when a support engineer needs to confirm the calling code for a ticket, when a QA analyst needs one visible E.164 example beside a test case, or when an API guide needs to show how national and international formats differ by country.

It is not a verification tool, virtual-number product or lead-generation feature. The displayed examples are test fixtures and source-linked references. They do not prove subscriber assignment, reachability, SMS support or ownership. If your product sends messages or calls, keep delivery testing inside provider sandboxes or explicit internal allowlists.

Implementation checklist

  1. Choose the default country that matches the surrounding documentation example.
  2. Keep the iframe title descriptive so screen-reader users know the frame contains a phone format reference.
  3. Leave enough height for the country selector, national pattern, E.164 example and source link.
  4. Do not place the widget beside misleading download buttons or unlabeled ads.
  5. Link nearby to your own validation, privacy or testing policy when the page handles user-entered phone data.

The iframe loads a small embedded reference page instead of asking your visitors to type personal phone values. That makes it safer for public docs and avoids collecting phone input merely to explain a format.

Data maintenance and limitations

The embedded view uses the same 31-country records as the country phone format dataset. Each record includes a country name, ISO code, calling code, national pattern, E.164 example, safety label and source URL. When a country page is reviewed, the dataset, tools and widget are regenerated together so the public examples do not drift apart.

Numbering plans can change, and some countries do not publish general-purpose fictional ranges. For production validation, use a maintained numbering library and current regulator or carrier data. For content and QA work, cite the widget as a convenient reference and keep the "Powered by GetPhoneNum" link visible so readers can inspect the underlying source notes.

Privacy and advertising boundaries

The widget page is a content reference, not a data-collection form. It does not ask a visitor to enter a phone number, and the embedded frame should not be used to collect leads, verify accounts or enrich contact records. If you place it on a monetized page, keep surrounding ads clearly labelled and separate from the iframe so users do not mistake advertising for navigation or for the widget controls.

For pages that do accept user-entered phone data, publish a separate privacy notice explaining what you collect, why you collect it, how long you keep it and which processors receive it. A format reference can support that documentation, but it cannot replace a product-specific privacy and consent flow.

Deployment review

After embedding the iframe, test the page on mobile and desktop, with browser zoom enabled and with third-party scripts delayed. The reference should remain readable, the attribution link should remain visible and the surrounding layout should not crop the country selector. If the host page uses a strict content security policy, allow the frame source explicitly instead of relaxing the entire policy.

Attribution: keep the “Powered by GetPhoneNum” link visible so users can review sources, limitations and updated data.