This generator produces random IPv4 and IPv6 addresses for network testing. You can keep output inside the RFC 1918 private ranges, generate globally routable public addresses, or constrain everything to a specific CIDR subnet — so the addresses are structurally valid for the network environment you are modelling.
How it works
IPv4 generation creates four decimal octets (0–255), constrained by your selected mode:
Private (RFC 1918): 10.x.x.x — 10.0.0.0/8
172.16-31.x.x — 172.16.0.0/12
192.168.x.x — 192.168.0.0/16
Loopback: 127.x.x.x
CIDR-constrained: fix top /n bits, randomise host bits
Public: globally routable range, skipping all reserved blocks
CIDR mode is the most useful for specific test environments: enter a block like 10.20.0.0/16, and every generated address keeps the top 16 bits fixed while randomising the lower 16 — so all output is valid for that subnet.
IPv6 generation produces eight random 16-bit groups in hexadecimal, then applies the canonical RFC 5952 compression: the longest consecutive run of all-zero groups is collapsed to :: and leading zeros within each group are dropped. The result is always a valid, properly abbreviated IPv6 address.
Use cases by mode
| Mode | When to use |
|---|---|
| Private (RFC 1918) | Test data for internal services; safe — can’t route to real hosts |
| Loopback | Localhost testing, mock service discovery |
| CIDR-constrained | Populate a DHCP log, firewall rule, or specific lab subnet |
| Public | Test geolocation lookups, rate-limiter allow-listing, load balancer rules |
| IPv6 | Test dual-stack parsers, IPv6 firewall rules, modern network code |
Common patterns for developers
Seeding synthetic access logs. Generating 1,000 random private IPs populates access logs for testing log-parsing pipelines without exposing real client addresses.
Testing firewall rules. CIDR mode lets you confirm an allow rule for 192.168.10.0/24 by generating 50 addresses from that subnet and verifying each is accepted, then generating addresses from 192.168.11.0/24 to confirm they are blocked.
Parser validation. IPv6 addresses come in many valid compressed forms. Generating a batch and feeding them through an IP parser or regular expression confirms the parser handles all canonical representations.
Load testing with realistic data. Public mode provides globally routable IPs for testing geolocation middleware, rate limiters keyed on IP, or CDN caching logic that behaves differently for different client origins.
All addresses are generated locally in JavaScript — nothing is sent to any server and the tool works fully offline.