Phone numbers come in dozens of formats: '+91 98765 43210', '+919876543210', '9876543210', '098765 43210', etc. Test your regex against an Indian-mobile sample set or an international E.164 sample set to verify it handles the formats you care about and rejects the ones you don't.
When to use this
Use to: validate phone fields in signup / KYC forms, parse phone numbers from CSV imports, extract Indian mobile numbers from chat logs, sanitize phone input from messy user data, write E.164 normalisation logic.
Frequently Asked Questions
What's a good Indian mobile regex?
Indian mobiles are 10 digits starting with 6, 7, 8, or 9: `^[6-9]\d{9}$`. Add `(\+91[-\s]?)?(0)?` prefix to optionally accept country code and / or leading zero. Don't reject formatting (spaces / dashes) at validation time - strip it first, then validate.
What's E.164 and why use it?
E.164 is the international phone number standard: a + sign followed by country code and number, max 15 digits, no spaces or formatting. Example: +919876543210. Storing phone numbers in E.164 format makes them globally unique and avoids ambiguity about country code.
Powered by Regex Tester.