Random IP Address Generator

Random IPv4 & IPv6 addresses, public-only option included.

Generate random IPv4 and IPv6 addresses for test data and mock fixtures, with an option to exclude private and reserved ranges (RFC 1918, CGN, loopback, link-local, multicast). Runs entirely in your browser. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

Does the public-only option really skip private ranges?

Yes. It excludes RFC 1918 private blocks (10/8, 172.16/12, 192.168/16), carrier-grade NAT (100.64/10), loopback, link-local, documentation TEST-NET ranges and multicast/reserved space.

Generate random IPv4 and IPv6 addresses for test fixtures, mock data, documentation examples, and load-testing inputs. For IPv4 you can keep public addresses only enabled to skip private and reserved ranges, so your sample data looks like real internet traffic. Set a count, click Generate, and copy the list.

How it works

For IPv4, the tool draws four random octets (0–255) using secure browser randomness and joins them with dots. With public addresses only enabled, it re-draws any address that falls inside a private or reserved block — RFC 1918 (10/8, 172.16/12, 192.168/16), carrier-grade NAT (100.64/10), loopback (127/8), link-local (169.254/16), the TEST-NET documentation ranges, and multicast/reserved space (224/4 and above) — so only globally routable-looking addresses remain.

For IPv6, it generates eight random 16-bit groups and formats them as colon-separated hex. No address is ever pinged, resolved, or looked up; these are sample values only, produced entirely in your browser.

IPv4 address ranges and what gets filtered

Understanding which ranges the public-only filter removes helps you choose the right setting for your use case:

RangeBlockReserved for
10.0.0.0/8RFC 1918Private networks (class A)
172.16.0.0/12RFC 1918Private networks (class B)
192.168.0.0/16RFC 1918Private networks (class C, home routers)
100.64.0.0/10RFC 6598Carrier-grade NAT (CGN), used by ISPs
127.0.0.0/8RFC 1122Loopback (localhost)
169.254.0.0/16RFC 3927Link-local (APIPA auto-configuration)
198.51.100.0/24RFC 5737Documentation and examples only
203.0.113.0/24RFC 5737Documentation and examples only
224.0.0.0/4 and aboveRFC 1112Multicast and reserved space

With public-only enabled, all of these are excluded, and only addresses in globally routable space remain.

When to use public vs. all addresses

Use public addresses only when you need test data that simulates realistic external traffic — for example, seeding a geolocation database, populating a request log, or building UI components that display user IP addresses. Using private ranges in these contexts would produce obviously unrealistic data (no real user connects from 192.168.x.x).

Use all addresses when you need to test code that explicitly handles private and reserved ranges — for example, a firewall rule engine, an IP classification function, or network-segmentation logic that needs to see both private and public inputs.

Example output

With IPv4 and public only selected, a batch of three might be:

203.0.113.45
198.51.100.7
8.34.219.160

Switching to IPv6 produces values such as:

2a01:4f8:1c0c:abcd:0:0:0:1

A note on generated addresses and real hosts

Random public IPv4 addresses are statistically likely to fall inside ranges that are actually allocated to real networks and organisations. The addresses are generated as sample data only — they are not pinged, looked up, or contacted in any way. Do not use them to target, scan, or contact real hosts. For documentation examples specifically, RFC 5737 reserves 192.0.2.0/24, 198.51.100.0/24, and 203.0.113.0/24 as ranges that are safe to use in published documentation because they will never route to real hosts.