Skip to content
nestoo
  • What is my IPYour public IPv4 and IPv6 address, location and provider.Network & IP
  • Speed testMeasure your download and upload speed, latency and jitter.Network & IP
  • IP lookupLocation, provider and network of any IP address.Network & IP
  • DNS lookupA, AAAA, MX, TXT, NS and other DNS records for any domain.Network & IP
  • WHOIS lookupOwner, registrar and expiry date of any domain or IP.Network & IP
  • Prefix lookupCheck a prefix in BGP, RPKI and the IRRs before you announce it.Network & IP
  • ASN lookupOwner, announced prefixes and neighbours of any AS number.Network & IP
  • Subnet calculatorNetwork, broadcast, host range and mask of any IPv4 or IPv6 subnet.Network & IP
  • Port checkerCheck whether a port is open on your IP or a server.Network & IP
  • HTTP headers checkerResponse headers, status codes and redirect chain of a URL.Network & IP
  • SSL checkerCertificate validity, expiry and chain of any website.Network & IP
  • SPF, DKIM and DMARC checkerCheck a domain’s SPF, DKIM and DMARC records for mistakes.Network & IP
  • Password generatorStrong, random passwords generated right in your browser.Passwords & security
  • Password strength checkerHow long a password would take to crack, and if it leaked.Passwords & security
  • Hash generatorMD5, SHA-1, SHA-256, SHA-512 and CRC32 hashes of text or files.Passwords & security
  • JSON formatterFormat, validate and minify JSON, with exact error locations.Developer tools
  • Base64 encoder/decoderEncode text or files to Base64 and decode it back.Developer tools
  • URL encoder/decoderEncode and decode URLs and query strings, and parse any URL.Developer tools
  • JWT decoderRead the header and claims of a JSON Web Token.Developer tools
  • UUID generatorRandom UUID v4 and time-ordered v7 identifiers.Developer tools
  • Unix timestamp converterConvert Unix timestamps to dates and dates to epoch time.Developer tools
  • Binary converterTranslate text to binary and convert between number bases.Developer tools
  • Image compressorMake JPG, PNG, WebP and AVIF files smaller, many at once.Image tools
  • Image resizerResize images to exact pixels or by percentage, many at once.Image tools
  • Image converterConvert HEIC, PNG, WebP, AVIF and more to JPG, PNG, WebP or AVIF.Image tools
  • Crop imageCrop, rotate and flip images to any size or aspect ratio.Image tools
  • EXIF viewer and removerSee the hidden data in photos, including location, and remove it.Image tools
  • Favicon generatorTurn a logo into favicon.ico, Apple touch icon and app icons.Image tools
  • Image to Base64Turn images into Base64 data URIs, and data URIs back into images.Image tools
  • Word counterCount words, characters, sentences and reading time.Text tools
  • Case converterUPPERCASE, lowercase, Title Case, camelCase, snake_case and more.Text tools
  • Diff checkerCompare two texts and highlight the differences.Text tools
  • QR code generatorFree QR codes for links, text, Wi-Fi and contacts, as PNG or SVG.Everyday tools
  • Percentage calculatorPercent of a number, percentage change, increase and decrease.Everyday tools
  • Unit converterConvert length, weight, temperature, volume, data and more.Everyday tools

Subnet calculator

Work out the network address, broadcast address, usable host range, netmask and wildcard mask of any IPv4 or IPv6 subnet, and split it into smaller networks.

CIDR such as 10.0.0.0/8, an address and netmask such as 10.0.0.0 255.0.0.0, or IPv6 such as 2001:db8::/48.

Try an example:

Network

192.168.1.0/24

192.168.1.0–192.168.1.255Private (RFC 1918)

192.168.1.10 is an address inside the network 192.168.1.0/24.

Network address
192.168.1.0
Broadcast address
192.168.1.255
First usable host
192.168.1.1
Last usable host
192.168.1.254
Usable hosts
254
Addresses
256
Netmask
255.255.255.0
Wildcard mask
0.0.0.255
Prefix length
/24
Class (historic)
Class C
Address type
Private (RFC 1918)

