Skip to main content
Back to Dev generators

Dev

Random IP Address Generator

Backend developers and network engineers need realistic IP address data for seeding access logs, testing CIDR range matchers, and feeding geolocation APIs. Typing addresses by hand risks using private ranges that break lookups or values that don't match your protocol stack. Three inputs control the output. Count sets the batch size (1–50). Version selects IPv4 (dot-decimal like 203.0.113.47), IPv6 (colon-hex like 2001:db8::ff00:42:8329), or both for a mixed batch. Public IPs only strips private ranges — 10.x.x.x, 172.16–31.x.x, 192.168.x.x, and loopback — that geolocation APIs return null or errors for. Enabling it ensures your test addresses behave like actual internet traffic. For fixture files and access-log seeds, generate once and commit the list to your repo so the whole team tests against identical data.

Read the complete guide — 4 min read

How to use

  1. Choose your options above
  2. Click Generate
  3. Copy your result

Detailed instructions

  1. Set the count field to how many IP addresses you need, between 1 and 50.
  2. Choose IPv4 for standard dot-decimal addresses or IPv6 for hexadecimal colon-notation addresses.
  3. Set 'Public IPs only' to Yes if your test involves geolocation lookups or internet traffic simulation.
  4. Click Generate to produce the address list, then copy the output directly into your script, log file, or test fixture.

Use Cases

  • Seeding a PostgreSQL access_logs table with realistic public IPv4 addresses for staging
  • Unit testing CIDR range matching functions in Jest with a varied set of 20+ addresses
  • Feeding a geolocation API in Postman to verify country, region, and ISP fields parse correctly
  • Generating dual-stack IPv4 and IPv6 addresses to test nginx dual-stack virtual host configs
  • Populating rate-limiting middleware fixtures with 50 unique public IPs to catch per-IP throttle bugs

Tips

  • For geolocation API tests, always use public IPs only — private ranges return null from most providers and will skew your results.
  • When testing dual-stack applications, run two separate batches (one IPv4, one IPv6) and interleave them to simulate realistic mixed traffic.
  • Paste a batch of 50 IPs into a spreadsheet with a VLOOKUP against known IANA reserved ranges to quickly spot any edge-case addresses before using them.
  • For rate-limiting tests, generate IPs in batches of 10–20 and use them as X-Forwarded-For header values — most rate limiters key off this header.
  • If you need reproducible test data across your team, generate once, commit the list to your repo as a fixture file, and reference it in all related tests.
  • IPv6 addresses work well for testing input sanitization — many older regex validators fail on the colon notation, making them valuable for security QA.

FAQ

how to generate random ip addresses for testing in bulk

Set the count to up to 50, choose your IP version (IPv4, IPv6, or both), and enable public-only mode to exclude private ranges. Copy the output directly into a seed script, fixture file, or Postman environment variable list. For datasets larger than 50, run multiple batches and concatenate the results.

why exclude private ip ranges in test data

Private ranges like 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 are non-routable on the public internet. Geolocation APIs return null or errors for them, and firewall tests targeting external traffic won't reflect real conditions. The public-only toggle also strips loopback (127.x) and the unspecified address (0.x).

what is the difference between ipv4 and ipv6 output

IPv4 produces 32-bit addresses in dot-decimal notation (e.g., 203.0.113.47). IPv6 produces 128-bit addresses in colon-separated hexadecimal (e.g., 2001:db8::ff00:42:8329). Use the 'both' option to ensure your parsing and filtering code handles each format correctly.

does the public-only filter guarantee addresses are actually routable

It excludes well-known private and reserved ranges but does not guarantee a generated address is currently assigned to a host. Some public IP space is unallocated or belongs to IANA documentation ranges like 192.0.2.0/24. For geolocation tests, the filter is sufficient — most providers return useful data for public-range addresses regardless of allocation status.

You might also like

Popular tools from other categories that share themes with this one.

Try these next

More free tools from other corners of the catalog, picked by shared themes.