Back to Library
Validation

IPv4 Address

Matches valid IPv4 addresses.

Pattern
^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$

Test Cases

192.168.1.1 Match
256.256.256.256 No Match

Try it Live

Test and customize this pattern in our interactive editor

Open in Editor