Databases
Store one normalized representation to simplify deduplication and downstream processing.
Free developer tool
Paste an international number to detect its calling code, or choose a default country for national input. Processing happens locally in your browser.
Store one normalized representation to simplify deduplication and downstream processing.
Many SMS, voice and identity providers expect a leading plus sign followed by country code and national number.
Find records with missing country context, trunk prefixes or incorrect digit counts before import.
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.
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.
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.
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.
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.