What Is IPv4?
How IPv4 addresses work, with your own address decoded.
IPv4 (Internet Protocol version 4) identifies devices with 32-bit addresses written as four numbers from 0 to 255, like 192.168.1.1. That allows about 4.3 billion addresses, which ran out in 2011, so most homes share one public IPv4 through NAT.
Reading your IP address… Your public IP is also on the homepage.
What Is an IPv4 Address?
Four 8-bit numbers (octets) separated by dots; the first part names the network, the rest the device.
A computer sees an IPv4 address as one 32-bit number; people write it as four octets in decimal,
each from 0 (00000000) to 255 (11111111). The subnet mask
(or prefix length, like /24) says where the network part ends: in
192.168.1.20/24 the network is 192.168.1.0 and the device is number 20.
Routers only look at the network part to forward a packet; the last router delivers it to the device.
IPv4 itself is "best effort": it addresses and routes packets but doesn't promise they arrive. TCP, on top of it, handles order and retransmission. Plan networks and masks with the subnet calculator.
IPv4 Converter: Binary, Hex and More
Try:
| Binary | 11000000.10101000.00000001.00000001 |
| Hexadecimal | 0xC0A80101 (c0.a8.01.01) |
| 32-bit integer | 3,232,235,777 (3232235777) |
| Reverse DNS name | 1.1.168.192.in-addr.arpa |
| Old class | C · see the deciding bits |
| Range | Private (RFC 1918) |
| Its /24 | 192.168.1.0/24 · open in the subnet calculator |
Runs in your browser; what you type is not sent to our server.
How Many IPv4 Addresses Are There?
232 = 4,294,967,296, of which about 593 million are reserved (private, multicast, documentation…), leaving about 3.7 billion public addresses.
| Range | Addresses | Used for |
|---|---|---|
| 224.0.0.0/4 | 268,435,456 | Multicast (old class D) |
| 240.0.0.0/4 | 268,435,456 | Reserved (old class E), incl. 255.255.255.255 broadcast |
| 0.0.0.0/8 | 16,777,216 | "This network" |
| 10.0.0.0/8 | 16,777,216 | Private (RFC 1918) |
| 127.0.0.0/8 | 16,777,216 | Loopback (127.0.0.1 = this device) |
| 100.64.0.0/10 | 4,194,304 | Carrier-grade NAT (RFC 6598) |
| 172.16.0.0/12 | 1,048,576 | Private (RFC 1918) |
| 198.18.0.0/15 | 131,072 | Network benchmarking (RFC 2544) |
| 169.254.0.0/16 | 65,536 | Link-local (no DHCP) |
| 192.168.0.0/16 | 65,536 | Private (RFC 1918), most home networks |
| 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 | 3 × 256 | Documentation and examples (RFC 5737) |
| 192.0.0.0/24, 192.88.99.0/24 | 2 × 256 | Protocol assignments, old 6to4 relay |
| Total reserved | 592,708,864 | About 13.8% of the space |
The full list is IANA's IPv4 special-purpose address registry (RFC 6890). Check any address with the public or private IP checker or read public vs private IP.
IPv4 Address Classes (A–E)
Classes split addresses by their first bits; they were replaced by CIDR in 1993 but still appear in exams and old docs.
| Class | First octet | Leading bits | Default mask | Use |
|---|---|---|---|---|
| A | 1 – 126 | 0 | /8 (255.0.0.0) | Large networks |
| B | 128 – 191 | 10 | /16 (255.255.0.0) | Medium networks |
| C | 192 – 223 | 110 | /24 (255.255.255.0) | Small networks |
| D | 224 – 239 | 1110 | — | Multicast |
| E | 240 – 255 | 1111 | — | Reserved |
Since CIDR a network can be any size (/22, /27…), whatever its first octet. See the deciding bits for any address, and practise, with the IP address class checker.
Why IPv4 Ran Out, and What NAT Does
IANA handed out its last blocks on 3 February 2011; NAT lets many devices share one public IPv4.
| Registry | Region | Ran out of its free pool |
|---|---|---|
| IANA | World (gives blocks to the registries) | 3 February 2011 |
| APNIC | Asia-Pacific | April 2011 |
| RIPE NCC | Europe, Middle East, Central Asia | September 2012 (last addresses November 2019) |
| LACNIC | Latin America, Caribbean | June 2014 |
| ARIN | North America | September 2015 |
| AFRINIC | Africa | Final phase from 2020 |
NAT (network address translation) is what kept IPv4 alive: your router gives private addresses to your devices and rewrites their traffic so it all leaves from one public address. Many providers now add a second layer, carrier-grade NAT, so several customers share one public IPv4 too; that's why some routers show a WAN address in 100.64.0.0/10.
IPv4 in 2026 is an asset with a price. Organizations buy and sell blocks through the registries; the average price was about $20 per address in the first half of 2026 (IPv4.Center market data), and Amazon Web Services has charged $0.005 per public IPv4 address per hour (about $44 a year) since 1 February 2024, while IPv6 addresses stay free. Both push networks toward IPv6.
The IPv4 Header
Every IPv4 packet starts with a 20-byte header: version, length, TTL, protocol, checksum, source and destination addresses (RFC 791).
| Field | Size | What it does |
|---|---|---|
| Version | 4 bits | Always 4. |
| Header length (IHL) | 4 bits | In 32-bit words: 5 (20 bytes) without options, up to 15 (60 bytes). |
| DSCP and ECN | 8 bits | Priority (quality of service) and congestion signal; once called "type of service". |
| Total length | 16 bits | Header plus data, up to 65,535 bytes. |
| Identification, flags, fragment offset | 16 + 3 + 13 bits | Splitting and reassembling packets too big for a link; the "don't fragment" flag. |
| Time to live (TTL) | 8 bits | Lowered by 1 at each router; at 0 the packet is dropped. Traceroute uses this. |
| Protocol | 8 bits | What's inside: 6 = TCP, 17 = UDP, 1 = ICMP (ping). |
| Header checksum | 16 bits | Detects a damaged header; recomputed at each router because the TTL changes. |
| Source address | 32 bits | The sender's IPv4 (after NAT, your public IP). |
| Destination address | 32 bits | Where the packet goes. |
| Options | 0–40 bytes | Rarely used today. |
See TTL at work with traceroute and ping.
IPv4 vs IPv6
| IPv4 | IPv6 | |
|---|---|---|
| Address size | 32 bits | 128 bits |
| Written as | 192.0.2.1 | 2001:db8::1 |
| Number of addresses | about 4.3 billion | about 3.4 × 1038 |
| NAT | Needed almost everywhere | Not needed: every device can have a public address |
| Header | 20–60 bytes, with checksum | 40 bytes fixed, no checksum |
| Defined in | RFC 791 (1981) | RFC 8200 (2017) |
Most connections now use both. Test whether you have IPv6 and see the full comparison in What is IPv6?; convert addresses with IPv4 to IPv6.