Random IP Address Generator
RG-21Pick IPv4 or IPv6 and the kind of range, then press Generate. For examples and tests use the documentation ranges, which are set aside so they never point to a real machine.
Runs in your browser. Nothing is uploaded.
Only for the range choice: two IPv4 addresses (192.168.1.1 192.168.1.254) or a block (10.0.0.0/24)
Random IP addresses
How to use it
- Choose a Kind: documentation, public-looking, private, a range from the box, or an IPv6 type.
- For a range, type two addresses (192.168.1.1 192.168.1.254) or a block such as 10.0.0.0/24 in the box.
- Pick how many addresses you need and whether repeats are allowed.
- Press Generate IPs and copy the list.
Which range to choose
Documentation addresses are the safest for examples: 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24 for IPv4 (RFC 5737, host numbers 1 to 254) and 2001:db8::/32 for IPv6 (RFC 3849). Private addresses come from 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16, and IPv6 unique local from fd00::/8. Use these for lab and internal-network tests. Public-looking addresses are for formats and parsers, not for connecting to anything.
Custom ranges and what is not checked
The range choice reads two IPv4 addresses or a CIDR block from the box and includes both ends, so a /24 includes .0 and .255. With No repeats ticked, you cannot ask for more addresses than the range holds. Public-looking draws from all IPv4 addresses and skips the private, loopback, link-local, multicast, documentation and other reserved blocks. A leftover address may belong to a real machine, so do not scan or contact random addresses. The tool does not check anything against a live network.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
Type a range in the box: two addresses such as 192.168.1.1 192.168.1.254, or a block such as 10.0.0.0/24. | The range choice is selected but the box is empty or holds the wrong number of parts. | Enter two addresses or one CIDR block. |
The first address is higher than the last one. | The range is written backwards. | Put the lower address first. |
A prefix length must be from 0 to 32. | The number after the slash is above 32. | Use /0 to /32. |
The documentation ranges hold only 762 addresses, so more than that cannot all be different. Untick No repeats or ask for fewer. | You asked for more than 762 different documentation addresses. | Ask for 500 or fewer, or untick No repeats. |
Questions people ask
Which IP addresses are safe to use in examples?
Use the documentation ranges: 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24 for IPv4, and 2001:db8::/32 for IPv6. They are reserved for examples, so they are not assigned to real networks. Documentation is their purpose.
How do I generate a random IP in a range?
Choose IPv4 in the range from the box, then type two addresses or a CIDR block such as 10.0.0.0/24 in the box. Every address between them, ends included, is equally likely.
Can I generate random IPv6 addresses?
Yes. Choose IPv6 documentation, global or unique local. Documentation gives 2001:db8:: addresses, global draws inside 2000::/3, and unique local gives fd00::/8. Shorten IPv6 writes the compact form with ::.
Do public-looking addresses exist on the internet?
Some may. The tool only skips reserved blocks; it does not know which addresses are in use. Do not connect to, scan or test a random public address, because it could belong to someone else.
Can the same address appear twice?
Not by default. No repeats is ticked, so each address is different. Untick it to allow repeats. If you ask for more unique addresses than a range holds, you get an error with the size of the range.
What is a CIDR block?
It is an address followed by a slash and a number, such as 10.0.0.0/24, which stands for all addresses that share the first 24 bits. A /24 holds 256 addresses. This tool takes the whole block, including the first and last address.
About this tool
Values are made in your browser with crypto.getRandomValues and rejection sampling, so no value is favored, and nothing is sent anywhere or stored. Documentation addresses are the blocks set aside for examples: 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24 for IPv4 (RFC 5737, host numbers 1 to 254) and 2001:db8::/32 for IPv6 (RFC 3849). Private picks come from 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16, each address equally likely. "Public-looking" draws from all 4,294,967,296 IPv4 addresses and skips private, loopback, link-local, multicast, documentation and other reserved blocks; an address left over may belong to a real machine, so do not scan or contact random addresses. The range choice uses the addresses or CIDR block you type and includes both ends. IPv6 global draws inside 2000::/3. Nothing is checked against a live network.