What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
A random IPv4 address can be sorted into a historical class by its leading bits, but that class does not tell you whether the address is a usable public host, available on your network, or reachable over the internet. Class A, B, and C are legacy categories; modern IPv4 networks use explicit CIDR prefixes such as /24. Use the generator below for examples or learning, and check special-use ranges and your actual subnet before using an address in a configuration.
Generate a random IPv4 address by legacy class
This Python script generates dotted-decimal samples whose first octet matches the historical A–E class pattern. It also labels common special-use ranges. It does not claim that an address is free, assigned to you, reachable, or safe to configure.
#!/usr/bin/env python3
import argparse
import ipaddress
import secrets
CLASS_RANGES = {
"A": (1, 126),
"B": (128, 191),
"C": (192, 223),
"D": (224, 239),
"E": (240, 255),
}
# Ranges useful for explaining why a syntactically valid address may not
# be an ordinary public unicast host. This is not a complete IANA registry.
SPECIAL_RANGES = [
("private use", "10.0.0.0/8"),
("private use", "172.16.0.0/12"),
("private use", "192.168.0.0/16"),
("loopback", "127.0.0.0/8"),
("link-local", "169.254.0.0/16"),
("documentation", "192.0.2.0/24"),
("documentation", "198.51.100.0/24"),
("documentation", "203.0.113.0/24"),
("multicast", "224.0.0.0/4"),
("reserved", "240.0.0.0/4"),
("limited broadcast", "255.255.255.255/32"),
]
NETWORKS = [(label, ipaddress.ip_network(cidr)) for label, cidr in SPECIAL_RANGES]
def classify(address):
first = int(address.packed[0])
for name, (low, high) in CLASS_RANGES.items():
if low <= first <= high:
return name
# First octet 0 is the old zero-network space, not ordinary Class A use.
return "special/zero-network"
def special_use(address):
matches = [label for label, network in NETWORKS if address in network]
return ", ".join(matches) if matches else "none of the listed examples"
def make_sample(class_name):
low, high = CLASS_RANGES[class_name]
first = secrets.randbelow(high - low + 1) + low
value = (first << 24) | secrets.randbits(24)
return ipaddress.IPv4Address(value)
def main():
parser = argparse.ArgumentParser(description="Generate legacy IPv4 class samples")
parser.add_argument("class_name", choices=CLASS_RANGES, type=str.upper,
help="legacy class: A, B, C, D, or E")
parser.add_argument("-n", "--count", type=int, default=1,
help="number of samples (default: 1)")
args = parser.parse_args()
if args.count < 1 or args.count > 10000:
parser.error("count must be between 1 and 10000")
for _ in range(args.count):
address = make_sample(args.class_name)
print(f"{address}tClass {classify(address)}tSpecial-use example: {special_use(address)}")
if __name__ == "__main__":
main()
Save it as random_ip_by_class.py and run, for example, python3 random_ip_by_class.py B --count 5. The output is random rather than reproducible; it uses Python’s secrets module. The script deliberately generates the whole historical first-octet range, not just addresses suitable for public unicast. Its special-use labels cover the examples below, not every IANA entry or every local routing policy.
What IPv4 address classes mean
An IPv4 address is 32 bits, conventionally written as four decimal octets separated by dots. Classful networking used the leading bits to divide addresses into broad network-number categories and infer a default split between network and host portions. RFC 4632 records the historical patterns for A, B, and C as 0, 10, and 110. The broad first-octet summaries below are useful for recognizing the old labels, not for determining current public availability.
#1 Best Overall
| Legacy class | Leading bits and first-octet summary | Historical role | Important qualification |
|---|---|---|---|
| A | 0xxxxxxx; ordinary legacy network range commonly summarized as 1–126 |
Large unicast network blocks | The zero-network space and 127/8 loopback mean not every value suggested by the bit pattern is an ordinary host address. |
| B | 10xxxxxx; 128–191 |
Medium-sized unicast blocks | The private-use range 172.16.0.0/12 is inside this historical numeric span. |
| C | 110xxxxx; 192–223 |
Smaller unicast blocks | This wide span includes private, documentation, and other special-purpose space; it is not all public address space. |
| D | 1110xxxx; 224–239 |
Multicast | Multicast destinations are not ordinary unicast host addresses. |
| E | 1111xxxx; 240–255 |
Reserved / future use | 255.255.255.255 is limited broadcast; do not treat this range as usable host addresses. |
The old A/B/C scheme is not how modern networks receive address blocks. RFC 4632 describes its replacement: classless, hierarchical blocks identified by prefixes. Its explanation is historical guidance, not a current count of addresses available for assignment.
Why class is not the same as a modern subnet
CIDR notation makes the network boundary explicit. In 192.0.2.0/24, /24 says that the first 24 bits are the prefix; it does not mean that the network is “Class C” for current routing or allocation. A /24 can be used with addresses whose first octet historically fell into different classes, and a historical Class C-range address can be part of a subnet with a prefix other than /24.
Rank #2
For practical configuration, obtain both the intended address and prefix from the network administrator, cloud network, or service documentation. Then confirm gateway, route, interface, and address-assignment rules for that environment. A class label cannot supply those details. RFC 4632 documents the move away from class-based assignment: RFC 4632, Classless Inter-domain Routing (CIDR).
Special-use IPv4 ranges to screen before using a sample
A dotted-decimal value can be syntactically valid while serving a purpose other than ordinary public unicast. These examples matter when generating samples, building test data, or diagnosing a configuration.
Recommended Free Tools
Rank #3
- Used Book in Good Condition
| Purpose | IPv4 prefix or address | Practical implication |
|---|---|---|
| Private use | 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 |
Used within private internets; these blocks are not globally reachable in the IANA registry. They may be valid inside a particular LAN or private network. |
| Loopback | 127.0.0.0/8 |
Used to refer to the local host, not a remote public destination. |
| Link-local | 169.254.0.0/16 |
Link-local use is not a substitute for an address assigned for normal routed connectivity. |
| Documentation | 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 |
Examples for documentation and sample configurations; do not assume they are public destinations for a real service. |
| Multicast | 224.0.0.0/4 |
Multicast destination space, not an ordinary host address for a typical client connection. |
| Reserved | 240.0.0.0/4 |
Reserved space; it should not be treated as generally usable host space. |
| Limited broadcast | 255.255.255.255/32 |
A limited broadcast address, not an ordinary unicast destination. |
RFC 1918 defines the private-use blocks, and IANA’s registry provides current special-purpose properties: RFC 1918 and the IANA IPv4 Special-Purpose Address Registry. IANA explicitly cautions that registry prefixes are not guaranteed routability in any particular local or global context. The registry distinguishes properties such as source validity, destination validity, forwardability, and global reachability; “special purpose” alone does not answer whether an address works in a specific private network.
What a random-IP generator can and cannot tell you
A class-oriented generator can choose a first octet matching a legacy bit pattern and fill the remaining bits at random. That is enough to demonstrate how the old categories are recognized. It is not evidence that the result is assigned, unassigned, reachable, owned by anyone, anonymous to use, or appropriate for a particular subnet.
Before relying on another generator, check what it actually produces. Does it generate every syntactically valid address with the selected pattern, or screen out private, loopback, multicast, reserved, broadcast, link-local, and documentation ranges? Does it output one result or a batch, and can you reproduce results with a seed? Does it validate syntax only, or make a reachability test? A syntactic check is not a routing or ownership check, and reachability can vary by time, location, firewall, and network.
- For a classroom example, retaining special-use outputs can help explain why class alone is insufficient.
- For sample documentation, use documentation prefixes rather than presenting a random value as a live endpoint.
- For local configuration, use the subnet, prefix, and assignment information supplied for that network.
- For public connectivity, verify the address and route through the responsible provider or administrator; do not infer availability from a random generator.
Identify the historical class of an IP address
For ordinary historical A/B/C classification, inspect the first octet (the number before the first dot): 1–126 was conventionally Class A, 128–191 Class B, and 192–223 Class C. First octets 224–239 indicate the old Class D multicast block; 240–255 are the old Class E reserved block. The first octet 0 is a special zero-network case, while 127 is loopback, so avoid labeling every address in the broader bit-pattern bands as an ordinary host.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsBest Value
This classification answers only the historical-label question. To determine the network an address belongs to today, you need the applicable prefix length. To determine whether it is valid or reachable for a particular purpose, check the relevant IANA properties and local network configuration.
Troubleshooting generated addresses
- The result has the requested class but does not connect. The class pattern is not a reachability test. Check whether it is special-use, then verify the subnet prefix, route, gateway, firewall, and assignment with the network operator.
- A result looks like a public IP but is rejected by a service. The service may require an assigned address, a specific allowlist, or a valid source/destination role. A random generator cannot grant any of those. Check the service’s requirements and the IANA registry.
- A “Class C” value is not in a
/24. “Class C” is a historical first-bit category; the current prefix length is a separate setting. Use the configured CIDR prefix instead of deriving it from the class label. - The script rejects the count. It accepts integers from 1 through 10,000. Use
-n 5or--count 5, for example. - The script prints a special-use label. That is intentional; the generator does not filter those outputs. Treat them as examples unless the intended environment explicitly uses that range.
Or skip the browser setup
If your task also requires capturing a web page rather than generating an IP sample, ScreenshotNeo provides a one-request screenshot API. It is a separate tool from an IP generator and does not validate or assign addresses. See the ScreenshotNeo API documentation for options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo removes cookie/consent banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are not billed. Its MCP server lets AI agents take screenshots. The Free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000. Learn about ScreenshotNeo, or sign up for 1,000 free screenshots a month with no card.
Frequently Asked Questions
Can a random IP generator reveal an unused address?
No. Random generation does not establish assignment or availability. Check with the administrator or provider responsible for the relevant network.
Free tools Windows power users keep installed
One-click scans. No signup required.
Is Class D a type of regular device IP?
No. The historical Class D block is IPv4 multicast space, which is distinct from ordinary unicast host addressing.
Why do some references call 1–126 Class A but describe the pattern as starting at zero?
The leading-bit pattern is a historical description; zero-network space and the 127/8 loopback block are special cases, so ordinary legacy Class A networks are commonly summarized as first octets 1–126.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

