ToolNimba Browse

🌐 IP Address Validator (IPv4 and IPv6)

By ToolNimba Web Dev Team · Updated 2026-06-19

Enter an IP address above and press Validate.

This IP address validator checks whether a string is a genuine IPv4 or IPv6 address and tells you what kind it is. Paste an address, press Validate, and you will see the version (IPv4 or IPv6), and for IPv4 the class plus whether it is private, public, loopback, or reserved. For IPv6 it notes whether the address uses compressed "::" notation and shows the fully expanded form. Everything runs in your browser, so nothing is sent anywhere.

What is the IP Address Validator?

An IP (Internet Protocol) address is the numeric label that identifies a device on a network. There are two versions in use today. IPv4 is a 32-bit address written as four decimal numbers (octets) from 0 to 255 separated by dots, such as 192.168.1.1, giving about 4.3 billion possible addresses. IPv6 is a 128-bit address written as eight groups of four hexadecimal digits separated by colons, such as 2001:0db8:0000:0000:0000:0000:0000:0001, giving an effectively unlimited supply. Validating an address means checking that it follows these exact rules: the right number of parts, each part within range, and the correct separators.

Strict validation matters because almost-correct strings are common and dangerous. A leading zero like 192.168.01.1 is ambiguous (some systems read it as octal), 256.0.0.1 is out of range, and an IPv6 string with two "::" compressions is undefined because the parser cannot tell how many zero groups each one represents. This tool rejects all of those. For IPv4 it requires exactly four octets, each 0 to 255 with no leading zeros. For IPv6 it allows one "::" to compress a run of zero groups, allows an embedded IPv4 tail such as ::ffff:192.0.2.1, and otherwise expects eight valid hex groups.

Knowing the scope of a valid address is just as useful as knowing it is valid. IPv4 reserves whole ranges for special jobs: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 are private (RFC 1918) and never appear on the public internet, 127.0.0.0/8 is loopback (your own machine), and 169.254.0.0/16 is link-local (APIPA) assigned automatically when DHCP fails. IPv6 has parallel ranges: ::1 is loopback, fe80::/10 is link-local, fc00::/7 is unique local, and ff00::/8 is multicast. The tool labels these so you can tell at a glance whether an address is routable on the public internet or confined to a local network.

When to use it

  • Checking that a user-entered IP in a form or config file is actually well-formed before you store or use it.
  • Confirming whether an address is private, public, or loopback when debugging a network or firewall rule.
  • Validating IPv6 addresses, including compressed "::" forms, that are easy to mistype by hand.
  • Teaching or learning the difference between IPv4 and IPv6 notation and the reserved address ranges.

How to use the IP Address Validator

  1. Type or paste an IPv4 or IPv6 address into the input field.
  2. Press Validate (or just keep typing, it checks as you go).
  3. Read the verdict: valid or invalid, plus the version and scope.
  4. For IPv4, note the class and whether it is private or public. For IPv6, see the expanded form and whether it is compressed.
  5. Use the IPv4 sample or IPv6 sample buttons to see an example, or Clear to start over.

Formula & method

IPv4: four octets a.b.c.d, each an integer 0 to 255, no leading zeros. 32-bit value = a × 2²⁴ + b × 2¹⁶ + c × 2⁸ + d. IPv6: eight 16-bit groups in hexadecimal separated by colons, with at most one "::" compressing one or more all-zero groups.

Worked examples

Validate 192.168.1.1 and find its scope.

  1. Split on dots: 192, 168, 1, 1 (four octets, good).
  2. Each octet is between 0 and 255 with no leading zero, so the form is valid.
  3. Leading octet 192 is in the range 192 to 223, so it is Class C.
  4. It matches 192.168.0.0/16, which is private (RFC 1918).
  5. 32-bit value = 192×16777216 + 168×65536 + 1×256 + 1 = 3232235777.

Result: Valid IPv4, Class C, Private (RFC 1918), 32-bit value 3232235777.

Validate the compressed IPv6 address 2001:db8::1.

  1. There is exactly one "::", which is allowed (it stands for a run of zero groups).
  2. Left of "::" is 2001:db8 (two groups), right is 1 (one group).
  3. The "::" expands to fill 8 minus 3 = 5 zero groups in the middle.
  4. Expanded form is 2001:0db8:0000:0000:0000:0000:0000:0001.
  5. The prefix 2001:db8 is the documentation range (2001:db8::/32).

Result: Valid IPv6, compressed notation, expands to 2001:0db8:0000:0000:0000:0000:0000:0001.

