IP Validator
Validate IPv4 and IPv6 addresses
An IP address is a unique numerical label assigned to every device on a network. IPv4 uses 32 bits (4.3 billion addresses), IPv6 uses 128 bits (virtually unlimited).
What is an IP Address?
An IP address (Internet Protocol address) is a unique numerical identifier assigned to every device connected to a computer network that uses the Internet Protocol for communication. Think of it as a postal address for digital devices — it tells the network where to send data so it reaches the correct destination.
IP addresses serve two fundamental purposes: host identification (uniquely identifying a device on the network) and location addressing (providing a path for routing data between networks). Without IP addresses, routers would have no way to determine where to forward packets, and the internet as we know it could not function.
There are two versions of the Internet Protocol in active use today: IPv4 (Internet Protocol version 4), which has been the backbone of the internet since 1983, and IPv6 (Internet Protocol version 6), which was designed to replace IPv4 as the world runs out of available addresses.
IPv4 Format and Classes
IPv4 addresses are 32 bits long, written as four decimal numbers separated by dots — a format known as dotted-decimal notation. Each number (called an octet) represents 8 bits and ranges from 0 to 255.
For example, the address 192.168.1.1 breaks down as:
192= first octet (bits 1-8)168= second octet (bits 9-16)1= third octet (bits 17-24)1= fourth octet (bits 25-32)
The total 32-bit address space yields 2^32 = 4,294,967,296 possible addresses. While this seemed enormous in the early 1980s, the explosive growth of the internet, mobile devices, and IoT has long since exhausted this pool.
Historically, IPv4 addresses were organized into five classes (A through E), each reserving a different number of bits for the network and host portions. Class A networks (1.0.0.0 to 126.255.255.255) supported 16 million hosts each, while Class C networks (192.0.0.0 to 223.255.255.255) supported only 254 hosts. This rigid class-based system was wasteful — a company needing 500 addresses had to request a Class B with 65,534 addresses. CIDR (Classless Inter-Domain Routing) replaced classful addressing in 1993 to allow more flexible allocation.
IPv6 Format
IPv6 addresses are 128 bits long, written as eight groups of four hexadecimal digits separated by colons. This format provides a staggeringly large address space of 2^128 = approximately 3.4 x 10^38 unique addresses.
An example IPv6 address: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
IPv6 allows two simplification rules to make addresses more readable:
- Leading zeros within each group can be omitted:
2001:db8:85a3:0:0:8a2e:370:7334 - Consecutive all-zero groups can be replaced with
::(but only once per address):2001:db8:85a3::8a2e:370:7334
Reserved Ranges
Several IPv4 address ranges are reserved for specific purposes and cannot be used as regular public addresses. Understanding these ranges is critical for network configuration, security auditing, and troubleshooting.
| Range | CIDR | Purpose | Scope |
|---|---|---|---|
| 10.0.0.0 - 10.255.255.255 | 10.0.0.0/8 | Private network (Class A) | 16.7 million addresses for large enterprises |
| 172.16.0.0 - 172.31.255.255 | 172.16.0.0/12 | Private network (Class B) | 1 million addresses for medium networks |
| 192.168.0.0 - 192.168.255.255 | 192.168.0.0/16 | Private network (Class C) | 65,536 addresses for home/small office |
| 127.0.0.0 - 127.255.255.255 | 127.0.0.0/8 | Loopback | Traffic to this range never leaves the host |
| 169.254.0.0 - 169.254.255.255 | 169.254.0.0/16 | Link-local (APIPA) | Auto-assigned when DHCP fails |
| 224.0.0.0 - 239.255.255.255 | 224.0.0.0/4 | Multicast | One-to-many data delivery |
The private ranges (10.x, 172.16-31.x, 192.168.x) are defined in RFC 1918 and are the addresses you see on your local network. Routers on the public internet drop packets destined for these ranges. To communicate with the outside world, devices behind a router use NAT (Network Address Translation), which maps private addresses to the router’s single public IP.
The loopback range (127.0.0.0/8) is used for testing and inter-process communication on the local machine. The most commonly used address is 127.0.0.1, often referred to as localhost.
Link-local addresses (169.254.x.x) are automatically assigned by the operating system when a device is configured for DHCP but no DHCP server responds. If you see a 169.254.x.x address on your machine, it typically indicates a network connectivity issue.
Common Use Cases
- Network configuration: Assigning static or dynamic (DHCP) IP addresses to servers, workstations, and IoT devices on corporate and home networks
- Firewall rules: Defining allow/deny rules based on source and destination IP addresses to control access to services and resources
- DNS resolution: Mapping human-readable domain names to IP addresses so browsers and applications can locate web servers
- Geolocation: Estimating the geographic location of a user based on their public IP address for content delivery, compliance, and analytics
- Load balancing: Distributing incoming traffic across multiple servers identified by their IP addresses to ensure high availability
- VPN and tunneling: Encapsulating traffic between private networks over the public internet using assigned tunnel IP addresses
- Troubleshooting: Using tools like
ping,traceroute, andnslookupto diagnose connectivity issues between IP endpoints
Try These Examples
A valid private IPv4 address in the 192.168.0.0/16 range, commonly used for home and office local networks. Each octet (192, 168, 1, 1) is within the 0-255 range.
192.168.1.1 A valid IPv6 address using the :: shorthand to compress consecutive groups of zeros. The full expanded form is 2001:0db8:85a3:0000:0000:8a2e:0370:7334.
2001:0db8:85a3::8a2e:0370:7334 Each octet in an IPv4 address must be between 0 and 255. The value 999 exceeds this limit, making this address invalid.
999.999.999.999