How to Check Open Ports on Windows
View listening ports and active connections using built-in Windows commands.
Before you start
Step-by-step instructions
1. Open Command Prompt
Open Command Prompt and prepare to inspect Windows network activity.
Open the Start menu, type cmd, and launch Command Prompt.
2. View ports and connections with netstat
Run the following command to show active connections, listening ports, numeric addresses, and PIDs.
netstat -ano
It shows the local port, remote connection information, connection state, and the PID of the process involved.
3. Filter by a specific port
If you only care about one port, filter the output so the result is easier to read.
netstat -ano | findstr :8080
Replace 8080 with the port number you want to inspect.
4. Identify the PID using the port
The last column in the netstat output is the PID. This tells you which process is using that port.
If the state shows LISTENING, the program is waiting for connections on that port.
5. Match the PID to a process name
Once you have the PID, you can match it to the actual process name.
tasklist | findstr 1234
Change 1234 to the real PID shown in your netstat result.
6. Close the process if needed
If the wrong process is blocking your port, you can close it after confirming it is safe to do so.
taskkill /PID 1234 /F
Do not force close system-critical or business-critical processes unless you are sure they are safe to stop.
Common reasons to check open ports
Another program may already be using the required port.
netstat helps verify whether the expected port is actually open and waiting for connections.
Reviewing active ports can help you understand which apps are communicating or listening in the background.