Random IP Address Generator

–fresh addresses from crypto.getRandomValues
–in this batch
–possible addresses in the space
–source: crypto.getRandomValues
#AddressType
The generation source is the browser cryptographic random number generator, and the address math follows the standards: IPv4 is four octets of 0-255, IPv6 is eight groups of four hex digits, and the private scope implements RFC 1918 - the 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 ranges reserved for internal networks.
Deliberately excluded: 0.0.0.0, 127.0.0.0/8 (loopback), 169.254.0.0/16 (link-local) and 255.255.255.255, so every output is safe as a placeholder in forms, fixtures and demos. For the wider numeric family on this site, the random number generator covers plain integer draws, the UUID generator covers identifiers, and the random PIN generator covers short codes.

Generate random IP addresses in one click: IPv4, IPv6, or a mix, in batches up to 25, drawn from the browser's cryptographic random number generator - not Math.random - so the addresses are uniform across the whole space and safe to use as test fixtures.

Bottom line: the Scope switch is what makes this useful. Public-looking mode draws from the routable IPv4 space while quietly excluding the reserved blocks - 0.0.0.0, the 127.0.0.0/8 loopback, 169.254.0.0/16 link-local and 255.255.255.255 - so nothing broken lands in your demo; private mode draws only from the RFC 1918 ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) that real internal networks actually use.

Typical uses: form-field and API payloads that need a syntactically valid address, database seed data, logging and parsing tests, QA fixtures, and teaching - the private-range mode doubles as a demonstration of which addresses your home router hands out and why they never appear on the public internet.

How to use

  1. Pick the version (IPv4, IPv6 or mixed) and a batch size, then hit Regenerate - every draw is fresh from crypto.getRandomValues.
  2. Switch Scope to private-only when you need addresses from the ranges home and office networks actually use (10.x, 172.16-31.x, 192.168.x).
  3. Copy any address from the table, or set the batch size in the URL (?n=25) to share a pre-sized link.
Good to know — IPv4 space: 4,294,967,296 addresses (32-bit, four octets 0-255). RFC 1918 private blocks: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 - about 17.9 million addresses that never route publicly. Reserved and excluded by the generator: 0.0.0.0, 127.0.0.0/8 loopback, 169.254.0.0/16 link-local, 255.255.255.255 broadcast. IPv6: 128-bit, eight hex groups, 2^128 addresses. Source: crypto.getRandomValues, uniform draws.
Quick reference — QA pairing: use public-looking addresses in user-facing test data where the string must look real, and private-range addresses in server configs, docker-compose files and network diagrams where an internal-looking value matters. For identifier-shaped test data, the UUID generator and random PIN generator cover the v4-UUID and short-code cases.

Frequently asked questions

Are these random IPs safe to use in tests?

Yes - that is the design. Public-looking mode excludes the reserved blocks (loopback, link-local, broadcast and the 0.0.0.0 any-address) so every address parses, routes on paper, and will not break form validation or parsers. They are, of course, placeholders: some may belong to real hosts on the internet, so use them in fixtures and demos, not as traffic targets.

What are the private IP ranges?

RFC 1918 reserves three blocks for internal networks that never route on the public internet: 10.0.0.0-10.255.255.255, 172.16.0.0-172.31.255.255, and 192.168.0.0-192.168.255.255 - about 17.9 million addresses. Your home router hands out 192.168.x.x addresses for exactly this reason; the private mode draws only from these ranges.

How many IPv4 and IPv6 addresses exist?

IPv4 has 4.29 billion (2 to the 32nd) and they are exhausted as a public pool - which is why IPv6 exists: 2 to the 128th, about 340 undecillion addresses, written as eight groups of four hex digits. The generator draws uniformly from both spaces so you can see the format difference directly.

Why do the results say crypto.getRandomValues?

It is the browser's cryptographic random source - the same primitive behind key generation - rather than the predictable Math.random. For address-shaped test data the difference rarely matters, but uniform draws cost nothing here, and the stats block shows it as provenance so you know what produced the batch.

Can I generate IPs for load testing or scanning?

Do not point traffic at random public addresses - that is someone's server, and probing it can be illegal in many jurisdictions. This generator is for syntax: fixtures, seeds, validation demos and teaching. For network testing, use the private ranges on networks you own.

Related tools