User Rating 0.0
Total Usage 0 times
1 – 1000
Network prefix to constrain
0 – 128 bits
Presets:
Generated addresses will appear here
    Is this tool helpful?

    Your feedback helps us improve.

    About

    IPv6 uses a 128-bit address space, yielding approximately 3.4 × 1038 unique addresses. Generating test addresses by hand is error-prone. A misplaced colon or an incorrect group count invalidates the address entirely, breaking firewall rules, DNS records, or ACL entries before they reach production. This generator produces cryptographically random addresses using the browser's native CSPRNG (crypto.getRandomValues), applies canonical compression per RFC 5952, and respects user-defined prefix lengths so output falls within a target subnet.

    The tool does not simulate randomness with Math.random. It draws from the operating system's entropy pool. Addresses are formatted with zero suppression and longest-run :: collapsing. Limitation: generated addresses are syntactically valid but not guaranteed routable. They are intended for testing, documentation, and configuration templating.

    ipv6 generator random ipv6 ipv6 address network tools ipv6 subnet address generator

    Formulas

    An IPv6 address consists of 8 groups of 4 hexadecimal digits separated by colons, totaling 128 bits:

    addr = g1 : g2 : g3 : g4 : g5 : g6 : g7 : g8

    Where each gi [0000, ffff] (16 bits). The total address space is 2128.

    When a prefix of length p is specified, the first p bits are fixed and the remaining 128 p bits are randomized. The number of possible addresses within that subnet is:

    N = 2(128 p)

    RFC 5952 canonical compression: (1) remove leading zeros from each group, (2) find the longest consecutive run of all-zero groups, (3) replace that run with ::. If two runs tie in length, the leftmost wins. The :: substitution may appear at most once.

    Where addr = full IPv6 address, gi = the i-th 16-bit group, p = prefix length in bits, N = number of addresses in the subnet.

    Reference Data

    PrefixRangeScope / PurposeRFCPrefix LengthExample
    ::1LoopbackHost-only, equivalent to 127.0.0.1RFC 4291/128::1
    ::UnspecifiedAbsence of addressRFC 4291/128::
    fe80::Link-Local UnicastSingle link, auto-configuredRFC 4291/10fe80::1
    fc00::Unique Local (L=0)Private, not yet assignedRFC 4193/7fc00::1
    fd00::Unique Local (L=1)Private, locally assignedRFC 4193/8fd12:3456::1
    2001:db8::DocumentationExamples and docs onlyRFC 3849/322001:db8::1
    2001::Teredo TunnelingIPv6 over UDP/IPv4RFC 4380/322001::1
    2002::6to4 RelayAutomatic tunneling (deprecated)RFC 3056/162002:c0a8::1
    2000::Global UnicastPublic Internet routableRFC 3587/32607:f8b0:4004::1
    ff00::MulticastOne-to-many deliveryRFC 4291/8ff02::1
    ff02::1All Nodes (Link)All link-local nodesRFC 4291/128ff02::1
    ff02::2All Routers (Link)All link-local routersRFC 4291/128ff02::2
    ::ffff:0:0IPv4-MappedIPv4 inside IPv6 socketRFC 4291/96::ffff:192.168.1.1
    64:ff9b::NAT64 Well-KnownStateful IPv4/IPv6 translationRFC 6052/9664:ff9b::192.0.2.1
    100::Discard-OnlyBlack hole routingRFC 6666/64100::1

    Frequently Asked Questions

    It uses the Web Crypto API (crypto.getRandomValues), which draws entropy from the operating system's cryptographic random number generator. This is the same source used for TLS key generation and is far superior to Math.random(), which is a PRNG and not suitable for security-sensitive address generation.
    RFC 5952 defines the canonical text representation of IPv6. It removes leading zeros in each group (e.g., 0042 becomes 42) and replaces the longest consecutive sequence of all-zero groups with ::. For example, 2001:0db8:0000:0000:0000:0000:0000:0001 compresses to 2001:db8::1. Without compression, the full expanded form with all 32 hex digits plus 7 colons is shown.
    Yes. Enter a prefix (e.g., 2001:db8::) and a prefix length (e.g., /32). The generator fixes the first p bits from your prefix and randomizes the remaining 128 p bits. This means all output addresses will fall within that subnet. If the prefix you enter is shorter than the prefix length implies, trailing bits are zero-filled before masking.
    Not necessarily. An address is syntactically valid but routability depends on whether the prefix is allocated by a Regional Internet Registry (RIR) and announced via BGP. Addresses in the 2001:db8::/32 range are explicitly reserved for documentation and must never appear in production routing tables. Link-local (fe80::/10) and unique-local (fd00::/8) addresses are non-routable by design.
    The :: notation indicates one or more consecutive groups of all zeros have been collapsed. For instance, if groups 3 through 6 are all 0000, they collapse into ::. This is valid and expected. When parsing, expand :: back to the appropriate number of zero groups to restore the full 8-group address.
    The tool allows up to 1000 addresses per batch. Generation uses typed arrays (Uint16Array) and completes in under 50 ms for 1000 addresses on modern hardware. For larger datasets, generate multiple batches and export each as a text file.
    The prefix input defines the fixed network portion. The prefix length (/p) determines how many leading bits are preserved. If you enter fd00:: with /8, only the first 8 bits (fd) are locked. The remaining 120 bits are random. If your prefix contains more specific bits than the prefix length covers, those extra bits are overwritten by random data.