Free Generator Tool

Random IP Generator

Generate up to 10,000 random IPv4 or IPv6 addresses instantly — with full control over address type (public, private, CIDR, loopback), IP range (custom start–end), uniqueness, output format, and separator. Designed for software testing, network simulation, firewall rule testing, database seeding, and load testing. Runs entirely in your browser — no data sent anywhere.

Up to 10,000 IPs IPv4 & IPv6 modes Public / private / range Unique IPs only option CSV & clipboard export Browser-only
Network tool
Enable JavaScript to run lookups and interactive features on this page.

Hero, guides, and sidebar links below work without JavaScript. The interactive checker needs JavaScript enabled in your browser.

What Is a Random IP Generator?

A random IP generator creates IP addresses using a cryptographically secure pseudorandom number generator (CSPRNG), with configurable constraints: address version (IPv4 or IPv6), address type (public, private, or within a specific range), uniqueness, and output format. Random IP addresses are essential tools for software development, network simulation, security testing, and database seeding where real IP addresses cannot or should not be used.

Random IP generator for software testing and network simulation — generate thousands of test IP addresses

Software testing and network simulation require large sets of realistic IP addresses — a random IP generator provides unlimited test data without using real user data

How Random IPv4 Addresses Are Generated

IPv4 generation is mathematically straightforward — an IPv4 address is a 32-bit integer between 0 and 4,294,967,295. Generating a random IPv4 address means generating a random 32-bit number and converting it to dotted-decimal. The constraint is which ranges are allowed:

# Simple random IPv4 (any address including private):
import random
def random_ipv4():
return '.'.join(str(random.randint(0, 255)) for _ in range(4))

# Public-only (excluding RFC 1918, loopback, etc.):
import ipaddress, random
PRIVATE = [ipaddress.ip_network(r) for r in [
'10.0.0.0/8','172.16.0.0/12','192.168.0.0/16',
'127.0.0.0/8','169.254.0.0/16','100.64.0.0/10',
'224.0.0.0/4','240.0.0.0/4','0.0.0.0/8'
]]
def random_public_ipv4():
while True:
ip = ipaddress.ip_address(random.randint(0, 2**32-1))
if not any(ip in net for net in PRIVATE): return str(ip)

# Within a specific range (e.g. 10.0.0.0 to 10.255.255.255):
start = int(ipaddress.ip_address('10.0.0.0'))
end = int(ipaddress.ip_address('10.255.255.255'))
ip = str(ipaddress.ip_address(random.randint(start, end)))

How Random IPv6 Addresses Are Generated

IPv6 generation requires 128-bit random numbers. Most languages generate random numbers in 64-bit chunks — two are combined for a full 128-bit IPv6 address:

# Random global unicast IPv6 (2000::/3):
import random, ipaddress
def random_ipv6_global():
# Global unicast starts with binary 001 → range 2000:: to 3fff::
prefix = 0x2000000000000000 # 2000::
suffix = 0x1000000000000000 # range size
net_part = prefix + random.randint(0, suffix-1)
host_part = random.getrandbits(64)
full = (net_part << 64) | host_part
return str(ipaddress.ip_address(full))

# ULA (fd00::/8) — private IPv6:
def random_ula():
global_id = random.getrandbits(40) # 40-bit pseudo-random
subnet = random.getrandbits(16)
iface = random.getrandbits(64)
full = (0xfd << 120) | (global_id << 80) | (subnet << 64) | iface
return str(ipaddress.ip_address(full))

Who Uses a Random IP Generator — 8 Real-World Scenarios

Software Testing
Testing IP validation logic, GeoIP lookups, rate-limiting systems, and access control rules requires large sets of realistic IP addresses. Using production IPs creates privacy risks — random IPs eliminate that concern entirely.
Database Seeding
Populating development or staging databases with realistic test data requires random IP addresses for user tables, session logs, and audit trails. Generating 10,000 unique IPs here takes seconds vs writing custom seeder code.
Firewall Rule Testing
Testing firewall ACLs, security group rules, and WAF configurations requires sending traffic from diverse IP ranges. Generate a list of public IPs to test allow/deny rules, or private IPs to test internal access policies.
Load Testing
Tools like Apache JMeter, k6, and Locust support per-request IP rotation for testing rate-limiting systems. A CSV of 10,000 unique public IPs simulates traffic from distinct sources to test how your API handles IP-based throttling.
Network Education
Teaching subnetting, routing, and access control using concrete IP examples. Generate 50 random IPs from a specific range (e.g. 172.16.0.0–172.31.255.255) and ask students to identify the class, subnet, and route each belongs to.
Network Simulation
Network simulation tools (GNS3, EVE-NG, Cisco Packet Tracer) require IP addresses for virtual hosts and routing scenarios. Generate address pools for lab exercises without manually typing hundreds of individual IPs.
Penetration Testing Labs
Setting up a penetration testing lab (TryHackMe, HackTheBox-style) requires realistic IP configurations. Generate IP pools for target ranges, competing team networks, and monitoring system configurations.
Log Analysis Development
Building log parsing, IP enrichment, or SIEM ingestion pipelines requires test log data with realistic IP distributions. Generate mixed public/private IP lists to stress-test your GeoIP lookup, parsing, and aggregation logic.

