.*
専用検証ツール

電話番号 正規表現オンラインバリデーター

国際電話番号および国内電話番号の正規表現パターンをリアルタイムでテスト。E.164標準、市外局番、ハイフン形式を高速検証。

Interactive Phone Validator
//
Valid Phone Number Format
Test CasesBatch evaluation

Mastering Phone Number Regular Expression Validation

Constructing a dependable phone validator regex or phone number validator regex requires knowing your target market. International SMS providers (Twilio, AWS SNS) require strict E.164 compliance, whereas local signup forms must permit user-friendly punctuation like dashes, periods, and parentheses.

Production Implementations

E.164 International (SMS & Telephony APIs)

// Matches: +14155552671, +442071838750, +919876543210
const E164_REGEX = /^\+[1-9]\d{1,14}$/;

Flexible North American (US & Canada)

// Matches: (415) 555-2671, 415-555-2671, +1-415-555-2671, 4155552671
const US_PHONE_REGEX = /^(\+1[-.\s]?)?(\(?\d{3}\)?)[-.\s]?\d{3}[-.\s]?\d{4}$/;

Phone Number Regex Validation FAQ

What is the E.164 phone number standard in regex?

The ITU-T E.164 standard format is: /^\+[1-9]\d{1,14}$/. It requires a leading plus sign followed by 1 to 15 digits without spaces, hyphens, or parentheses.

How do I validate North American (US/Canada) phone numbers?

A standard NANP (North American Numbering Plan) regex is: /^(\+1[-.\s]?)?(\(?\d{3}\)?)[-.\s]?\d{3}[-.\s]?\d{4}$/. It supports optional country code (+1), area code with or without parentheses, and separator flexibility.

Should I strip formatting before validating phone numbers?

Yes, best practice in modern engineering is to sanitize user input by stripping spaces, dashes, and parentheses, then validating against E.164, and finally formatting for display.