Random IP Address Generator

Generate random IPv4 and IPv6 addresses in one click. Choose public, private, or documentation addresses, stay inside any subnet you type, and add a random port if you need one.

IP version
Address type
Sort results

3,702,258,432 possible addresses in 13 separate ranges

Separate with
Generating...

What the random IP address generator does

It picks valid IP addresses at random from the kind of address you choose. Public skips every private and reserved block, Private stays inside the home and office ranges, and Documentation uses the ranges set aside for examples.

A single result also tells you what kind of address it is, such as Private network or Multicast. The addresses are only made up. Nothing is looked up, pinged, or sent anywhere.

Why use our random IP address generator

  • ·Free. No signup, no paywall, and no limit on how often you generate.
  • ·IPv4 and IPv6. Both versions, with short or full IPv6 formatting.
  • ·The right kind of address. Public addresses really skip reserved blocks, and documentation addresses are safe to publish.
  • ·Any subnet. Type a CIDR block or a start and end address to stay inside your network.
  • ·Private. Addresses are made on your device. Nothing is sent to a server.

How to generate a random IP address

  1. 1

    Choose IPv4 or IPv6

    IPv4 addresses look like 203.0.113.7. IPv6 addresses are longer, like 2001:db8::1. The generator makes a new address as soon as you switch.

  2. 2

    Pick the address type

    Choose Public, Private, Documentation, Loopback, or Any. To stay inside your own network or subnet, choose Custom range and type a CIDR block such as 192.168.1.0/24, or a start and end address.

  3. 3

    Set how many and the extras

    Ask for 1 to 1,000 addresses. Turn on No repeats, add a random port from 1024 to 65535, or skip IPv4 addresses that end in .0 or .255.

  4. 4

    Generate and copy the addresses

    Click Generate IP address. A single address shows which kind of address it is. Several addresses can be sorted, copied with a new line, comma, or space between them, or downloaded as a text file.

Private, public, and reserved IPv4 address ranges

These blocks are set aside for special uses rather than for ordinary devices on the public internet. The Public type skips all of them, which leaves 3,702,258,432 IPv4 addresses to pick from.

BlockUsed forDefined in
0.0.0.0/8This networkRFC 791
10.0.0.0/8Private networkRFC 1918
100.64.0.0/10Shared address space (carrier-grade NAT)RFC 6598
127.0.0.0/8LoopbackRFC 1122
169.254.0.0/16Link-localRFC 3927
172.16.0.0/12Private networkRFC 1918
192.0.0.0/24IETF protocol assignmentsRFC 6890
192.0.2.0/24Documentation (TEST-NET-1)RFC 5737
192.88.99.0/24Former 6to4 relay anycastRFC 7526
192.168.0.0/16Private networkRFC 1918
198.18.0.0/15Benchmark testingRFC 2544
198.51.100.0/24Documentation (TEST-NET-2)RFC 5737
203.0.113.0/24Documentation (TEST-NET-3)RFC 5737
224.0.0.0/4MulticastRFC 5771
240.0.0.0/4Reserved for future useRFC 1112

The three private blocks are the ones home routers and office networks use. Many home routers use 192.168.0.x or 192.168.1.x. The 240.0.0.0/4 block also holds 255.255.255.255, the broadcast address for the local network.

IPv6 address types and how they are written

An IPv6 address is 128 bits, written as eight groups of four hex digits. The generator labels a single result with one of these types. Addresses outside all of them are reserved by the IETF for future use.

PrefixTypeDefined in
::/128Unspecified addressRFC 4291
::1/128LoopbackRFC 4291
::ffff:0:0/96IPv4-mapped addressRFC 4291
2001:db8::/32DocumentationRFC 3849
2000::/3Global unicastRFC 4291
fc00::/7Unique localRFC 4193
fe80::/10Link-localRFC 4291
ff00::/8MulticastRFC 4291

Unique local addresses use fd00::/8 in practice, since the other half of fc00::/7 has no defined use yet, and link-local addresses use fe80::/64. The generator picks from those smaller prefixes.

The short form drops leading zeros in each group and replaces the longest run of zero groups with ::, following RFC 5952. These two are the same address:

