Copied!
Generators

Random IPv6 generator: addresses for testing, or a whole prefix in order

Generate up to 500 random 128-bit addresses, or type a base address and a prefix to list what lives inside it. Everything comes back in compressed notation, ready to copy.

How the generator works

Two modes, one form. The Base IPv6 field decides which one you get.

Leave Base IPv6 blank and you are in random mode: we take 16 bytes from PHP's random_bytes(), which reads the operating system's cryptographically secure random generator, and turn them into a valid 128-bit address.

Type a Base IPv6 and you are in range mode: we apply the prefix mask, find the network address and list the first N addresses from there. Enter 2001:db8::1 with /64 and the list starts at 2001:db8::. Use it to plan IPv6 allocations or to test an IPv6-aware application against a specific set of addresses.

Every address comes back in compressed RFC 5952 notation: runs of zero groups collapse to :: and leading zeros in each group are dropped.

How big IPv6 really is

Some numbers to put 128 bits in perspective.

IPv6 addresses are 128 bits long, which gives 2^128 of them, roughly 3.4 x 10^38. If you covered the whole surface of the earth in computers and gave each one an address, you would barely dent the supply. That abundance is the point: no more NAT, and every device on earth can have its own globally routable address.

The usual size for an end network is a /64, which holds 2^64 (about 18 quintillion) addresses. One LAN segment gets one /64, and SLAAC (Stateless Address Autoconfiguration) needs exactly that size. Home customers usually get a /56 or a /48 from their ISP, so they can carve out more subnets themselves.

What kind of address did you just generate?

The first few bits of an IPv6 address tell you what it is for.

Global unicast

Starts with 2000::/3. These are the addresses that route on the public internet.

Link-local

Starts with fe80::/10. Every IPv6 interface configures one by itself, but it never leaves the local network segment.

Unique local

Starts with fc00::/7. The IPv6 answer to private ranges, meant for use inside one organisation.

Loopback and documentation

::1 is loopback, the equivalent of 127.0.0.1 in IPv4. 2001:db8::/32 is reserved for documentation and examples, including the range mode example on this page.

Questions we get a lot

What is the difference between compressed and expanded IPv6 notation?
An IPv6 address is 8 groups of 4 hex digits separated by colons. Written out, the loopback address is 0000:0000:0000:0000:0000:0000:0000:0001; compressed it is ::1, because :: stands for one run of all-zero groups. We always output the compressed form, which is what you see in configs and on screen.
Why is the /64 prefix the default for range mode?
A /64 is the standard size for one IPv6 subnet and the smallest prefix SLAAC works with. Almost every real deployment gives each LAN segment a /64, so it is the most useful default for testing.
Can I generate addresses in a specific range like link-local?
Yes. Enter fe80:: as the base address with a /64 prefix and you get link-local addresses. For documentation addresses use 2001:db8::.
Can I generate IPv4 addresses instead?
Yes. The Random IPv4 Address Generator does the same for 32-bit addresses.

Related tools