Random IP Generator |
What Is a Random IP Generator?
A random IP generator (also called a random IP address generator) creates syntactically valid IPv4 or IPv6 addresses on demand using a pseudo-random number algorithm. IPv4 addresses are 32-bit values expressed as four decimal octets (0–255 each), as defined in RFC 791. IPv6 addresses are 128-bit values expressed as eight colon-separated hexadecimal groups (0x0000–0xFFFF each), per RFC 8200. Generated addresses are structurally correct but not assigned to any device — they are safe for use in test environments, mock datasets, and software validation pipelines.
| Property | IPv4 | IPv6 |
|---|---|---|
| Address size | 32 bits | 128 bits |
| Address space | ~4.3 billion addresses | ~340 undecillion addresses |
| Governing RFC | RFC 791 | RFC 8200 |
| Format | 4 decimal octets (0–255) | 8 colon-separated hex groups (0–FFFF) |
| CIDR constraint | Any /0–/32 prefix | Any /0–/128 prefix (standard or compressed notation) |
| Max batch | 1,000 addresses | 1,000 addresses |
Use the Random IP Generator
Configure your options and click Generate IPs to see your addresses.
Select Output Format
Optionally Constrain to a CIDR Block
Set Quantity and Delimiter
Generate and Copy
Technical Details
IPv4 generation applies Math.random() independently to each of the four octets,
producing a uniform distribution across the full 32-bit space (RFC 791). By default, all ranges are
included — private (RFC 1918: 10/8, 172.16/12, 192.168/16), link-local (RFC 3927: 169.254/16),
documentation (RFC 5737: 192.0.2/24, 198.51.100/24, 203.0.113/24), loopback (RFC 1122: 127/8),
and multicast (RFC 5771: 224–239/4). Enable "Public IPs only" to exclude all reserved prefixes
and generate publicly routable addresses only.
IPv6 generation applies Math.random() to each of the eight 16-bit groups,
producing addresses anywhere in the 128-bit space defined by RFC 8200. Output is always the full
expanded colon-hex form before any format conversion is applied.
CIDR-constrained generation masks the network bits of the input prefix and randomizes only the host portion. For IPv4, a /24 leaves 8 host bits (256 possible addresses); a /16 leaves 16 host bits (65,536 possible addresses). For IPv6, both standard notation (2001:0db8:0000:0000::/64) and compressed notation (2001:db8::/64) are accepted.
Output format conversions:
Binary renders each octet (IPv4) or 16-bit group (IPv6) as a zero-padded base-2 string.
Hexadecimal renders the address as a 0x-prefixed uppercase integer (8 hex digits for IPv4,
32 hex digits for IPv6). Decimal renders a 32-bit unsigned integer for IPv4 (max 4,294,967,295)
or a BigInt decimal string for IPv6 (up to 39 digits, using JavaScript's native BigInt type).
Common Uses for a Random IP Generator
Test fixture population: A backend developer building an IP-based rate limiter needs thousands of diverse addresses to verify throttling logic without using real user IPs. Generating 1,000 addresses as a newline-delimited list takes one click — the output pastes directly into test fixtures or seeded database tables.
Firewall ACL verification: A network engineer needs to confirm that an access control list correctly permits traffic from a specific internal subnet — for example, 10.20.0.0/16. CIDR-constrained generation produces random addresses guaranteed to fall within that prefix, enabling systematic rule testing without touching production traffic.
Networking education and subnetting practice: A student studying for a networking certification generates 50 random IPv4 addresses in Binary format and manually determines which fall within a given CIDR block — hands-on binary arithmetic practice without needing a live network or a real address pool.