IP Address Validator

Check whether IP addresses are valid, see why not, and get each address's type.

IPv4 and IPv6; results update as you type. Up to 1,000 lines.

Result

192.168.01.1

Not strictly valid IPv4 address

Leading zero in "01": ambiguous, because some software reads it as octal (010 = 8). Strict validators reject it; write 192.168.1.1.

VersionIPv4
Normalised192.168.1.1
TypePrivate network (RFC 1918)
Reachable from the internetNo

More about this address type

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.

IPv4IPv6
PartsExactly 4 numbers, separated by dots8 groups separated by colons, or fewer with one ::
Each partDecimal 0-255, no leading zeros1 to 4 hex digits (0-9, a-f, case doesn't matter)
ShorthandNone in strict form:: once for one or more zero groups
ExtrasNoneAn IPv4 tail (::ffff:192.0.2.1) and a zone ID (fe80::1%eth0) are allowed
Not part of an addressPorts (: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.

ExampleTypeDefined in
10.1.2.3, 192.168.1.1, fd00::1Private networkRFC 1918, RFC 4193
127.0.0.1, ::1LoopbackRFC 1122, RFC 4291
100.64.0.1Shared address space (carrier-grade NAT)RFC 6598
169.254.1.1, fe80::1Link-localRFC 3927, RFC 4291
192.0.2.1, 2001:db8::1DocumentationRFC 5737, RFC 3849
224.0.0.1, ff02::1MulticastRFC 5771, RFC 4291
0.0.0.0, ::UnspecifiedRFC 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 ::.

LanguageCode
Pythonipaddress.ip_address(s) raises ValueError when invalid; accepts zones like fe80::1%eth0.
Gonetip.ParseAddr(s) returns an error naming the problem, such as "IPv4 field has octet with leading zero".
Node.jsnet.isIP(s) returns 4, 6, or 0 when invalid. Browsers have no built-in check.
JavaInetAddressValidator.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

ItemDetail
Where it runsIn your browser; nothing is sent to our server.
RulesIPv4: four decimal numbers 0-255, leading zeros flagged. IPv6: every RFC 4291 text form, including dotted IPv4 tails and zone IDs.
TypeFrom the IANA special-purpose address registries.
Normalised formIPv6 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.
StoredNothing.
Last verified10 November 2026

Frequently Asked Questions

How do I know if an IP address is valid?
Paste it above. IPv4 needs exactly four numbers from 0 to 255 without leading zeros; IPv6 needs up to eight groups of 1 to 4 hex digits, with "::" at most once.
Is 192.168.01.1 a valid IP address?
Not in strict form: the leading zero is ambiguous, because some software reads 01 or 010 as octal. Python, Go, Node.js and most validators reject it. Write 192.168.1.1.
Is 0.0.0.0 a valid IP address?
Syntactically yes, but it means "this network" or "any address" (for example a server listening on every interface) and isn't used as a host address.
What makes an IPv6 address invalid?
More than eight groups, a group with more than four hex digits, a character outside 0-9 and a-f, or "::" used twice.

Next steps

Related Tools

Public or Private IP Checker
Public, private or special-use: many addresses at once.
IP Extractor
Pull every IP address out of logs or any text.
IP Sorter
Sort and dedupe a list of IPv4 and IPv6 addresses.
Random IP Generator
Random public, private or documentation-safe IPs.