Network Tools · 100% client-side
Random IP Generator
Generate random IPv4 and IPv6 addresses in bulk for testing, mock data, and documentation. Custom subnet or CIDR range, public and private filters, batch up to 1,000 — copy or download, no sign-up.
Click any address to copy it. Badges show the address class — handy when you generate a random IP for testing firewalls, parsers, or rate limiters.
One tool for every random IP workflow
Use this page as a random IPv4 generator for unit tests and seed data, or flip to the IPv6 tab for a full-featured IPv6 address generator with compressed, full, and uppercase output. Every random IPv4 address generator mode — public only, private, documentation, custom CIDR, custom range — draws from crypto.getRandomValues(), so distribution stays uniform no matter how you slice the space.
Need a random public IP generator that skips every private and reserved block? Pick Public only. Simulating a LAN? The random private IP generator mode draws from the three RFC 1918 ranges weighted by size. Writing docs? The TEST-NET mode is a safe random documentation IP source whose addresses can never be assigned to real networks. The custom modes make it a true random IP subnet generator: type any CIDR such as 10.20.0.0/16 and generate random IPv6 or IPv4 addresses strictly inside it — or simply use it as a random IP address generator for mock API responses and log fixtures.
How random IP generation works
IPv4 — 32 bits
An IPv4 address is four decimal octets (0–255), e.g. 192.0.2.45. The whole space holds 232 = 4,294,967,296 addresses — effectively exhausted, which is why random public draws must skip the reserved blocks below.
When you generate a random IPv4 address here, the tool draws 32 uniform random bits with crypto.getRandomValues() — cryptographic randomness, not Math.random().
IPv6 — 128 bits
An IPv6 address is eight hexadecimal groups, e.g. 2001:db8::1 (compressed) or 2001:0db8:0000:0000:0000:0000:0000:0001 (full). The space holds 2128 = 340,282,366,920,938,463,463,374,607,431,768,211,456 addresses — about 340 undecillion.
This random IPv6 generator draws 128 uniform random bits inside your chosen prefix and compresses the longest zero run per RFC 5952.
Private IPv4 ranges (RFC 1918)
| Range | Addresses | Use |
|---|---|---|
| 10.0.0.0/8 | 16,777,216 | Large private networks |
| 172.16.0.0/12 | 1,048,576 | Medium private networks |
| 192.168.0.0/16 | 65,536 | Home & small office LANs |
Documentation ranges (safe for examples)
| Range | Addresses | Standard |
|---|---|---|
| 192.0.2.0/24 | 256 | TEST-NET-1 · RFC 5737 |
| 198.51.100.0/24 | 256 | TEST-NET-2 · RFC 5737 |
| 203.0.113.0/24 | 256 | TEST-NET-3 · RFC 5737 |
| 2001:db8::/32 | 296 | IPv6 docs · RFC 3849 |
Frequently asked questions
How do I generate a random IP address? +
Pick IPv4 or IPv6, choose a range such as public only or a custom subnet, set how many addresses you need, and click Generate. This random IP generator creates each address with your browser's cryptographic random number generator, so every one of the 4,294,967,296 possible IPv4 addresses has an equal chance of appearing. Copy a single address, or copy or download the whole batch.
How do I generate a random IPv6 address? +
Switch to the IPv6 tab and pick a mode: global unicast (2000::/3), unique local (fd00::/8), link-local (fe80::/10), documentation (2001:db8::/32), or your own custom prefix. This random IPv6 generator outputs full notation like 2001:0db8:0000:0000:0000:ff00:0042:8329 or compressed notation like 2001:db8::ff00:42:8329, in lowercase or uppercase hex. Generate up to 1,000 addresses per batch.
Can I generate random public IP addresses that exclude private and reserved ranges? +
Yes. Choose the Public only mode. The generator skips the private RFC 1918 ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), loopback 127.0.0.0/8, link-local 169.254.0.0/16, multicast 224.0.0.0/4, the documentation ranges 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24, plus other reserved blocks, and keeps drawing until every address in your batch is a routable public IP.
How do I generate random IP addresses inside a specific subnet or CIDR range? +
Select the Custom CIDR mode and type a subnet such as 192.168.1.0/24. The tool computes the range from the prefix length: a /24 holds 256 addresses and a /16 holds 65,536. It then draws uniform random host addresses inside that subnet. You can also enter an explicit start and end address in Custom range mode. IPv6 works the same way with a custom prefix like 2001:db8:abcd::/48.
What is a fake IP address generator used for? +
Developers use a fake IP generator to seed test databases, validate IP input fields and parsers, create mock API responses, test firewall rules and rate limiters, anonymize real addresses in shared logs, and build documentation examples. The addresses are format-valid but point at no real host, so they are safe to paste into code, tests, and docs. Note that a generated address does not hide your real IP; that requires a VPN or proxy.
Are randomly generated IP addresses real or reachable? +
The addresses are syntactically valid, but most will not correspond to a real reachable host. With 4,294,967,296 possible IPv4 addresses, a random draw almost never lands on an active server, and you should never assume ownership or reachability. For examples that must never route to a third party, use the Documentation ranges mode, which uses blocks reserved for documentation (RFC 5737 and RFC 3849) that can never be assigned to real networks.
What is the difference between IPv4 and IPv6? +
IPv4 uses 32-bit addresses written as four decimal octets, for example 192.0.2.45, giving 4,294,967,296 total addresses, a space the internet has effectively exhausted. IPv6 uses 128-bit addresses written as eight hexadecimal groups, for example 2001:db8::1, giving 340,282,366,920,938,463,463,374,607,431,768,211,456 total addresses, roughly 340 undecillion. This tool generates both formats.
Does this random IP generator send my data to a server? +
No. The generator runs entirely in your browser using the Web Crypto API (crypto.getRandomValues), with zero network requests, no tracking, and no sign-up. Your settings and generated addresses never leave your device. You can even disconnect from the internet after the page loads and keep generating.
Related IP tools
Free tool by NRTechStudio