About this tool
Phone number regex patterns for E.164, India, US, UK and a loose international format, each with live testing and limitation notes.
This library provides copy-ready regular expressions for validating phone numbers in the formats developers actually meet: the ITU-T E.164 canonical form (+ and up to 15 digits), Indian 10-digit mobiles starting 6–9 per the TRAI numbering plan, US/Canada numbers under NANP rules, UK numbers with the Ofcom trunk-0 / +44 convention, and a loose 8–15-digit international catch-all. Every pattern has a live tester and an explicit list of what it cannot verify, so you know exactly what you are shipping.
Open Regex Library for Phone Numbers on AltFTool — it loads instantly in your browser.
Paste your code or data sample into the workspace.
Pick the format, conversion, or analysis you need.
Copy the polished result straight back into your project.
India's 6–9 first-digit rule, NANP's 2–9 area-code rule and the E.164 15-digit ceiling are encoded, not guessed.
Paste any number and instantly see whether the selected pattern accepts it before copying the regex.
Each pattern states what it cannot check — assignment, reachability, landlines, extensions — so validation gaps are known upfront.
^\+[1-9]\d{1,14}$ — a plus sign followed by 2 to 15 digits whose first digit is 1–9. E.164 is the ITU-T standard for international numbers, caps them at 15 digits, and is the format SMS and voice APIs such as Twilio require, so it is the right shape to store in your database.
Use ^(?:\+91[\s-]?|0)?[6-9]\d{4}[\s-]?\d{5}$ — an optional +91 or trunk 0, then 10 digits starting with 6, 7, 8 or 9, which is the current range for Indian mobiles under the DoT numbering plan. Note this rejects Indian landlines, which use an STD code plus a 6–8 digit subscriber number instead.
Because under the North American Numbering Plan neither the 3-digit area code nor the 3-digit exchange code may begin with 0 or 1 — those digits are reserved for trunk and operator prefixes. A correct NANP pattern therefore uses [2-9]\d{2} for both, which is why 115-555-2671 fails while 415-555-2671 passes.
No — regex can only confirm the digits fit a numbering-plan shape, not that the number is assigned, in service or reachable. For correctness beyond format, use a numbering-plan library like libphonenumber for country-specific length and range checks, and an OTP or call for actual verification.