Why is 256.100.50.25 rejected?

  1. Split on dots: 256, 100, 50, 25 (four parts, so the shape looks right).
  2. The first octet is 256, but each octet must be 0 to 255.
  3. 256 is out of range, so the whole address fails validation.

Result: Invalid IPv4: the first octet 256 exceeds the maximum of 255.

IPv4 address classes by leading octet

ClassLeading octet rangeTypical use
A0 to 127Very large networks
B128 to 191Medium networks
C192 to 223Small networks
D224 to 239Multicast
E240 to 255Reserved (experimental)

Common reserved IPv4 ranges and what they mean

RangeScopeNotes
10.0.0.0/8PrivateRFC 1918, not routed publicly
172.16.0.0/12PrivateRFC 1918, covers 172.16 to 172.31
192.168.0.0/16PrivateRFC 1918, common home routers
127.0.0.0/8LoopbackYour own machine (localhost)
169.254.0.0/16Link-localAPIPA, auto-assigned when DHCP fails
100.64.0.0/10SharedCarrier-grade NAT (RFC 6598)

Common reserved IPv6 ranges

PrefixScopeNotes
::1/128LoopbackEquivalent to IPv4 127.0.0.1
::/128UnspecifiedNo address assigned
fe80::/10Link-localOnly valid on the local link
fc00::/7Unique localPrivate addressing (ULA)
ff00::/8MulticastOne-to-many delivery
2000::/3Global unicastRoutable on the public internet

Common mistakes to avoid

  • Allowing leading zeros in IPv4 octets. Strings like 192.168.01.1 or 010.0.0.1 look fine but are ambiguous: some libraries read a leading zero as octal, so 010 becomes 8. This validator rejects leading zeros so the meaning is never in doubt.
  • Using more than one "::" in IPv6. The double colon stands for a run of zero groups, but it can appear at most once. With two of them, like 2001::25de::cade, the parser cannot tell how many zeros each one represents, so the address is invalid.
  • Octets out of range. Each IPv4 octet must be 0 to 255 because it is one byte. Values like 256 or 300 are common typos and are not valid, even though the dotted shape looks correct.
  • Confusing a private address with a public one. A valid address is not necessarily reachable from the internet. Ranges like 192.168.x.x and 10.x.x.x are private and only work inside a local network, so check the scope, not just validity.

Glossary

IPv4
A 32-bit IP address written as four decimal octets 0 to 255 separated by dots, for example 203.0.113.5.
IPv6
A 128-bit IP address written as eight groups of four hexadecimal digits separated by colons, for example 2001:db8::1.
Octet
One of the four numbers in an IPv4 address. Each is a single byte, so it ranges from 0 to 255.
Private address
An IP from a range reserved for internal networks (such as 192.168.0.0/16) that is never routed on the public internet.
Loopback
An address that refers back to the local machine itself: 127.0.0.1 in IPv4 and ::1 in IPv6.
Compression (::)
A shorthand in IPv6 where a single double colon replaces one or more consecutive groups of all zeros, allowed only once per address.
CIDR notation
A way to describe an address range as a prefix plus a slash and a bit length, such as 10.0.0.0/8.

Frequently asked questions

What makes an IP address valid?

For IPv4, the string must be exactly four numbers (octets) from 0 to 255 separated by dots, with no leading zeros, like 203.0.113.5. For IPv6, it must be eight groups of one to four hexadecimal digits separated by colons, with at most one "::" used to compress consecutive zero groups, like 2001:db8::1. This tool checks both rule sets.

What is the difference between IPv4 and IPv6?

IPv4 is a 32-bit address (about 4.3 billion total) written in decimal with dots, while IPv6 is a 128-bit address written in hexadecimal with colons and provides a practically unlimited supply. IPv6 was introduced because the world ran out of free IPv4 addresses.

How do I know if an IP is private or public?

Private IPv4 ranges are 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16, and they only work inside a local network. Anything outside the reserved ranges is public and routable on the internet. The tool labels the scope for you, including loopback, link-local, and reserved ranges.

What does the "::" in an IPv6 address mean?

The double colon is shorthand for one or more consecutive groups that are all zeros. For example, 2001:db8::1 expands to 2001:0db8:0000:0000:0000:0000:0000:0001. It can be used only once in an address, otherwise the number of hidden zero groups would be ambiguous.

Why is 192.168.01.1 considered invalid here?

The octet 01 has a leading zero. Leading zeros are ambiguous because some systems interpret them as octal numbers, which changes the value. To avoid that risk the validator treats any octet with a leading zero (other than a lone 0) as invalid.

Does this tool send my IP address anywhere?

No. All validation runs locally in your browser using plain JavaScript. Nothing you type is uploaded, logged, or stored, so you can safely check any address, including internal ones.