The most advanced free random IP address generator. Generate IPv4, IPv6, private, public, class-based, CIDR subnet, country-range, and IP:PORT addresses. Bulk export as TXT, CSV, or JSON — no signup, runs 100% in your browser.
Quick Answer: What Is a Random IP Generator?
A random IP address generator creates valid IPv4 or IPv6 addresses not assigned to any real user. Choose from 5 generation modes — Type, CIDR Block, Custom Range, Country, or IP Validator — set quantity up to 500, and export as TXT, CSV, or JSON. Fully client-side: no data ever leaves your browser.
Generation Mode
IP Type
Quantity
10Configure options and click Generate
Up to 500 IPs · IPv4 & IPv6 · CIDR · Country · TXT / CSV / JSON
OSINT & Network Utility Expert
Robert has spent over a decade building network diagnostic tools and working with development teams on IP infrastructure testing. He regularly creates IP generators, subnet calculators, and packet analysis utilities for security research labs. In his own words: "A good IP generator isn't just about throwing out random numbers — it must respect RFC standards, exclude reserved ranges, and give developers the exact format their pipeline expects."
View All Articles by RobertA random IP address generator is a free tool that produces valid, correctly formatted IP addresses — either IPv4 or IPv6 — that are not assigned to any real device or user on the internet. Think of it as a test data factory for your network work.
Every device that connects to the internet needs a real IP address. But when you are building software, testing APIs, filling databases, or teaching networking concepts, you need addresses that look real without being real. That is exactly what our random IP address generator provides — on demand, in bulk, with zero signup.
Want to understand what a real IP address actually reveals? Run any generated address through our IP Geolocation Lookup to see exactly what data websites collect from a live connection. For a deeper foundation, read our complete guide to IP addresses.
Good to Know: Generated IP addresses are for testing and development only. Never use a randomly generated IP to misrepresent your actual network location or bypass security systems. To check your real IP address, visit our IP checker homepage.
Most online generators give you one format and one button. Our tool gives you full control across five modes:
192.168.1.0/24 and generate hosts within itOur tool generates both IPv4 and IPv6 addresses. Understanding the difference helps you pick the right type for your project. For a full technical breakdown, see our IPv4 vs IPv6 header comparison guide.
IPv4 uses 32 bits, written as four decimal numbers (called octets) separated by dots. Each octet ranges from 0 to 255. Example: 203.45.78.129
There are about 4.3 billion possible IPv4 addresses (2³²). The internet has long outgrown this limit. Most IPv4 blocks are already allocated globally, which is why IPv6 was invented.
IPv6 uses 128 bits, written as eight groups of four hexadecimal digits separated by colons. Example: 2001:0db8:85a3::8a2e:0370:7334
IPv6 provides approximately 340 undecillion addresses — enough to assign billions of IPs to every grain of sand on Earth. Leading zeros are omitted and consecutive zero groups collapse into :: in compressed format.
Use IPv4 when testing applications that parse classic dot-notation addresses. Use IPv6 when your stack needs to handle modern dual-stack environments or you are testing IPv6-specific validation logic.
Want to expand a compressed IPv6 into its full 128-bit form? Use our IPv6 Expansion Tool alongside this generator.
Before CIDR became the standard in 1993, IP addresses were split into fixed classes based on the first octet. Our generator lets you target specific classes — which matters when your test data must reflect real-world network sizes. For a full breakdown, see our IP address classes guide.
| Class | First Octet Range | Default Subnet | Max Hosts | Typical Use |
|---|---|---|---|---|
| Class A | 1 – 126 | /8 (255.0.0.0) | 16,777,214 | Large ISPs, global corporations |
| Class B | 128 – 191 | /16 (255.255.0.0) | 65,534 | Universities, medium businesses |
| Class C | 192 – 223 | /24 (255.255.255.0) | 254 | Home networks, small offices |
| Class D | 224 – 239 | N/A | N/A | Multicast groups |
| Class E | 240 – 255 | N/A | N/A | Experimental / reserved |
Select Class A in our generator when you need to simulate large enterprise traffic. Use Class C for typical home-network scenarios. For precision subnet work, switch to CIDR Block mode and pair it with our CIDR Calculator and Subnet Builder.
Note on 127.x.x.x Loopback: The entire 127.0.0.0/8 block is reserved for loopback. 127.0.0.1 is the standard localhost address. Packets sent to any 127.x.x.x address never leave your device — they loop back internally. Use our Loopback mode to generate addresses across this full range for local testing.
Not all IP addresses are routable on the public internet. Private IP addresses, defined in RFC 1918 (Wikipedia), are reserved for internal network use. Your home router uses Network Address Translation (NAT) to let every device on your private network share one single public IP.
Understanding private ranges is essential — especially when you are generating test data that must simulate internal corporate traffic versus public internet traffic. Read our guide to reading IP address formats for a practical breakdown of how these ranges work in real networks.
| Range | CIDR Block | Total Addresses | Common Use |
|---|---|---|---|
| 10.0.0.0 – 10.255.255.255 | 10.0.0.0/8 | 16,777,216 | Large corporate networks, VPNs |
| 172.16.0.0 – 172.31.255.255 | 172.16.0.0/12 | 1,048,576 | Medium-sized business networks |
| 192.168.0.0 – 192.168.255.255 | 192.168.0.0/16 | 65,536 | Home routers, small offices |
When you select IPv4 Private in our generator, addresses are drawn randomly from all three ranges. This is perfect for:
X-Forwarded-For header test scenariosDeveloper Tip: Always include a mix of private and public addresses in your test data. Many production bugs only appear when an application mishandles private-range IPs passed via proxy headers. Enable No Duplicates mode and generate a mixed set — then export as JSON for direct import into your test fixtures.
Developers, QA engineers, security researchers, and network educators use a random IP address generator every day. Here are the most common scenarios where this tool saves real time.
Any application that handles IP addresses — geolocation APIs, fraud detection systems, access control lists — needs realistic test data. Manually typing test IPs is slow and introduces errors. Generate up to 500 unique addresses instantly and paste them directly into your test suite or seed script.
Staging databases need to look realistic without exposing real users. Random IPs serve as perfect placeholder values for columns like last_login_ip, signup_ip, or session_origin. Export as CSV and import directly into MySQL, PostgreSQL, or MongoDB.
Network engineers configuring GNS3, Cisco Packet Tracer, or EVE-NG labs need large pools of addresses fast. Generate a block of random Class B or Class C addresses in seconds. Use CIDR mode to stay within a specific subnet.
Security professionals testing WAF rules, input sanitization, or IP validation logic need varied address sets that stress-test edge cases. Our generator excludes reserved ranges correctly, so your test data reflects what real traffic looks like.
When load-testing with Apache JMeter or Locust, injecting randomized source IPs into X-Forwarded-For headers tests per-IP rate limiting, abuse detection, and throttling systems under realistic conditions.
Teachers and students use random IPs for subnetting exercises, binary conversion practice, and classroom demos. Combine this tool with our IP to Binary Converter for a complete hands-on networking lesson.
Privacy advocates demonstrating how IP geolocation works use generated IPs to show audiences what data websites see. Want to see exactly what your real IP reveals right now? Check it at our IP address checker. And if you want to hide that real IP, read our guide on how to hide your IP address for free.
CIDR (Classless Inter-Domain Routing) notation lets you describe any IP range precisely. Enter a CIDR block into our generator and we calculate the exact host range for that subnet — then generate random addresses within it.
A CIDR block looks like this: 192.168.1.0/24
The number after the slash is the prefix length — how many bits are fixed for the network. The remaining bits define the host range. Here is the math:
| CIDR | Subnet Mask | Usable Hosts | Example Range |
|---|---|---|---|
/8 | 255.0.0.0 | 16,777,214 | 10.0.0.1 – 10.255.255.254 |
/12 | 255.240.0.0 | 1,048,574 | 172.16.0.1 – 172.31.255.254 |
/16 | 255.255.0.0 | 65,534 | 192.168.0.1 – 192.168.255.254 |
/24 | 255.255.255.0 | 254 | 192.168.1.1 – 192.168.1.254 |
/28 | 255.255.255.240 | 14 | 10.0.0.1 – 10.0.0.14 |
/32 | 255.255.255.255 | 1 | Single host only |
Our CIDR mode validates your input live and shows the host count instantly. The tool excludes the network address and broadcast address automatically — giving you only usable host addresses.
10.10.0.0/16)Pro Tip: Use CIDR mode when populating mock VPC (Virtual Private Cloud) environments on AWS, GCP, or Azure. Match your generator's CIDR block to your cloud network's actual subnet — then use those addresses as realistic node IPs in your infrastructure documentation.
Our IP Validator mode does far more than a simple format check. Enter any IPv4 or IPv6 address and get a full breakdown in real time — no server call, no wait, no tracking.
For IPv4 addresses, the validator reveals:
in-addr.arpa PTR record formatFor IPv6 addresses, the validator confirms format validity, loopback status (::1), and link-local status (fe80:: prefix).
Use these patterns in your backend to validate IPs before storing them in your database:
# PHP — validates both IPv4 and IPv6
if (filter_var($ip, FILTER_VALIDATE_IP)) {
echo "Valid IP";
}
# PHP — IPv4 only
if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
echo "Valid IPv4";
}
# Python — with type and property detection
import ipaddress
try:
obj = ipaddress.ip_address("192.168.1.1")
print(f"Version: {obj.version}") # 4 or 6
print(f"Private: {obj.is_private}")
print(f"Loopback: {obj.is_loopback}")
except ValueError:
print("Invalid IP")
Always validate server-side. Client-side JavaScript checks can be bypassed by any user. Use PHP's filter_var() or Python's ipaddress module in your backend for authoritative validation before any IP reaches your database.
Every IP is generated locally in your browser using JavaScript — no server call, no data logging, no API rate limits. Here is exactly how each mode works:
Four random octets are generated (0–255). All reserved ranges are excluded: private blocks (10.x, 172.16–31.x, 192.168.x), loopback (127.x), link-local (169.254.x), shared address space (100.64–127.x), and multicast/experimental (224+). The result is a clean, publicly routable address.
A random RFC 1918 block is selected. The generator then produces a random address within that block — always valid, always within the correct private range.
The tool converts your CIDR notation to its integer representation, calculates the first and last usable host addresses, then generates random integers within that range and converts them back to dot-notation. Network and broadcast addresses are automatically excluded.
Each country has multiple real IANA-allocated IP blocks stored as integer ranges. A random block is selected for the chosen country, then a random integer within that block is converted to an IP address. This produces realistic country-specific test data without a geolocation API call.
Eight groups of four random hex characters are generated. A compression algorithm then removes leading zeros and replaces the longest consecutive zero group with ::, matching real-world IPv6 display convention.
Privacy Guarantee: Every address is generated client-side. No generated IPs, no user inputs, and no session data are ever transmitted to our servers. This tool runs entirely in your browser's JavaScript engine.
After generating your random IP addresses, you have four ways to get them into your workflow. No other free random IP address generator matches this export flexibility.
One IP address per line. Ready to paste directly into config files, firewall rules, allowlists, or blocklists. Works with any tool that accepts a newline-separated list.
Two columns: ip_address and type. Open directly in Excel, Google Sheets, or import into any database with a CSV loader. The type column tells you exactly which generation mode produced each address.
Each address is an object with ip and type fields. Drop directly into a JavaScript test fixture, a REST API mock, or a Python test data file. No parsing needed.
[
{ "ip": "203.45.78.129", "type": "IPv4 Public" },
{ "ip": "192.168.1.47", "type": "IPv4 Private" },
{ "ip": "2001:db8::1", "type": "IPv6" }
]
Toggle Add Port (IP:PORT) to append a random port number (1–65535) to each address. The resulting format — 203.45.78.129:8080 — is ready for socket connection tests, proxy list configurations, and load balancer testing.
| Format | Example Output | Best For |
|---|---|---|
| .TXT | 203.45.78.129 | Config files, firewall rules |
| .CSV | "203.45.78.129","IPv4 Public" | Excel, database import |
| .JSON | {"ip":"203.45.78.129","type":"IPv4 Public"} | JS fixtures, API mocks |
| IP:PORT | 203.45.78.129:8080 | Socket tests, proxy lists |
A random IP address generator creates syntactically valid IPv4 or IPv6 addresses not assigned to any real user or device. These are safe to use for software testing, database seeding, network simulation, and educational demonstrations where realistic-looking IP data is needed without exposing real users.
Generated IPs are syntactically correct — they follow the exact format of real IP addresses — but they are not tied to any specific user, device, or location. They may or may not be currently assigned by an ISP. For development purposes, they behave identically to real IPs in any code that parses or validates them.
Yes. Switch to CIDR Block mode, enter any notation like 192.168.1.0/24, and the tool calculates the valid host range for that subnet. It then generates random addresses within that exact range, excluding the network and broadcast addresses. The host count displays live as you type.
You can export as plain .txt (one IP per line), .csv (comma-separated with a type column, ready for spreadsheets), or .json (JavaScript array format). You can also enable IP:PORT format, which appends a random port number to each address for socket and proxy testing.
When enabled, the generator tracks all produced addresses in the current session and discards any repeated values before adding them to the list. This guarantees every address in your export is unique — important when you need distinct test rows in a database or unique entries in a firewall rule.
No. A generated IP address is text data only — it does not route real internet traffic. You cannot use it to browse anonymously. To mask your real IP, you need a VPN or proxy service. Check whether your VPN is actually hiding your IP with our WebRTC Leak Test.
Country mode stores real IANA-allocated IP block ranges for 10 countries (US, UK, Germany, France, Japan, India, Canada, Australia, Brazil, China). When you select a country, a random block from that country's allocation is chosen and a random address within it is generated — producing IPs that match that country's actual allocation pattern.
Pair the random IP generator with our complete network intelligence and diagnostic suite.
Stop hardcoding the same test IPs. Generate hundreds of unique, properly formatted addresses — with CIDR, country ranges, and export options no other free tool offers.