IP Tools — Examples

Hands-on runs with the IP Tools: calculate a /24 and a /26, convert IPv4 to integer and hex, shorten an IPv6 address, generate a ULA, and turn ranges into CIDRs.

Back to the overview: IP Tools · Open the tool live: www.jpkc.com/tools/ip/

The manual explains every tab and output field in detail. This page adds concrete calculations, played through step by step. Every address shown is an example value — put your own in its place.

Example 1: Break a /24 down in full

The classic — you want the network and broadcast address plus the host range of a typical LAN.

  1. Switch to the Subnet Calc tab and enter 192.168.1.0/24 (or click the Quick button 192.168.1.1/24). Press Calculate or Enter to run.
  2. In Subnet Details you read off: Network Address 192.168.1.0, Broadcast 192.168.1.255, Subnet Mask 255.255.255.0, Wildcard Mask 0.0.0.255, First Usable Host 192.168.1.1, Last Usable Host 192.168.1.254, Usable Hosts 254, Total Addresses 256, IP Class C, IP Type private (RFC 1918).
  3. In the Binary Breakdown you can see that the first 24 bits (the prefix) are colored as network bits and the last 8 as host bits — exactly the eight bits that give you the 256 addresses.

That's the standard starting point for any home or office network. If you need it smaller, see Example 2.

Example 2: Calculate a /26 and split it into subnets

You want to divide a /24 into four equal parts (/26) and know which one a given address falls into.

  1. In the Subnet Calc tab, enter 192.168.1.130/26.
  2. Subnet Details shows: Network Address 192.168.1.128, Broadcast 192.168.1.191, Subnet Mask 255.255.255.192, Wildcard Mask 0.0.0.63, First Usable Host 192.168.1.129, Last Usable Host 192.168.1.190, Usable Hosts 62, Total Addresses 64. So .130 lives in the third of four /26 blocks (.128.191).
  3. Under Subnet Splits, the tool shows how this /26 could be divided further — the next narrower prefixes /27, /28, /29, and /30 with the host count per sub-network and concrete example subnets. You see at once: a /30 (4 addresses, 2 hosts) suits point-to-point links, a /27 (32 addresses, 30 hosts) small departments.

Example 3: Convert IPv4 to integer, hex, and binary

You need 192.168.1.1 as an integer — for a database column, a comparison, or a firewall rule.

  1. Switch to the Converter tab and enter 192.168.1.1 (or use the example button).
  2. The table gives you: Decimal integer 3232235777, Hexadecimal 0xC0A80101, Binary (octets) 11000000.10101000.00000001.00000001, IPv4-mapped IPv6 ::ffff:c0a8:0101, IPv4-mapped IPv6 (mixed) ::ffff:192.168.1.1, and 6to4 prefix 2002:c0a8:0101::/48. Every row has a copy button.
  3. Address type flags the address as private (RFC 1918) — useful for a quick check of whether an address is routable at all.

A note on input: the converter accepts only a dotted IPv4 address (192.168.1.1) or an IPv6 address — anything else returns an "Invalid IP address" error. The decimal and hexadecimal forms are output-only representations; a bare integer like 3232235777 can't be fed back in directly, so convert it to dotted notation by hand first.

Example 4: Shorten and expand an IPv6 address

IPv6 addresses are written compactly, but sometimes you need the full form (for exact string matching, say).

  1. In the Converter tab, enter the written-out address 2001:0db8:0000:0000:0000:0000:0000:0001.
  2. The table shows Compressed IPv6 2001:db8::1 and Expanded IPv6 2001:0db8:0000:0000:0000:0000:0000:0001. So you get both directions at once.
  3. Address type flags it as a documentation address (2001:db8::/32, RFC 3849) — the range you deliberately use for examples. A real address like ::ffff:192.168.1.1 would instead add the embedded IPv4 and its decimal/hexadecimal forms.

Example 5: Generate a private IPv6 address (ULA)

You're building an IPv6 home or lab network and need a stable, ISP-independent prefix.

  1. Open the IPv6 ULA tab. It generates a ULA automatically the first time you open it; Generate Random ULA rolls a new one.
  2. You get four values, each copyable — as an example: /48 Prefix fd3f:9a21:7c4e::/48, /64 Example Subnet fd3f:9a21:7c4e:0001::/64, Example Host Address fd3f:9a21:7c4e:0001::1, and the Global ID (random, 40 bits) as hex. (Your values will differ — the 40-bit Global ID comes from your browser's crypto randomness.)
  3. The Address Structure graphic shows by color how the 128 bits split: fd (8-bit prefix), 40-bit Global ID, 16-bit Subnet ID, 64-bit Interface ID.
  4. How to use it: assign the /48 to your location; the 16-bit Subnet ID (0001, 0002, …) gives you 65,536 possible /64 sub-networks — one per LAN segment. Generate the prefix once and keep it, and your internal addresses stay stable no matter what your provider assigns.

Example 6: Translate an address range into CIDR blocks

You have an IP range (for a firewall or routing rule, say) and need it as a clean CIDR list.

  1. Switch to the IP Range tab, left card Range → CIDRs. Enter Start IP 192.168.1.10 and End IP 192.168.1.20 and click Calculate CIDRs.
  2. The result: 11 addresses, covered by 4 CIDR blocks192.168.1.10/31, 192.168.1.12/30, 192.168.1.16/30, and 192.168.1.20/32. That illustrates nicely why a range whose size isn't a power of two always needs several blocks: the greedy algorithm lays the largest aligned block at each start address.
  3. With Copy all CIDRs you copy the list line by line — ready to paste into a rule.
  4. The reverse direction is on the right under CIDR → Range: enter 10.0.0.0/22 there and you'll see Start (Network) 10.0.0.0, End (Broadcast) 10.0.3.255, Total addresses 1,024, Usable hosts 1,022, plus subnet and wildcard masks.

Go deeper: the manual for every field in detail, the tips & tricks for strategy and pitfalls. You can try everything directly in the tool.