Free IP Address Tools
Convert IP addresses, calculate CIDR ranges, and compute subnet information. Real-time 32-bit integer math.
Key Features
3 Tool Modes
IP Converter (hex/decimal/binary), CIDR Calculator (range/subnet), and Subnet Mask (mask to CIDR).
Real-time Calculation
Results update instantly as you type with 32-bit unsigned integer math.
All IP Formats
Dotted decimal, decimal integer, binary, hex, and octal representations.
Privacy First
All calculations happen locally in your browser. No data ever leaves your device.
Frequently Asked Questions
About IP Address Tools
How do I calculate the number of IPs in a CIDR block?
Use the formula 2^(32 - prefixLength). For example, /24 has 2^8 = 256 addresses. /16 has 2^16 = 65,536 addresses. /32 is a single host. The first address in the block is the network address (routing), and the last is the broadcast address (sending to all hosts). Usable host IPs = total - 2 for /31 and larger. A /31 (2 IPs) is special in RFC 3021 — both addresses can be used for point-to-point links without a broadcast address.
How do I convert a subnet mask to a CIDR prefix?
Count the leading 1-bits in the binary representation of the mask. Each 255 in dotted decimal = 8 ones, so 255.255.255.0 = 8+8+8+0 = /24. 255.255.0.0 = /16. 255.255.255.128 = /25 (8+8+8+1). Non-contiguous masks like 255.0.255.0 are not valid subnet masks — they must have all 1s on the left and all 0s on the right in binary form. The tool validates this.
Why would I convert an IP address to a decimal integer?
Storing IPs as 32-bit unsigned integers in databases enables efficient range queries (SELECT ... WHERE ip BETWEEN n1 AND n2), saves storage space (4 bytes vs 15+ chars), and simplifies subnet math in programming. Many IP geolocation databases use integer IP ranges for fast lookups. The decimal integer representation is also used in IPv4-to-IPv6 mapped addresses under the ::ffff:0:0/96 prefix, where the IPv4 address is embedded as a hex integer.
Advanced
What is the difference between the network address, broadcast address, and default gateway?
The network address is the first IP in a subnet, used for routing tables to identify the subnet itself. The broadcast address is the last IP, used to send packets to all hosts in the subnet. The default gateway is a specific host IP (usually the first or last usable) that routes traffic out of the subnet. For 192.168.1.0/24: network = 192.168.1.0, broadcast = 192.168.1.255, usable range = 192.168.1.1–192.168.1.254, gateway is typically 192.168.1.1 (first usable) configured on the router.
What is VLSM and how is subnetting done?
VLSM (Variable Length Subnet Mask) divides a larger CIDR block into smaller subnets of different sizes. For example, 10.0.0.0/16 (65,536 IPs) can be split into 256 /24 subnets (each 256 IPs) or mixed sizes like one /17 (32,768 IPs) plus two /18 (16,384 each). Calculate each subnet by increasing the prefix length: each extra bit doubles the number of subnets and halves the IPs per subnet. Use this tool's CIDR mode to verify each subnet's range.