Common port numbers explained: 80, 443, 22, 8080, 3389 and the rest

A single computer can run a web server, an email server and a remote login at the same time. The IP address gets a message to the right machine; the port number, from 0 to 65535, gets it to the right program on that machine.

What a port is

Think of an IP address as a block of flats and a port as the flat number. Every connection names both, plus a protocol: TCP for most things (it guarantees delivery and order) or UDP for things that prefer speed, like DNS lookups, games and calls. Ports below 1024 are the “well-known” ones assigned to standard services; 1024 to 49151 are registered for particular programs; above that are temporary ports your own device picks for its side of each connection. Wirebook's What is a port? has the gentle version, and its anatomy of a URL lesson shows where the port hides in a web address.

The ports you will actually meet

PortProtocolUsed for
20, 21TCPFTP file transfer (old, unencrypted; SFTP over port 22 has replaced it)
22TCPSSH remote login, SFTP and Git over SSH
25TCPMail servers passing email to each other (many home connections block it)
53UDP/TCPDNS, turning names into IP addresses
67, 68UDPDHCP, the router handing out addresses
80TCPHTTP, plain websites (today mostly a redirect to HTTPS)
123UDPNTP, keeping clocks in sync
143, 993TCPIMAP, reading email (993 is the encrypted one)
443TCP (and UDP for HTTP/3)HTTPS, secure websites and most app traffic
465, 587TCPSending email from a mail app (encrypted submission)
1194, 51820UDPOpenVPN and WireGuard VPNs (common defaults)
3306, 5432TCPMySQL and PostgreSQL databases
3389TCPWindows Remote Desktop
5353UDPmDNS, finding printers and speakers on the home network
3000, 5000, 5173, 8000, 8080, 8443TCPDevelopment servers and alternative web ports (Node, Flask, Vite, Django, proxies)
6379, 27017TCPRedis and MongoDB
25565TCPMinecraft Java servers

These are conventions, not rules: any program can listen on any free port, which is why a port number alone never proves what is running there.

Why URLs hide the port

https://example.com/ really means https://example.com:443/, and http:// means port 80. Browsers drop the default, so you only see a port when it is unusual: http://localhost:3000 while building a website, or :8080 on a router or camera page. The URL encoder and parser splits any address into scheme, host, port and path.

See which program is using a port

# Windows (PowerShell or cmd)
netstat -ano | findstr :8080
tasklist /FI "PID eq 1234"

# macOS / Linux
lsof -i :8080
sudo ss -ltnp | grep 8080     # Linux

“Address already in use” means another program, often an earlier copy of the same server, is still holding the port; see EADDRINUSE: address already in use.

Open ports and safety

Related

Port forwarding not working? Double NAT and CGNAT · Public vs private IP address · Log in to your router (192.168.1.1) · Wi-Fi connected but no internet · Find a saved Wi-Fi password

Questions

What is port 443 used for?

HTTPS: secure websites and most app traffic. Browsers use it automatically for https:// addresses, which is why you never see :443.

What is the difference between port 80 and 443?

Port 80 carries plain, unencrypted HTTP; port 443 carries encrypted HTTPS. Most sites now answer on 80 only to redirect you to 443.

What is port 8080?

A common alternative web port used by development servers, proxies, routers and cameras when port 80 is taken or needs admin rights.

What is port 22?

SSH, used for secure remote logins to servers, SFTP file transfer and Git over SSH.

How do I see what is using a port?

On Windows run netstat -ano | findstr :PORT and look up the PID with tasklist. On Mac or Linux run lsof -i :PORT, or ss -ltnp on Linux.

Is it safe to open ports on my router?

Only open what you need. Never expose Remote Desktop, databases or admin pages; use a VPN or tunnel instead.

Published .

Try it

Related guides

Newest guides