Random IP Address Generator
Generate random IPv4 and IPv6 addresses for testing. Pick a public, private or documentation range, a country or your own CIDR block, then copy the list or download it as TXT, CSV or JSON.
Pick a range and press Generate.
Rate Random IP Address Generator
How useful was this tool? Your rating helps others find it.
Random IP addresses for testing and mock data
Use this tool when you need IP addresses that are correctly formatted and fall in the right range: seed data for a database, sample lines for a log parser, rows for a firewall test, or a screenshot that needs a believable address. Choose IPv4 or IPv6, pick a range and press Generate.
Public mode never returns a private, loopback or reserved address, so the list passes the same checks a real client address would. For examples that other people will read, use the documentation range. It is set aside for exactly that, and no router forwards it.
IPv4 ranges and what they are for
Each option in the range menu matches a block from the IANA special-purpose registry. Public addresses are everything else from 1.0.0.0 to 223.255.255.255. The tool also skips addresses that end in .0 or .255.
| Range | Block | Use it for |
|---|---|---|
| Public | 1.0.0.0 to 223.255.255.255, minus the blocks below | Anything that should look like a real internet host: log samples, geo-IP tests, UI mock-ups. |
| Private, class A | 10.0.0.0/8 | Large company, campus and cloud networks. |
| Private, class B | 172.16.0.0/12 | Mid-sized networks and Docker bridge networks. |
| Private, class C | 192.168.0.0/16 | Home and small-office routers. |
| Documentation | 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 | Tutorials, docs, bug reports and unit tests. Routers drop them. |
| Loopback | 127.0.0.0/8 | Traffic that stays on the same machine. 127.0.0.1 is localhost. |
| Link-local | 169.254.0.0/16 | The address a device picks when DHCP fails. |
| Shared space | 100.64.0.0/10 | Carrier-grade NAT inside an internet provider. |
| Benchmarking | 198.18.0.0/15 | Lab performance tests of network devices. |
| Multicast, class D | 224.0.0.0/4 | One-to-many streams such as IPTV and mDNS. |
IPv6 ranges
IPv6 has no private block in the IPv4 sense. Unique local addresses play that role. The tool shows IPv6 in compressed form (RFC 5952) unless you choose the full form.
| Type | Prefix | Use it for |
|---|---|---|
| Global unicast | 2000::/3 (this tool draws from 2400::/12, 2600::/12, 2800::/12, 2a00::/12 and 2c00::/12) | Public addresses. Those five blocks are the ones IANA delegated to the regional registries. |
| Unique local | fc00::/7 (this tool uses fd00::/8) | Private networks, the IPv6 counterpart of RFC 1918 (RFC 4193). |
| Link-local | fe80::/10 | Every interface sets one up on its own. Never routed. |
| Documentation | 2001:db8::/32 | Examples and docs (RFC 3849). RFC 9637 added a second block, 3fff::/20. |
| Multicast | ff00::/8 | One-to-many traffic. The two digits after ff are the flags and the scope. |
| Loopback | ::1/128 | Localhost. It is a single address, so the tool does not offer it. |
IP address classes and default masks
Before 1993 the first octet decided the size of a network. Classless routing (CIDR) replaced that scheme, but classes are still taught and still turn up in exams, so the tool shows them. When you leave the subnet mask on its default, the tool uses the class default from this table.
| Class | First octet | Default mask | Hosts per network |
|---|---|---|---|
| A | 1 to 126 | 255.0.0.0 (/8) | 16,777,214 |
| B | 128 to 191 | 255.255.0.0 (/16) | 65,534 |
| C | 192 to 223 | 255.255.255.0 (/24) | 254 |
| D | 224 to 239 | none | Multicast groups |
| E | 240 to 255 | none | Reserved |
The first octets 0 and 127 are reserved (this network and loopback), so usable class A runs from 1 to 126.
How the country option works
The five regional internet registries (ARIN, RIPE NCC, APNIC, LACNIC and AFRINIC) publish which IPv4 blocks they delegated to each country. The tool picks one of the 40 largest blocks of the country you choose, then a random address inside it. Blocks of /9 or larger are left out, because those legacy blocks mix government, corporate and unrelated owners. The data is a snapshot from October 2026. The option is available for IPv4 only.
A registry records where the holder is based, not where an address is used. Cloud, VPN and mobile addresses can sit anywhere, so a geolocation lookup may put some of them in another country. Treat the result as plausible test data, not as a location.
Public addresses can belong to real devices
Every public address comes from space that a registry has handed out, so a few may point at real servers or home routers. Use them as text in test data and mock-ups. Do not scan, ping or connect to them. For examples you plan to publish, choose the documentation range instead. Nobody owns it and no router forwards it.
How this IP address generator works
The generator builds each address from random bits and then checks it against the IANA list of special-purpose ranges. In public mode it keeps only addresses that are not private, loopback, link-local, multicast, reserved or meant for documentation. Addresses that end in .0 or .255 are skipped, because they look like network or broadcast addresses.
Private, documentation and the other special ranges draw from their fixed blocks. The country option picks one of the largest blocks that a regional registry delegated to that country, then a random address inside it. A custom CIDR block limits the list to a network you type. The class, mask, network and host range shown with each address come from the prefix you pick.
Randomness comes from the secure random generator in your browser, so two runs differ. If you enter a seed, the tool switches to a seeded generator, and the same seed with the same settings returns the same list. Every address in a batch is unique, and nothing leaves your browser.
How to generate random IP addresses
Pick a version and a range
Choose IPv4 or IPv6, then an address range: public, private, documentation, a country or your own CIDR block.
Set the amount and format
Enter how many addresses you need and how to show them: plain, with a prefix or with a port. Open More options to set the subnet mask or a seed.
Copy or download
Press Generate for a new list. Copy one address or the whole list, or download it as TXT, CSV or JSON.
Example Usage
Three addresses from the documentation range:
Frequently Asked Questions
Are these real IP addresses?
Which IP range is safest for examples and documentation?
Can this tool give me a fake IP address to hide my own?
Why does public mode never show addresses like 10.x.x.x or 192.168.x.x?
How do I generate IP addresses inside my own subnet?
Do IP address classes still matter?
Can I get the same list again?
How many addresses can I generate, and can they repeat?
Does the tool send my settings or results to a server?
How accurate is the country option?
Related Tools
Random String Generator
Generate random strings with specific length and character sets (A-Z, a-z, 0-9, Symbols).
Random Email Address Generator
Generate random email addresses for testing. Pick safe example domains, plus aliases of your own address or a custom domain, then copy the list or download TXT, CSV or JSON.
Random Phone Number Generator
Fake phone numbers for testing: safe 555 numbers by US state, plus valid mobiles and landlines for many countries.
IP to Binary Converter
Convert IPv4 and IPv6 addresses to binary, hex, and decimal formats.
IP Hex Converter
Convert IPv4 addresses to hexadecimal and back.
Binary to IP Converter
Convert binary to IPv4 addresses and IP to binary.
Comments
Comments are provided by Disqus. Loading them connects to Disqus, which sets cookies and processes data under its own privacy policy.
The Random IP Address Generator is maintained by CodeItBro. We aim to provide the best free developer tools on the web. If you have feedback or suggestions, please visit our contact page.

