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.

IP version

Addresses a registry has already handed out. Private, loopback, link-local, multicast, documentation and other reserved blocks are left out.

Whole number from 1 to 1000.

More options

Sets the mask, network and prefix shown with each address.

The same seed and settings give the same list again. Leave it empty for a new list every time.

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.

RangeBlockUse it for
Public1.0.0.0 to 223.255.255.255, minus the blocks belowAnything that should look like a real internet host: log samples, geo-IP tests, UI mock-ups.
Private, class A10.0.0.0/8Large company, campus and cloud networks.
Private, class B172.16.0.0/12Mid-sized networks and Docker bridge networks.
Private, class C192.168.0.0/16Home and small-office routers.
Documentation192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24Tutorials, docs, bug reports and unit tests. Routers drop them.
Loopback127.0.0.0/8Traffic that stays on the same machine. 127.0.0.1 is localhost.
Link-local169.254.0.0/16The address a device picks when DHCP fails.
Shared space100.64.0.0/10Carrier-grade NAT inside an internet provider.
Benchmarking198.18.0.0/15Lab performance tests of network devices.
Multicast, class D224.0.0.0/4One-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.

TypePrefixUse it for
Global unicast2000::/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 localfc00::/7 (this tool uses fd00::/8)Private networks, the IPv6 counterpart of RFC 1918 (RFC 4193).
Link-localfe80::/10Every interface sets one up on its own. Never routed.
Documentation2001:db8::/32Examples and docs (RFC 3849). RFC 9637 added a second block, 3fff::/20.
Multicastff00::/8One-to-many traffic. The two digits after ff are the flags and the scope.
Loopback::1/128Localhost. 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.

ClassFirst octetDefault maskHosts per network
A1 to 126255.0.0.0 (/8)16,777,214
B128 to 191255.255.0.0 (/16)65,534
C192 to 223255.255.255.0 (/24)254
D224 to 239noneMulticast groups
E240 to 255noneReserved

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

1

Pick a version and a range

Choose IPv4 or IPv6, then an address range: public, private, documentation, a country or your own CIDR block.

2

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.

3

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:

Input
IPv4, documentation range, 3 addresses
Output
192.0.2.176 192.0.2.97 192.0.2.69

Frequently Asked Questions

Are these real IP addresses?
They are valid, correctly formatted addresses. In public mode they come from space that registries have already handed out, so some of them belong to real servers or routers. The tool does not check whether an address is in use. Documentation, private and the other special ranges are never assigned to a device on the public internet.
Which IP range is safest for examples and documentation?
Use the documentation ranges. For IPv4 these are 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24 (RFC 5737). For IPv6 it is 2001:db8::/32 (RFC 3849). Nobody uses them and routers drop them, so no traffic you send by mistake reaches a third party.
Can this tool give me a fake IP address to hide my own?
No. It produces text. It does not change the address your device uses on the internet. To hide your address you need a VPN or a proxy. This tool is for test data, mock-ups, screenshots and teaching.
Why does public mode never show addresses like 10.x.x.x or 192.168.x.x?
Those addresses are private. Public mode skips every block in the IANA special-purpose registry: private, loopback, link-local, shared space (CGNAT), benchmarking, documentation, multicast and reserved. Choose a private range if you want them.
How do I generate IP addresses inside my own subnet?
Pick "Custom CIDR block" and enter a network such as 10.20.0.0/22 or 2001:db8:abcd::/48. Every address in the list stays inside it. For IPv4 the network and broadcast addresses are skipped.
Do IP address classes still matter?
Not for routing. CIDR replaced classes in 1993 (RFC 1519, later RFC 4632). Classes are still taught and still appear in exams, so the tool shows the class and its default mask. To see a real subnet, choose a prefix such as /24 under More options.
Can I get the same list again?
Yes. Type a seed under More options. The same seed with the same settings returns the same list on any device. Leave the seed empty to get a new list each time.
How many addresses can I generate, and can they repeat?
Up to 1000 per batch, and no address repeats inside a batch. A small range holds fewer addresses than you may ask for. A /30 block, for example, has two usable hosts. In that case the tool tells you how many it could make.
Does the tool send my settings or results to a server?
No. It runs in your browser and draws random numbers with crypto.getRandomValues. Nothing is uploaded or stored.
How accurate is the country option?
It shows addresses from blocks that the regional registry delegated to that country. The registry records where the holder is based, not where an address is used. Cloud, VPN and mobile addresses can sit anywhere, so a geolocation database may place some of them in another country.

Related Tools

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.

As featured on

CodeItBro - Free dev tools + practical guides to help you ship faster | Product HuntCodeItBro - Free Online Developer Tools badgeCodeItBro badge