How to use the random ip address generator
- Select IPv4 or IPv6 from the version dropdown.
- Enter how many addresses you need, from 1 to 100.
- Optionally type a prefix like
192.168.1or2001:db8:1to lock the first octets or groups. - Click Generate to produce the list.
- Copy any address for use in your tests or configuration files.
IPv4 address structure
An IPv4 address consists of four decimal numbers called octets, separated by dots. Each octet ranges from 0 to 255 because it represents exactly 8 bits. The total address space is 232, which equals 4,294,967,296 unique addresses.
When you generate a random IP address in IPv4 mode without a prefix, the tool picks four independent values between 0 and 255 using a cryptographically secure source of randomness. For example, it might produce 172.24.89.131. If you supply a prefix such as 10.0, the first two octets are fixed and only the last two are randomized, yielding results like 10.0.142.7.
IPv6 address structure
IPv6 uses eight groups of four hexadecimal digits separated by colons. Each group represents 16 bits, giving a total of 128 bits and roughly 3.4 x 1038 possible addresses. A fully expanded random IPv6 address looks like 2001:0db8:85a3:0000:0000:8a2e:0370:7334.
This generator outputs all eight groups in lowercase without zero compression so the result is easy to parse programmatically. When you provide a prefix like 2001:db8:1, those first three groups stay fixed and the remaining five are filled with random hex values.
Common private and reserved ranges
When testing networked applications you often need addresses that will never route on the public internet. Here are the standard private and reserved blocks you can target using the prefix field:
| Range | CIDR | Typical use |
|---|---|---|
| 10.0.0.0 to 10.255.255.255 | 10.0.0.0/8 | Large private networks |
| 172.16.0.0 to 172.31.255.255 | 172.16.0.0/12 | Medium private networks |
| 192.168.0.0 to 192.168.255.255 | 192.168.0.0/16 | Home and small office routers |
| 127.0.0.0 to 127.255.255.255 | 127.0.0.0/8 | Loopback (localhost) |
| 2001:db8::/32 | 2001:db8::/32 | IPv6 documentation prefix |
To generate a fake IP address inside the home network block, set the version to IPv4 and the prefix to 192.168.1.
Practical uses for test addresses
Developers and system administrators rely on random IP addresses for several tasks:
- Populating mock databases with realistic-looking network data.
- Writing unit tests for parsers, firewalls and access control lists.
- Load testing logging pipelines that ingest IP fields.
- Configuring virtual machines or containers that need placeholder addresses before real ones are assigned.
Because these addresses are generated locally in the browser, they are safe to use in CI pipelines and offline environments. If you also need other randomized test data, tools like the random string generator or random number generator pair well with this one.
Validation rules applied
The prefix field is validated before generation begins. For IPv4, every dot-separated segment must be a whole number between 0 and 255, and you may supply at most three segments so that at least one remains random. Entering 256.0 or abc.def triggers an error.
For IPv6, each colon-separated group must contain one to four valid hexadecimal characters, and you may supply up to seven groups. The validation prevents malformed prefixes from producing invalid output. If you leave the prefix empty, no constraints are applied beyond the standard range limits.
Worked examples
Each result below was produced by the same code the tool runs, so you can check your own numbers against them.
| Example | Input | Result |
|---|---|---|
| Five random IPv4 addresses | IP version: ipv4; How many: 5 | 13.1.148.36, 209.240.3.34, 225.104.87.77, 201.224.140.189, 206.12.216.116 |
| Three IPv6 addresses | IP version: ipv6; How many: 3 | eb1f:377b:5f35:18b9:c017:7dea:1ecc:7a80, ed4f:8ecb:b10d:7cb6:d2b4:cec8:0fde:c53c, d2a4:4fca:35a2:ca60:c6ae:d839:63ca:6327 |
| IPv4 on a 10.0.x.x network | IP version: ipv4; How many: 4; Subnet prefix (optional): 10.0 | 10.0.188.201, 10.0.194.234, 10.0.224.239, 10.0.55.17 |
FAQ
Are these real, routable IP addresses?
They are randomly generated numbers formatted as IP addresses. They may coincidentally match a real host, so use them only for testing and development, never for live traffic.
Can I generate addresses within a specific subnet?
Yes. Enter the fixed portion in the prefix field, such as 192.168.1 for IPv4 or 2001:db8:1 for IPv6. The remaining octets or groups will be randomized.
What is the difference between IPv4 and IPv6?
IPv4 uses 32 bits written as four decimal octets. IPv6 uses 128 bits written as eight hexadecimal groups, providing a vastly larger address space.
Is my data sent to a server?
No. The random IP address generation happens entirely in your browser using the Web Crypto API. Nothing is transmitted over the network.
Why do the IPv6 addresses look longer than usual?
This tool outputs fully expanded IPv6 addresses without zero compression so they are easier to parse in scripts and test suites.
How many addresses can I generate at once?
You can request between 1 and 100 addresses per click. If you need more, simply click Generate again.