How it works
This random port generator draws from 1024 to 49151, the range IANA registers to applications. Skip what is on the list starts on; switch it off and a listed port, such as MySQL's 3306, shows its entry under the result.
Read the full guide
The three port ranges in RFC 6335
A port is a 16-bit number, so there are 65,536. System ports, 0 to 1023, hold the oldest services, and by default Linux lets only root, or a program given that right, open one. User ports, 1024 to 49151, are 48,128 numbers; about 12 in 100 are assigned. Dynamic ports, 49152 to 65535, are never assigned.
Worked example: the draw gives 41,852
The line under the result says it is not on the list, and the IANA registry shows it as unassigned. But Linux lends ports 32768 to 60999 to outgoing connections by default, so another program may hold 41852 for a moment. For a server that must start every time, tap 1024 to 32767 and draw again. Copy gives plain digits.
- Most everyday defaults sit below 10000. Tap 10001 to 32767 to clear them and the Linux range; only 11211, 15672 and 27017 are listed higher.
- Need a block? Set How many to 3 and Order to Lowest first: app, admin page, metrics. No repeats is already on.
- A random port avoids clashes. It does not hide a service: a port scan can try all 65,536.
Questions and answers
Can the draw return a port that is already in use?
Yes. The draw cannot see your machine. To see which ports are taken, run ss -ltn on Linux, netstat -an on macOS or netstat -ano on Windows. lsof -i :41852 names the program holding a port, but without sudo it sees only your own programs.
Should I pick a registered port or a dynamic one?
For a service other programs connect to, draw from the registered range. IANA never assigns a dynamic port, 49152 to 65535, so no product claims one, but Windows and FreeBSD lend those ports to outgoing connections, so one may be taken when your server starts.
Is port 8080 official?
Yes: IANA registers 8080 as http-alt, an alternate to port 80. The registry gives 3000 to hbci and remoteware-cl, 5000 to commplex-main and 9000 to cslistener, while 5173 and 9229 are unassigned. Dev tools open all five by habit; the list marks 19 such entries.