Parse, validate and format phone numbers. Get information about the phone number, like the country code, type, etc.
E.164 is the international telephone numbering standard. Numbers start with + followed by country code and subscriber number.
You can determine the country, region, carrier (sometimes), and type (mobile, landline, toll-free, etc.).
E.164: starts with +, followed by country code and number, no spaces or hyphens, max 15 digits (e.g. +14155551234). Storing in E.164 avoids parsing ambiguity, enables international compatibility, and is directly compatible with APIs like Twilio and AWS SNS.
Best practices: always store in E.164 format (+1234567890) including the country code, no spaces or dashes — this enables consistent global processing; format for display using libphonenumber according to the user's country; validate using libphonenumber (Google's open-source library with implementations in every major language) rather than writing your own regex; store as VARCHAR(20) in databases, not INT (leading zeros may be lost).