IPv4 Address Ranges — Generation Reference

Understanding which ranges exist helps you choose the right type for your testing scenario. Here are the most important IPv4 ranges and their appropriate test use cases:

Range / CIDRTypeUse in TestingRoutable?
1.0.0.0 – 9.255.255.255 (approx public)Public IPv4Simulating internet traffic, GeoIP testing, rate-limit testingYes
10.0.0.0/8Private Class ALarge internal networks, cloud VPC simulation, Kubernetes pod IPsNo
172.16.0.0/12Private Class BDocker containers (172.17–172.31), AWS default VPC simulationNo
192.168.0.0/16Private Class CHome/office network simulation, SOHO device testingNo
100.64.0.0/10CGNAT (RFC 6598)Testing CGNAT detection, Jio/ISP traffic simulationNo
127.0.0.0/8LoopbackTesting localhost handling, same-machine service discoveryNo
169.254.0.0/16APIPA / Link-localTesting DHCP failure scenarios, AWS metadata endpoint mockingNo
224.0.0.0/4MulticastTesting multicast routing, IPTV system simulationLimited

Custom Range Generation — When to Use It

The custom range feature generates IPs between any two IPv4 addresses of your choice. Use custom ranges when:

  • Testing against a specific subnet: Generate all random IPs within your company's 10.50.0.0–10.50.255.255 range to test internal firewall rules
  • Simulating a specific ISP's IP pool: If you know Airtel uses 49.32.0.0–49.47.255.255, generate random IPs from that range to test ISP-specific handling
  • CIDR-aligned testing: Generate 1,000 random IPs within 192.168.10.0/24 to test within-subnet routing and access control
  • Populating IPAM test data: Fill specific IP ranges in your IPAM tool with realistic-looking test allocations

Frequently Asked Questions — Random IP Generator

The generator uses crypto.getRandomValues() — the browser's cryptographically secure pseudorandom number generator (CSPRNG), which is the same API used for cryptographic key generation. This means the output is statistically random and unpredictable. It is NOT sequential or predictable from the seed. Each generation produces a fresh, statistically independent set of addresses. For most testing purposes (database seeding, load testing, validation testing), this level of randomness is more than sufficient.

Yes — use the custom range fields. For 10.0.0.0/24 (10.0.0.0 to 10.0.0.255), enter Start IP: 10.0.0.0 and End IP: 10.0.0.255. The generator will create random IPs within that specific range. To calculate the start/end IPs for any CIDR block, use our Subnet Calculator first.

With "Unique IPs only" enabled (default), the generator ensures no duplicate IP appears in the output. It discards any generated IP that already appears in the current batch and generates a replacement. For small ranges with few IPs (like 10.0.0.0/28 with only 14 usable hosts), requesting more IPs than the range contains will cause the generator to exhaust the range — the output will contain fewer IPs than requested. Disable unique mode if duplicates are acceptable in your test data.

Private IP testing is common when: (1) Testing internal firewall rules — security groups and ACLs that apply to internal traffic need private IP test data. (2) Simulating internal services — Kubernetes pods, Docker containers, and VPC internal communication all use private IPs. (3) Testing RFC 1918 detection — your application may need to treat private IPs differently (skip GeoIP lookups, bypass rate limiting for internal services). (4) IPAM and network inventory testing — populating IP management databases with realistic internal address data.

No — generated IPs are for testing only. Using randomly generated public IPs in production could cause you to accidentally communicate with real internet hosts that happen to have those IPs. For testing public-IP-facing systems, use the documentation ranges defined in RFC 5737: 192.0.2.0/24, 198.51.100.0/24, and 203.0.113.0/24 — these are specifically reserved to never be assigned to live hosts, making them safe for use in documentation and test scenarios that won't accidentally reach real servers.

No — all IP generation happens entirely in your browser using JavaScript's crypto.getRandomValues() API. No data is transmitted to our servers. This means it works completely offline once the page loads, and your generated test data stays private on your device.

The tool generates up to 10,000 IPs per batch. For larger datasets — millions of IPs for load testing or big-data seeding — use the Python code examples on this page directly on your server or local machine. Python's random module is fast enough to generate millions of IPs in seconds, and using ipaddress.ip_network() gives you full control over ranges, subnets, and output formatting.

Related Tools

Advertisement