/
IPv4:

About This Tool

A comprehensive IP networking toolkit covering everything you need for IPv4 and IPv6 address planning. Four specialized calculators in one tool: subnet calculator, address info, VLSM planner, and range-to-CIDR converter.

Features

  • Full IPv4 and IPv6 — subnet calculation with BigInt math for 128-bit addresses

  • Auto-detect — automatically identifies IPv4 vs IPv6 from your input

  • Smart CIDR parsing — paste 192.168.1.0/24 and it auto-splits the prefix

  • Address type detection — Private (RFC 1918), CGNAT, Loopback, Link-Local, Multicast, Documentation, ULA, Teredo, 6to4, and more

  • Address converter — binary, hex, integer, reverse DNS (PTR), IPv4-mapped IPv6, 6to4

  • VLSM planner — allocate subnets of different sizes with waste calculation

  • Range to CIDR — convert arbitrary IP ranges to optimal CIDR blocks

  • Bit boundary visualization — colored network/host bit display

  • Common presets — quick access to typical IPv4 and IPv6 prefix lengths

  • Share link — URL parameters for bookmarking and sharing

  • Copy results — one-click copy of all calculated values

How to Use

Subnet Calculator

  1. Enter an IPv4 address (e.g., 192.168.1.0) or IPv6 address (e.g., 2001:db8::)

  2. Set the CIDR prefix length or click a preset button
  3. View network address, broadcast, mask, wildcard, host range, address type, and more

  4. Scroll down to see the bit boundary visualization showing network vs host bits

Address Info

  1. Enter any IP address, integer, or hex value (e.g., 3232235777 = 192.168.1.1)

  2. View all representations: binary, hex, integer, reverse DNS, IPv4-mapped IPv6, and 6to4

  3. Identify address type, class, and scope

VLSM Planner

  1. Enter a base IPv4 network (e.g., 10.0.0.0/16)
  2. Add subnet requirements with names and required host counts
  3. Click Calculate to see optimal allocation sorted by size, with waste analysis

Range to CIDR

  1. Enter start and end IPv4 addresses (e.g., 192.168.1.0 to 192.168.3.255)

  2. View the minimal set of CIDR blocks covering the range

IPv4 Subnet Reference

Common Subnet Sizes

CIDRSubnet MaskAddressesUsable HostsTypical Use
/32255.255.255.25511Host route
/31255.255.255.25422Point-to-point link (RFC 3021)
/30255.255.255.25242Point-to-point link
/29255.255.255.24886Small office
/28255.255.255.2401614Small network
/27255.255.255.2243230Department
/26255.255.255.1926462Floor / building
/25255.255.255.128128126Large department
/24255.255.255.0256254Standard LAN
/16255.255.0.065,53665,534Large site
/8255.0.0.016,777,21616,777,214ISP / Class A

IPv4 Classes

ClassRangeDefault MaskNetworksPurpose
A1.0.0.0 – 126.255.255.255/8126Large organizations
B128.0.0.0 – 191.255.255.255/1616,384Medium organizations
C192.0.0.0 – 223.255.255.255/242,097,152Small organizations
D224.0.0.0 – 239.255.255.255N/AN/AMulticast
E240.0.0.0 – 255.255.255.255N/AN/AReserved / Experimental

Private and Reserved Ranges

RangeCIDRPurposeRFC
10.0.0.0/8Private networkRFC 1918
172.16.0.0/12Private networkRFC 1918
192.168.0.0/16Private networkRFC 1918
100.64.0.0/10CGNAT / SharedRFC 6598
127.0.0.0/8LoopbackRFC 1122
169.254.0.0/16Link-Local / APIPARFC 3927
192.0.2.0/24Documentation (TEST-NET-1)RFC 5737
198.51.100.0/24Documentation (TEST-NET-2)RFC 5737
203.0.113.0/24Documentation (TEST-NET-3)RFC 5737
224.0.0.0/4MulticastRFC 5771

IPv6 Reference

Common Prefix Lengths

PrefixAddressesTypical Use
/1281Host address
/1272Point-to-point link (RFC 6164)
/64264Standard subnet (SLAAC required)
/56272Residential site (256 /64s)
/48280Enterprise site (65,536 /64s)
/32296ISP allocation

IPv6 Special Addresses

Address / PrefixPurposeRFC
::/128UnspecifiedRFC 4291
::1/128LoopbackRFC 4291
::ffff:0:0/96IPv4-Mapped IPv6RFC 4291
64:ff9b::/96NAT64 translationRFC 6052
2001:db8::/32DocumentationRFC 3849
2002::/166to4 tunnelingRFC 3056
fc00::/7Unique Local Address (ULA)RFC 4193
fe80::/10Link-LocalRFC 4291
ff00::/8MulticastRFC 4291

Linux Command Reference

Show IP addresses

ip -4 addr show
inet 192.168.1.100/24 brd 192.168.1.255 scope global eth0

Show IPv6 addresses

ip -6 addr show scope global
inet6 2001:db8::1/64 scope global

Routing table

ip route show
default via 192.168.1.1 dev eth0192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.100

Calculate subnet with ipcalc

ipcalc 192.168.1.0/24
Network: 192.168.1.0/24Netmask: 255.255.255.0Broadcast: 192.168.1.255HostMin: 192.168.1.1HostMax: 192.168.1.254Hosts/Net: 254Class C, Private Internet

Reverse DNS lookup

dig -x 8.8.8.8 +short
dns.google.

Scan a subnet

nmap -sn 192.168.1.0/24 | grep "Nmap scan report"
Nmap scan report for 192.168.1.1Nmap scan report for 192.168.1.100

VLSM Explanation

Variable Length Subnet Masking (VLSM) allows dividing a network into subnets of different sizes, minimizing wasted addresses. The algorithm:

  1. Sort requirements by host count (largest first)
  2. For each requirement, find the smallest power-of-2 block that fits (hosts + 2 for network/broadcast addresses)

  3. Align the block to its natural boundary
  4. Allocate and advance to the next available space

In IPv6, VLSM is less relevant because /64 is the standard prefix for all subnets (required for SLAAC). The immense address space makes variable sizing unnecessary.

Range to CIDR Algorithm

Converting an arbitrary IP range to CIDR blocks finds the minimal set of prefixes that exactly cover the range. For each position:

  1. Find the largest aligned block starting at the current address
  2. Ensure the block does not extend beyond the end of the range
  3. Record the block and advance past it

This is useful for firewall rules, route aggregation, and access control lists where CIDR notation is required.

Privacy

All calculations run entirely in your browser. No IP addresses or network data are sent to any server. The tool works offline after initial page load.