IP Address Validator |
IPv4 and IPv6; results update as you type. Up to 1,000 lines.
What Makes an IP Address Valid?
A valid IPv4 address has four numbers from 0 to 255 without leading zeros (192.168.1.1); a valid IPv6 address has up to eight hex groups with at most one ::. Paste one or a list to check them and see why any fail.
| IPv4 | IPv6 | |
|---|---|---|
| Parts | Exactly 4 numbers, separated by dots | 8 groups separated by colons, or fewer with one :: |
| Each part | Decimal 0-255, no leading zeros | 1 to 4 hex digits (0-9, a-f, case doesn't matter) |
| Shorthand | None in strict form | :: once for one or more zero groups |
| Extras | None | An IPv4 tail (::ffff:192.0.2.1) and a zone ID (fe80::1%eth0) are allowed |
| Not part of an address | Ports (:443), prefixes (/24), brackets and spaces | |
Why Is My IP Address Invalid?
The common causes are a number over 255, a leading zero, a missing or extra part, or two :: in IPv6.
The result names the exact problem, for example "Number 4 (256) is above 255", "Group 12345 has more than 4 hex digits" or ":: can appear only once". Other frequent ones: a port pasted with the address (192.168.1.1:80), a CIDR block (10.0.0.0/8, which the CIDR checker handles), or a version number with five parts (1.2.3.4.5).
Leading zeros get their own result, "not strictly valid": 192.168.01.1 is rejected by strict validators because some software reads 010 as octal (8), so the same text could mean two addresses.
Address Types
Valid doesn't mean public: 10.x is private, 127.x loopback, 100.64.x CGNAT, 192.0.2.x documentation.
| Example | Type | Defined in |
|---|---|---|
10.1.2.3, 192.168.1.1, fd00::1 | Private network | RFC 1918, RFC 4193 |
127.0.0.1, ::1 | Loopback | RFC 1122, RFC 4291 |
100.64.0.1 | Shared address space (carrier-grade NAT) | RFC 6598 |
169.254.1.1, fe80::1 | Link-local | RFC 3927, RFC 4291 |
192.0.2.1, 2001:db8::1 | Documentation | RFC 5737, RFC 3849 |
224.0.0.1, ff02::1 | Multicast | RFC 5771, RFC 4291 |
0.0.0.0, :: | Unspecified | RFC 1122, RFC 4291 |
The validator uses the full IANA special-purpose registries; the public or private IP checker explains each type.
Validate IP Addresses in Code
Use your language's address parser rather than a regular expression; each of these rejects leading zeros and two ::.
| Language | Code |
|---|---|
| Python | ipaddress.ip_address(s) raises ValueError when invalid; accepts zones like fe80::1%eth0. |
| Go | netip.ParseAddr(s) returns an error naming the problem, such as "IPv4 field has octet with leading zero". |
| Node.js | net.isIP(s) returns 4, 6, or 0 when invalid. Browsers have no built-in check. |
| Java | InetAddressValidator.getInstance().isValid(s) (Apache Commons Validator). Avoid InetAddress.getByName(s) for validation: it can trigger a DNS lookup. |
A strict IPv4 regular expression, for when you have nothing else:
^(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}$
It agrees with this page on every IPv4 input we tested. For IPv6, a regular expression that handles every :: position and IPv4 tail is long and error-prone; use a parser.
How This Tool Works
| Item | Detail |
|---|---|
| Where it runs | In your browser; nothing is sent to our server. |
| Rules | IPv4: four decimal numbers 0-255, leading zeros flagged. IPv6: every RFC 4291 text form, including dotted IPv4 tails and zone IDs. |
| Type | From the IANA special-purpose address registries. |
| Normalised form | IPv6 in RFC 5952 canonical form; "Copy" copies only the valid addresses, normalised. |
| Shareable link | ?ip= followed by an address opens the page with it checked. |
| Stored | Nothing. |
| Last verified | 10 November 2026 |
Frequently Asked Questions
How do I know if an IP address is valid?
Is 192.168.01.1 a valid IP address?
Is 0.0.0.0 a valid IP address?
What makes an IPv6 address invalid?
Next steps