Free developer tool

Phone number parser and E.164 formatter

Paste an international number to detect its calling code, or choose a default country for national input. Processing happens locally in your browser.

Parse or format a number

Structural parsing only: this tool uses the 31-country GetPhoneNum dataset and basic length rules. Shared plans such as +1 and +7 cannot identify one country from the calling code alone. It does not confirm assignment, reachability, line type or SMS capability.

When to use E.164

Databases

Store one normalized representation to simplify deduplication and downstream processing.

Communications APIs

Many SMS, voice and identity providers expect a leading plus sign followed by country code and national number.

QA and migrations

Find records with missing country context, trunk prefixes or incorrect digit counts before import.

How to read the formatted result

The E.164 value is the canonical storage form: a plus sign, the country calling code and the national significant number. The international and national display values are presentation forms for users. The RFC 3966 value is intended for tel: links. Keeping those outputs separate prevents a common bug where display punctuation is stored as identity or a link format is sent to an SMS provider.

Country context is essential for national input. A domestic prefix may need to be removed in one country and preserved in another. Shared calling plans also make automatic inference risky: +1 does not prove a value belongs to the United States, and +7 does not prove one country either. When the input begins with a plus sign, parse the international calling code first; when it does not, require a selected country.

Before storing

Save the original input long enough for correction, then store the normalized E.164 value as text. Do not use an integer column; leading plus signs, leading zeros in national display and extension data are meaningful.

Before sending

Repeat important checks on the server and verify user consent before any SMS or voice delivery. A formatting result does not prove that the number is assigned, reachable or controlled by the user.

Before logging

Record safe categories such as country, success state and error reason. Avoid sending full phone strings to analytics events, URLs, crash reports or routine application logs.

Related implementation guides

For a full production workflow, pair this formatter with the validation guide, international input UX guide and database design guide. For repeatable examples, use the country format dataset or the bulk fixture generator.