Full
2001:0db8:0000:0000:0008:0800:200c:417a
Short
2001:db8::8:800:200c:417a

When to use a random IP address generator

  • ·Documentation and tutorials. Use the Documentation type for examples in guides, slides, and screenshots. Those addresses are set aside for that purpose and are not used on the public internet.
  • ·Testing software. Fill log files, firewall rules, rate limiters, and forms with addresses to check that your code reads, stores, and sorts them correctly, including IPv6.
  • ·Network labs and classes. Hand out random addresses from a subnet for practice, or make subnetting exercises. Custom range with a CIDR block keeps every address inside the network.
  • ·Sample data. Build mock user records or analytics data. Generate up to 1,000 addresses at once and download them as a text file.

How to generate a random IP address in Excel, Python, and JavaScript

For a quick address in a spreadsheet or a script, these do the job. Unlike the generator, they do not skip reserved blocks unless you fix part of the address yourself.

A 192.168.x.x address in Excel or Google SheetsFormula
="192.168." & RANDBETWEEN(0, 255) & "." & RANDBETWEEN(1, 254)

Change the fixed part for another network, for example "10.0." for the 10.0.x.x addresses. The last number runs from 1 to 254 to skip .0 and .255.

An address from any networkPython
import ipaddress, random

net = ipaddress.ip_network("192.168.1.0/24")
str(net[random.randrange(net.num_addresses)])

The ipaddress module is built into Python and works the same with IPv6 networks such as 2001:db8::/32.

Any IPv4 addressJavaScript
Array.from({ length: 4 }, () => Math.floor(Math.random() * 256)).join(".");

Random IP address generator questions

How do I generate a random IP address?
A random public IPv4 address appears when the page loads. Click Generate IP address for a new one, switch to IPv6, or change Address type to Private or Documentation.
Are random IP addresses real?
They are valid addresses, and a random public address may belong to a real company, server, or home connection. Do not use random public addresses in examples or send traffic to them. For examples, use the Documentation type, which is set aside for that and not used on the public internet.
Can a random IP address hide my location or change my IP?
No. Making up an address does not change the address your device uses online. Websites still see your real IP address. Only a VPN, a proxy, or your internet provider can change that.
Which IP addresses are safe to use in examples?
For IPv4, use 192.0.2.0/24, 198.51.100.0/24, and 203.0.113.0/24, set aside by RFC 5737. For IPv6, use 2001:db8::/32 from RFC 3849. Choose Documentation as the address type to get them.
How do I generate a random private IP like 192.168.x.x?
Set Address type to Private 192.168.0.0/16. For one subnet only, such as 192.168.1.x, choose Custom range and type 192.168.1.0/24.
Why do Private (any of the three) addresses mostly start with 10?
Each address is equally likely, and the 10.0.0.0/8 block holds about 94% of all private addresses. It has 16,777,216 addresses, compared with 1,048,576 in 172.16.0.0/12 and 65,536 in 192.168.0.0/16. Pick one block if you want a specific one.
How do I generate random IP addresses in a specific subnet?
Choose Custom range and type the CIDR block, such as 10.20.0.0/16, or a start and end address joined by a hyphen. If the CIDR has host bits set, like 192.168.1.5/24, the whole 192.168.1.0/24 network is used. The line under the box shows the exact range.
What does Public mean here?
It means the address is outside every private, reserved, and special-use block in the table on this page. That leaves 3,702,258,432 IPv4 addresses. It does not mean the address is assigned to anyone or in use.
Why skip addresses ending in .0 or .255?
In a /24 network, the address ending in .0 names the network and the one ending in .255 is the broadcast address, so neither can be given to a device. In bigger networks they are normal addresses, but many people avoid them to prevent confusion.
Why does the IPv6 address have :: in it?
IPv6 addresses are usually written in short form. Leading zeros in each group are dropped, and the longest run of all-zero groups becomes ::. Turn on Write IPv6 in full to see all eight groups of four digits.
Are the addresses really random?
Yes. Every pick uses your browser's secure random number generator, crypto.getRandomValues(), and every address in the chosen ranges is equally likely.
Is the random IP address generator free?
Yes. It is free with no signup, and it runs in your browser, so nothing is sent to a server. Results are not saved after you leave the page, so copy or download them first.