Random IP address generator

IPv4 and IPv6 addresses for log lines, firewall rules, audit trails and access tables — drawn only from the blocks the internet reserves for documentation, so none of them is a real host.

Generate IP addresses →All internet types

Generate IP addresses now

A sample from the real generator, with a fixed seed. The live version loads in a moment.

ipv4,ipv6
198.51.100.34,2001:db8:412a:5f8f:a327:bcf0:8ff8:9561
203.0.113.23,2001:db8:ae6e:fa61:9aff:8cad:5f92:1cae
198.51.100.152,2001:db8:313b:47c8:3462:03a2:af56:110b
203.0.113.123,2001:db8:b4e7:ee32:11b6:aab1:7edf:2633
192.0.2.244,2001:db8:caaa:5c62:f9cb:c8b3:df60:7681
203.0.113.162,2001:db8:772b:353b:4138:e6bc:1b3c:9fe4

Why these addresses, and not any random four numbers

Four random numbers between 0 and 255 make a valid-looking IPv4 address, and most of the time it is someone’s. Real addresses in test data leak further than expected: a fixture becomes a screenshot in a bug report, a seeded log is shipped to a monitoring service, a demo dataset ends up in a public repository. An address that belongs to a real network can then trigger abuse reports, look like an indicator of compromise in a security tool, or simply point at a stranger.

Two standards set aside address space that is never routed on the public internet, precisely so that documentation and examples have something to use. This generator draws only from those:

Field typeRangeDefined byExample
IPv4 Address192.0.2.0/24 (TEST-NET-1), 198.51.100.0/24 (TEST-NET-2), 203.0.113.0/24 (TEST-NET-3)RFC 5737198.51.100.42
IPv6 Address2001:db8::/32RFC 38492001:db8:0c1f:9a00:7e21:0042:b3d4:0001

IPv4 host parts run from .1 to .254, so the network and broadcast addresses never appear. IPv6 addresses are written in eight-group form with no :: compression and leading zeros kept in the six random groups, which is valid and easier to eyeball in a column than the compressed form.

What that means for your tests

Because the space is small — three /24 blocks, 762 usable IPv4 addresses — a large file repeats addresses. For most log and audit fixtures that is realistic: real traffic comes from a few clients many times. If a column must be unique, turn on Unique; past 762 rows of IPv4 that is impossible, and the builder says so. Use IPv6 for larger unique sets.

The addresses will not geolocate, will not match a real ASN, and a ping will fail. Code that classifies addresses — private, loopback, public — will see these as a special-purpose documentation range — Python’s ipaddress module, for one, reports them as not global. If the behaviour under test depends on an address looking public, that is a case to construct by hand with an address you control.

Typical schemas

An access log, generated with a sequential timestamp so the lines are in order:

timestamp,client_ip,method,path,status,user_agent
2026-05-01T08:00:00Z,203.0.113.17,GET,/api/orders,200,Mozilla/5.0 (Windows NT 10.0; ...
2026-05-01T08:00:41Z,198.51.100.204,POST,/api/login,401,Mozilla/5.0 (Macintosh; ...

Combine an IP column with Datetime (sequential order), a Custom List of methods and status codes, and User Agent. For a device inventory add MAC Address and Hash; for an allow-list, a few dozen unique IPv4 rows are enough.

Common questions

Are these real IP addresses?

They are syntactically valid, but they come only from ranges reserved for documentation by RFC 5737 (IPv4) and RFC 3849 (IPv6). Those blocks are never routed on the public internet, so no generated address belongs to a real host.

Why do I see the same IPv4 address twice?

The three documentation blocks hold 762 usable IPv4 addresses, so a large file repeats some. Turn on Unique to avoid repeats up to that limit, or use IPv6, whose documentation prefix is far larger.

Can I generate private addresses like 10.x or 192.168.x?

Not with the IP field types, which deliberately stay in the documentation ranges. For private ranges use a Pattern field such as 10.0.#.# or a Regex field, keeping in mind the values are unchecked text.

Can I use these for a geolocation or IP reputation test?

No. Documentation addresses have no location, owner or reputation, and many libraries classify them as reserved. Tests that depend on those properties need addresses chosen for the purpose.

Is the IPv6 output compressed?

No. Addresses are written as eight groups with no :: shortening and leading zeros kept in the random groups, which every IPv6 parser accepts and which lines up in a column. Compress them in your own code if the system under test expects the short form.

Last updated