Random Port Generator
NEWRandom port generator for TCP and UDP: pick unique port numbers from your own range, skipping well-known, registered and common dev ports. Free, in your browser.
Runs 100% in your browser — your input is never uploaded or stored on our servers.
Quick Examples
Typical inputs and the results this tool produces.
Overview
A random port generator picks port numbers for TCP or UDP services, containers, test servers and firewall rules without you having to guess. Choose a minimum and maximum, decide which parts of the port space to avoid, and ask for between 1 and 50 numbers at once.
You can skip the well-known range (0–1023), the registered range (1024–49151) or a built-in list of ports that databases and dev servers usually claim, such as 3000, 3306, 5432, 6379 and 8080. Extra ports or ranges can be added by hand.
Numbers come from the browser’s cryptographic generator with rejection sampling, so every allowed port is equally likely and results never repeat. Nothing is sent anywhere. The tool cannot see which ports are free on your machine, so check a pick with your OS before binding it.
Why use this tool?
- Unique ports in one click, up to 50
- Avoids well-known and common dev ports
- Uniform crypto randomness, no modulo bias
- Shows how many ports remain in the pool
- Runs locally, nothing is uploaded
Features
Unbiased randomness
Uses crypto.getRandomValues with rejection sampling so each port has the same chance.
Skip ranges
Exclude well-known, registered or a list of 32 common service ports.
Custom exclusions
Type extra ports or ranges such as 8081 or 9000-9010 to avoid.
Unique batches
Generate 1–50 distinct ports, optionally sorted ascending.
Port class label
Each result is tagged Well-known, Registered or Dynamic.
Copy one or all
Copy a single port or the whole list, one per line.
How to Use
Set the range
Enter Min port and Max port, 1024 and 65535 by default.
Choose what to skip
Tick the well-known, registered or dev-port options and add custom ports.
Pick a quantity
Set Quantity from 1 to 50 and press Generate.
Copy the result
Use Copy on one port or Copy all for the full list.