validation

Indian Mobile Number Regex Pattern

Validates Indian mobile numbers. Mobile numbers in India are 10 digits and must start with 6, 7, 8, or 9 (per TRAI allocation). Country code +91 is optional.

/^(\+?91[\s-]?)?[6-9]\d{9}$/

What each part matches

^(\+?91[\s-]?)? — optional '+91' or '91' with optional separator
[6-9] — first digit must be 6, 7, 8, or 9
\d{9}$ — 9 more digits

✓ These match

  • +91 9876543210
  • 919876543210
  • 9876543210
  • 8123456789

✗ These don't

  • +91 5876543210
  • 98765432101
  • 1234567890
  • 5123456789

Use in your code

JavaScript

const re = /^(\+?91[\s-]?)?[6-9]\d{9}$/;
re.test(input); // → true or false

Python

import re
re.fullmatch(r"^(\+?91[\s-]?)?[6-9]\d{9}$", input)

PHP (PCRE)

preg_match('/^(\+?91[\s-]?)?[6-9]\d{9}$/', $input);

Go

re := regexp.MustCompile(`^(\+?91[\s-]?)?[6-9]\d{9}$`)
re.MatchString(input)

FAQ

Does this indian mobile number regex work in JavaScript?
Yes. Every pattern in the Utilko regex library is tested to work in JavaScript RegExp, PCRE (PHP, Nginx), and Python `re`. Where flavor matters (lookbehind, named groups), the pattern page flags it.
How do I use this pattern?
Copy the pattern from the code block above. In JavaScript: new RegExp('^(\+?91[\s-]?)?[6-9]\d{9}$') or literal /^(\+?91[\s-]?)?[6-9]\d{9}$/. Or click "Try in regex tester" to open it pre-loaded in Utilko's browser-based regex tester.
Should I use this for security-critical validation?
Client-side regex is fine for UX (immediate feedback on a form). For anything security-critical — payments, auth, data integrity — always re-validate server-side using the same pattern PLUS domain-specific checks (Luhn checksum for cards, actual email delivery test, DNS resolution for domains).

Related regex patterns

← All regex patterns · Regex tester · Regex cheat sheet