Skip to content
UniKit

Random port generator

Generate random ports from the system / registered / dynamic ranges, with count, dedupe, sorting and common-port exclusion, using crypto.getRandomValues with rejection sampling plus service hints.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Port range

Entropy comes from the browser crypto.getRandomValues with rejection sampling to avoid modulo bias

Everything is generated locally and never uploaded

Generated ports

Click “Generate” to get random ports

What this tool does

  • Pick a non-conflicting listener port for a local service, container or test environment — the default comes from the dynamic range, away from reserved system ports.
  • Generate a batch of candidate ports up front with dedupe and sorting on, then paste them straight into a config file or security group rule.
  • Worried about clashing with well-known services? Enable "exclude common ports" to skip 80, 443, 3306 and friends, and add your own occupied ports on top.
  • Not sure whether a port is usable? Each result is annotated with its IANA range (system, registered or dynamic) and any well-known service it maps to.

Example

Input

Dynamic range 49152–65535, count 5, unique and sorted enabled

Output

49152, 59076, 60691, 62306, 63921 (all unassigned ports)

The random source is the browser crypto.getRandomValues with rejection sampling, so the exact ports differ each run while always staying inside the chosen range and never repeating.

Frequently asked questions

Does a generated port guarantee no conflict?

No. The tool can only guarantee the port sits inside the IANA range and avoids the common ports you excluded; it has no idea what is currently listening on your machine. Check with netstat, ss or lsof before using it.

What do the three ranges mean?

1–1023 are system ports and usually need administrator privileges to bind; 1024–49151 are registered ports for known services; 49152–65535 are dynamic or private ports, best suited to local services and throwaway tests.

Can a unique draw ask for more ports than are available?

No. You get a message that the unique count exceeds the available ports in the range, already accounting for exclusions. Excluding a chunk of 49152–65535 and then requesting too many distinct ports triggers it.

What formats does the exclusion list accept?

Commas, Chinese commas, semicolons, spaces and newlines all work, for example "8080, 8443 3306". Entries must be integers between 1 and 65535; a non-numeric or out-of-range value reports an error immediately.

Are the generated ports uploaded?

No. They are produced locally in JavaScript with no network requests and no history is stored — a page refresh clears everything.

Keywords:随机端口port端口random port网络networksocketgetrandomvalues102449152

Related tools