IPv4 Address Regex

Example:
^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$ Matches: ✓ 192.168.1.1 ✓ 10.0.0.1 ⚠ 999.999.999.999 (invalid but matches)
Basic IPv4 validation: ^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$. Note: This allows invalid IPs like 999.999.999.999. For strict validation, use a more complex regex or code.
Try Regex Lab →

FAQs

Does this validate IP ranges (0-255)?

No, this is a simple pattern. For strict 0-255 validation per octet, use a more complex regex or code validation.