Regex for Indian Phone Number
Regex Pattern
^(?:\+91[- ]?)?[6-9]\d{9}$Indian mobile number with optional +91 country code
Quick Answer
The regex pattern for indian phone number is `^(?:\+91[- ]?)?[6-9]\d{9}$`. Indian mobile number with optional +91 country code. This works in JavaScript, Python, Ruby, PHP, Java, and most regex engines that support PCRE syntax.
Test Examples
| Input | Result |
|---|---|
| 9876543210 | ✓ Matches |
| +91 9876543210 | ✓ Matches |
| +919876543210 | ✓ Matches |
| 1234567890 | ✗ No match |
| +91 5432109876 | ✗ No match |
| 987654321 | ✗ No match |
Code Examples
javascript
const regex = /^(?:\+91[- ]?)?[6-9]\d{9}$/;
const isValid = regex.test(value);python
import re
pattern = r'^(?:\+91[- ]?)?[6-9]\d{9}$'
if re.match(pattern, value):
print("valid")ruby
pattern = /^(?:\+91[- ]?)?[6-9]\d{9}$/
if value =~ pattern
puts "valid"
endphp
if (preg_match('/^(?:\+91[- ]?)?[6-9]\d{9}$/', $value)) {
echo "valid";
}java
String pattern = "^(?:\\+91[- ]?)?[6-9]\\d{9}$";
boolean isValid = value.matches(pattern);Frequently Asked Questions
Related Regex Patterns
US Phone Number
US phone number in common formats
International Phone (E.164)
Validates E.164 international format — + followed by 2-15 digits
UK Phone Number
UK mobile number with optional +44 country code
Email Address
Validates a standard email address format
Email (RFC 5322 Compliant)
RFC 5322 compliant email validation with label length limits
URL (HTTP/HTTPS)
Validates HTTP and HTTPS URLs