In binary

24 network bits, then 8 host bits

Address
11000000.10101000.00000001.00001010
Netmask
11111111.11111111.11111111.00000000

Runs in your browser. What you enter never leaves your device.

How to use it

  1. 1.Type an IP address with its prefix length (192.168.1.10/24) or with its netmask (192.168.1.10 255.255.255.0). IPv6 works the same way: 2001:db8::/48.
  2. 2.Change the prefix length in the list next to it to see how the network grows or shrinks; every result updates as you type.
  3. 3.Read the network and broadcast addresses, the first and last usable host, the netmask and the wildcard mask, and copy any of them with one click.
  4. 4.To plan smaller networks, pick a size under "Split into subnets of" and copy the list of subnets.
  5. 5.The address bar keeps your input, so you can bookmark or share the calculation.

How CIDR, prefix lengths and netmasks fit together

An IPv4 address has 32 bits. The prefix length after the slash says how many of them, counted from the left, name the network; the rest number the hosts inside it. In 192.168.1.0/24 the first 24 bits are the network and the last 8 bits leave room for 256 addresses.

A netmask writes the same thing as an address: ones for network bits, zeros for host bits. /24 is 255.255.255.0, /20 is 255.255.240.0. The wildcard mask is the netmask inverted (0.0.0.255 for a /24); Cisco access lists and OSPF use it to say which bits may vary.

Each step in prefix length halves or doubles the network: a /25 is half a /24, a /23 is two of them. That is why subnets always start on a multiple of their own size.

Usable hosts: why a /24 has 254, not 256

In IPv4 the first address of a subnet is the network address and the last one is the broadcast address, so a /24 leaves 254 addresses for devices and a /30 leaves two. In practice the router takes one of the usable addresses as the gateway.

Two sizes are exceptions. A /31 has no network or broadcast address and both addresses can be used on a point-to-point link between two routers (RFC 3021). A /32 is a single address, for a loopback interface or a route to one host.

IPv6 has no broadcast, so every address in a block is usable. Subnets with devices on them are /64, because address autoconfiguration (SLAAC) needs 64 host bits; a site typically receives a /48 or /56 and splits it into /64 networks.

Private, shared and public ranges

RFC 1918 reserves 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 for private networks: they are used inside homes and companies and never routed on the internet. 100.64.0.0/10 is shared space that internet providers use behind carrier-grade NAT.

The calculator names the type of every network, including loopback, link-local, multicast and the documentation ranges reserved for examples. For a public network it links to prefix lookup and WHOIS, where you can see who announces it and who it is registered to.

Questions and answers

How many hosts are in a /24 subnet?

A /24 has 256 addresses. Two of them are the network address and the broadcast address, so 254 can be assigned to devices. A /25 has 126 usable hosts, a /26 has 62, a /27 has 30, a /28 has 14, a /29 has 6 and a /30 has 2.

What is a wildcard mask?

It is the netmask with every bit flipped: 255.255.255.0 becomes 0.0.0.255. Cisco access control lists and OSPF network statements use wildcard masks, where a zero bit must match and a one bit can be anything.

Can I use a /31 subnet?

Yes, on point-to-point links. RFC 3021 lets both addresses of a /31 be assigned to the two ends of a link, which saves two addresses compared with a /30. Most routers support it; ordinary LANs with a broadcast domain still need a /30 or larger.

Why are IPv6 subnets /64?

Stateless address autoconfiguration (SLAAC) builds the host part of an address from 64 bits, so a network where devices pick their own addresses must be a /64. Shorter prefixes such as /48 and /56 are handed to sites and split into /64 networks, which is why the calculator counts how many /64 networks a prefix holds.

How do I convert a netmask to CIDR notation?

Count the one bits in the netmask: 255.255.255.0 has 24, so it is /24, and 255.255.240.0 has 20, so it is /20. Type the address with its netmask into the calculator and it shows the prefix length for you.