What is an IP address?

An IP address is the number that tells devices on a network apart, so data finds its way to the right one: your laptop, a web server, the printer in the office. There are two versions. An IPv4 address is four numbers from 0 to 255 joined by dots, such as 192.0.2.10. IPv6, made because IPv4 addresses were running out, has eight groups of up to four hexadecimal digits joined by colons. Zeros at the start of a group can be left out, and one run of groups that are all zeros can be written as ::, so 2001:0db8:0000:0000:0000:0000:0000:0001 becomes 2001:db8::1.

You need a valid one when you give a server or printer a fixed address, add a firewall rule, set up DNS records, or build a form that asks for an IP address.

Tool description

Type or paste an address into the IP address field, and the result shows as you type: "IP address is valid" or "IP address is not valid". Spaces and line breaks around a pasted address are ignored.

The IP version menu sets which addresses pass. It starts on Any, which accepts both versions, while IPv4 and IPv6 accept only that one. An IPv4 address written inside an IPv6 one, such as ::ffff:192.0.2.128, counts as IPv6.

IPv4 rules

  • Exactly four numbers from 0 to 255, joined by dots: 192.0.2.10, 0.0.0.0 and 255.255.255.255 pass
  • No leading zeros: 192.0.2.01 fails, since some programs read such numbers as octal
  • No shortened or hexadecimal forms, such as 192.0.2 or 0xc0.0.2.10, which some programs accept
  • No port or prefix: 192.0.2.10:80 and 192.0.2.0/24 fail

IPv6 rules

  • Eight groups of one to four hexadecimal digits, in small or capital letters, or fewer groups with one :: in place of the missing zeros
  • Only one :: is allowed, so 2001:db8::1::2 fails. On its own, :: passes: it's the address of all zeros, like 0.0.0.0 in IPv4
  • An IPv4 address may take the place of the last two groups, as in 2001:db8::192.0.2.1
  • A zone ID after a percent sign, such as %eth0, which link-local addresses starting with fe80 use to name the network interface
  • No square brackets, prefix or port: [2001:db8::1] and 2001:db8::/32 fail, since these forms belong in URLs and ranges

Good to know

  • The check looks at the form only. It can't tell whether a device uses the address, or whether the address is public or private.
  • For a range such as 192.0.2.0/24, use the CIDR Validator. To see an address's type along with its binary and hexadecimal forms, use the IP Address Parser.

Features

  • Checks IPv4 and IPv6 addresses, or only one version
  • Accepts shortened IPv6, embedded IPv4 and zone IDs
  • Rejects leading zeros and shortened IPv4 forms
  • Results as you type, with no button to press
  • Runs in your browser, so nothing you type is sent anywhere