decoder.tools

IP Header & CIDR Decoder

Decode IP headers and expand CIDR notation into full subnet ranges.

live · client-sideNetwork, System & Packetsfree · no sign-up
RAW INPUT
DECODED

Output appears here as you type — decoded on your device.

Input is processed on your device. Nothing you paste is sent anywhere.

What is the IP Header & CIDR Decoder?

CIDR notation writes an IP network as an address followed by a prefix length (192.168.1.0/24), and a CIDR decoder expands that into the network address, broadcast address, subnet mask and the range of usable host addresses.

The prefix length says how many leading bits are the network portion. A /24 fixes the first 24 bits and leaves 8 for hosts: 256 addresses, of which 254 are usable once the network and broadcast addresses are reserved. Each step down doubles the block — a /23 is 512 addresses, a /16 is 65 536.

The two edge cases trip people up regularly. A /31 has no usable hosts under the classic rule but is explicitly allowed for point-to-point links (RFC 3021), and a /32 is a single host — the form you use in firewall rules and route entries.

The IPv4 header itself is 20 bytes before options: version and header length, DSCP/ECN, total length, identification and fragment fields, TTL, protocol number and header checksum, then source and destination addresses. TTL is the field worth reading in a capture — its distance below 64, 128 or 255 tells you roughly how many hops the packet has taken.

IP Header & CIDR Decoder at a glance

/24
256 addresses, 254 usable, mask 255.255.255.0
/16
65 536 addresses, mask 255.255.0.0
/31 and /32
Point-to-point link · single host
IPv4 header
20 bytes minimum; TTL indicates hop count

How to use the IP Header & CIDR Decoder

  1. 1Enter a CIDR block such as 10.0.0.0/16, or paste IPv4 header hex.
  2. 2Read the network and broadcast addresses, mask and usable host range.
  3. 3Use the host count to check a subnet plan before you commit to it.

When you would reach for it

  • Sizing subnets for a VPC, VLAN or Kubernetes cluster plan.
  • Checking whether two CIDR blocks overlap before peering networks.
  • Turning a firewall rule's CIDR into the explicit address range it covers.

IP Header & CIDR Decoder — frequently asked questions

Last reviewed · questions or corrections: contact@decoder.tools