Phone number regex pattern
Copy and test a JavaScript regex for approximate phone number matching, with examples, limitations, and a one-click link to the regex tester.
Phone number regex pattern
Validate whole value
Use anchors to check whether the complete value matches.
Regex: ^\+?[0-9()\-.\s]{7,20}$
Flags: -
Search in text
Find matching fragments inside a larger block of text.
Regex: (?:\+?\d[\d()\-.\s]{6,}\d)
Flags: g
Examples that match
+1 (555) 123-4567020 7946 0958
Examples that do not match
123phone-number
Limitations
Phone number matching is approximate and may find unrelated numeric fragments.
Tools in this category
- Base64 encoder / decoder
- Color contrast checker
- Color palette generator
- Configuration file converter
- Docker Compose analyzer
- Dockerfile analyzer
- Hash generator
- JSON Converter
- JSON formatter
- JWT encoder / decoder
- Number base converter
- Password generator
- Regex inspector
- Regex pattern library
- URL encoder / decoder
- UUID generator