A port number is a 16-bit label that lets one machine run many network services at once. An IP address gets a packet to the right host; the port gets it to the right program on that host. There are 65,536 of them (0 through 65535), and the numbers below are the small handful that people memorize, mistype, or search for over and over.
The three port ranges
IANA splits the space into three bands, and knowing which band a number lives in tells you a lot about it.
- Well-known ports, 0 to 1023. Assigned to core services (HTTP, SSH, DNS). On Unix-like systems, binding one usually requires root or an explicit capability.
- Registered ports, 1024 to 49151. Assigned by IANA to specific applications on request (databases, app servers). No special privilege needed to bind them.
- Dynamic or ephemeral ports, 49152 to 65535. Never assigned permanently. The operating system hands these out as the source port for outbound connections.
Ports also come in two flavours: TCP, which is connection-oriented and ordered, and UDP, which is fire-and-forget. Most services pick one, a few use both, and the tables below note the protocol wherever it is not obvious.
Web
| Port | Protocol | Service | |
|---|---|---|---|
| 80 | TCP | HTTP | Unencrypted web traffic |
| 443 | TCP | HTTPS | TLS-encrypted web traffic |
| 8080 | TCP | HTTP alt | Proxies, app servers, dev HTTP |
| 8443 | TCP | HTTPS alt | Secondary or admin HTTPS |
Mail is the group people get wrong most, because sending and receiving each have an old plaintext port and a newer encrypted one.
| Port | Protocol | Service | |
|---|---|---|---|
| 25 | TCP | SMTP | Server-to-server mail relay |
| 587 | TCP | SMTP submission | Sending mail from a client (STARTTLS) |
| 465 | TCP | SMTPS | Sending mail over implicit TLS |
| 110 | TCP | POP3 | Downloading mail, plaintext |
| 995 | TCP | POP3S | Downloading mail over TLS |
| 143 | TCP | IMAP | Reading mail on the server, plaintext |
| 993 | TCP | IMAPS | Reading mail on the server over TLS |
File transfer and remote shell
| Port | Protocol | Service | |
|---|---|---|---|
| 20 / 21 | TCP | FTP | Data (20) and control (21) channels |
| 22 | TCP | SSH / SFTP / SCP | Encrypted shell and file transfer |
| 23 | TCP | Telnet | Legacy remote shell, unencrypted |
| 69 | UDP | TFTP | Trivial FTP, PXE and network boot |
| 445 | TCP | SMB | Windows file and printer sharing |
| 3389 | TCP | RDP | Windows Remote Desktop |
SSH on 22 is the workhorse here, and the same port carries SFTP and SCP. If you are generating the keys that log in over it, our comparison of Ed25519 vs RSA covers which key type to pick.
Databases
| Port | Protocol | Service | |
|---|---|---|---|
| 1433 | TCP | Microsoft SQL Server | Default MSSQL instance |
| 3306 | TCP | MySQL / MariaDB | Default MySQL server |
| 5432 | TCP | PostgreSQL | Default Postgres server |
| 6379 | TCP | Redis | Key-value store |
| 27017 | TCP | MongoDB | Default mongod instance |
| 1521 | TCP | Oracle | Default Oracle listener |
Infrastructure and directory
| Port | Protocol | Service | |
|---|---|---|---|
| 53 | TCP + UDP | DNS | Name resolution (UDP for queries, TCP for large or zone transfers) |
| 67 / 68 | UDP | DHCP | Server (67) and client (68) |
| 123 | UDP | NTP | Network time synchronization |
| 161 / 162 | UDP | SNMP | Polling (161) and traps (162) |
| 389 | TCP | LDAP | Directory queries, plaintext or STARTTLS |
| 636 | TCP | LDAPS | Directory queries over TLS |
| 5060 | TCP + UDP | SIP | VoIP call signaling |
DNS on 53 is the classic “uses both” case. Ordinary lookups go over UDP because they are small and a lost packet is cheap to retry, but responses larger than the UDP limit and full zone transfers fall back to TCP. NTP on 123 and SNMP on 161 stay on UDP, where the low overhead matters more than guaranteed delivery.
Local development conventions
These are not IANA assignments, just habits that frameworks settled on. They are worth listing because they are the ports a developer types most in a day.
| Port | Protocol | Convention | |
|---|---|---|---|
| 3000 | TCP | Node dev server | Next.js, Create React App, Express default |
| 5173 | TCP | Vite dev server | Vite's default port |
| 8000 | TCP | Python dev server | Django runserver, http.server, Uvicorn |
Finding what is using a port
When a service will not start because its port is taken, you need to find the process holding it. The command differs by operating system, but the idea is the same: list open sockets and match the port.
Each of these prints the process ID (PID) bound to the port. Once you have the PID you can stop that process, or start your own service on a different port. On Windows the PID from netstat maps to a process in Task Manager; on macOS and Linux you can pass it to kill. That is far quicker than restarting the whole machine to free the port.
Where to go from here
Ports sit one layer above IP addressing, so this pairs naturally with the subnet cheat sheet when you are reasoning about what can reach what. For the encrypted services in these tables, the plain-English background on what AES encryption is explains what the TLS ports are actually protecting. And when the thing you are looking up is a text pattern instead of a number, the regex cheat sheet is the sibling reference in this set of cheat sheets.