Skip to content
🔌

Random Port Generator

Generate random port numbers — well-known (0-1023), registered (1024-49151), or dynamic (49152-65535). Pick a range, generate up to 50.

How does the port generator work?

This tool picks random port numbers from one of the three IANA-defined ranges using crypto.getRandomValues() for unbiased selection. Each port is a 16-bit unsigned integer (0-65535) and the chosen range determines the lower and upper bounds.

IANA port ranges

  • Well-known (0-1023) — assigned to common services like HTTP (80), HTTPS (443), SSH (22), and DNS (53). Require root/admin to bind.
  • Registered (1024-49151) — assigned by IANA to specific applications (e.g., MySQL 3306, PostgreSQL 5432).
  • Dynamic / Ephemeral (49152-65535) — used by client-side connections and short-lived listeners. Safe for testing.

Common uses

  • Local dev — pick a free port for a new microservice.
  • Test fixtures — generate port numbers for network mocks and integration tests.
  • Documentation — produce realistic example ports for tutorials.

Privacy

All ports are generated 100% in your browser. No data is sent to any server.