How to Check Ports in Use on Windows 10
In this article
To check which ports are in use on Windows 10, open Command Prompt and run netstat -ano. This lists every active connection and listening port along with the Process ID (PID) using it. For a cleaner view, use netstat -ano | findstr LISTENING to see only ports waiting for connections. You can also use Resource Monitor (search "Resource Monitor" from Start) and open the Network tab to see listening ports and associated processes. No extra software is required; both tools are built into Windows 10.
What You'll Need
- A Windows 10 PC with administrator rights (some commands and Task Manager details require elevation).
- Command Prompt or PowerShell — both are preinstalled. You can open Command Prompt by typing "cmd" in the Start menu search and pressing Enter.
- Optional: Resource Monitor, also built in (search "Resource Monitor" from Start).
Menu labels and command output can differ slightly depending on your Windows 10 version and language, but the core commands and tools are consistent.
Step-by-Step
- Open Command Prompt as administrator. Click Start, type
cmd, right-click “Command Prompt” and choose “Run as administrator.” Approve the User Account Control prompt if it appears. This ensures you can see all connections, including system processes. - List all ports in use. In the Command Prompt window, type
netstat -anoand press Enter. You will see columns for Protocol, Local Address, Foreign Address, State, and PID. The Local Address column shows your IP and port (for example,0.0.0.0:80or192.168.1.10:5040). The State column shows LISTENING, ESTABLISHED, TIME_WAIT, etc. The PID column is the process identifier that owns that port. - Filter for listening ports only. To see just ports that are open and waiting for connections, run:
netstat -ano | findstr LISTENING. This reduces noise from active connections. If you want to check a specific port, use:netstat -ano | findstr :80(replace 80 with your port number). The colon before the number is important. - Identify the process using a port. Note the PID from the last column. Open Task Manager (Ctrl+Shift+Esc), go to the Details tab, and sort by PID to find the process name. If the Details tab is not visible, click “More details” at the bottom. Alternatively, run
tasklist | findstr PIDin Command Prompt, replacing PID with the number. This shows the executable name (for example,chrome.exeorsvchost.exe). - Use Resource Monitor for a graphical view. Open Resource Monitor (search from Start). Click the Network tab. Expand “Listening Ports” to see a table of ports, the process name, and PID. This is handy if you prefer not to read command-line output. You can also see which ports have active connections under “TCP Connections.”
- Check a specific port with PowerShell (optional). Open PowerShell as administrator and run:
Get-NetTCPConnection -LocalPort 80(replace 80). This returns detailed information including the owning process. This cmdlet is available in Windows 10 and later.
Common Mistakes
- Forgetting the colon in findstr. Using
findstr 80will match any line containing “80” (including IP addresses and PIDs). Always usefindstr :80to target the port. - Not running as administrator. Without elevation,
netstat -anomay not show all connections, especially those owned by system services. Always open Command Prompt as administrator. - Confusing local and foreign addresses. The local address is your machine's IP and port. The foreign address is the remote endpoint. A port is “in use” locally if it appears in the Local Address column with a state of LISTENING or ESTABLISHED.
- Assuming a PID is permanent. PIDs are reused. If you check a port, note the PID, then close the process, the same PID may later belong to a different process. Always re-check.
- Ignoring IPv6.
netstat -anoshows both IPv4 and IPv6. A port may appear as[::]:80for IPv6. If you only look for IPv4 addresses, you might miss it.
Tips
- Use
netstat -anob(requires administrator) to show the executable name directly in the output, saving a trip to Task Manager. The-bflag can be slow but is convenient. - To see only TCP ports, add
-p TCP:netstat -ano -p TCP. For UDP, use-p UDP. - If you suspect a port is blocked by a firewall, checking netstat only shows local usage, not external reachability. Use
Test-NetConnection -ComputerName localhost -Port 80in PowerShell to test if a port is open locally. - For a quick overview without the command line, Resource Monitor's Network tab is less intimidating and updates in real time.
- When troubleshooting a “port already in use” error, search for the specific port number with
netstat -ano | findstr :portto immediately see the PID, then end that process if appropriate.
Troubleshooting
If netstat is not recognized, ensure you are in Command Prompt, not PowerShell (though PowerShell also accepts netstat). If the command returns “Access denied,” you are not running as administrator. If you cannot find a PID in Task Manager, it may be a system process; enable “Show processes from all users” (Task Manager shows all by default when run as admin). If a port appears in use but no process is listed, it might be a kernel-mode driver or a service that hides its PID; try netstat -anob as administrator, or use Resource Monitor which sometimes reveals more. If you need to free a port, identify the process and either close it gracefully or stop its service. Do not kill critical system processes (such as svchost.exe or System) without understanding what they do; doing so can crash your PC. If the port is used by a service you need, consider changing your application's port instead. Finally, if you suspect malware is listening on a port, run a full scan with Windows Security.
Frequently Asked Questions
How do I check if a specific port is open on Windows 10?
Run netstat -ano | findstr :portnumber in Command Prompt. If you see a line with LISTENING, the port is open locally. To test from another machine, use Test-NetConnection in PowerShell or an online port checker, but note that firewalls may block external access.
What does “LISTENING” mean in netstat output?
LISTENING means a process is waiting for incoming connections on that port. It does not necessarily mean the port is reachable from outside your PC; the Windows Firewall or router may block it.
Can I check ports without using the command line?
Yes. Open Resource Monitor (search from Start) and go to the Network tab. Expand “Listening Ports” to see a list of ports and the processes using them. This provides a graphical view without typing commands.
How do I find which program is using a port?
From netstat -ano, note the PID. Open Task Manager, go to the Details tab, and find the PID in the PID column. The corresponding process name is shown. Alternatively, run tasklist | findstr PID.
Why does netstat show a port in use but I can't find the process?
Some system processes or services may not appear in Task Manager's Apps tab. Check the Details tab and ensure you are viewing all processes. If still not found, the port may be held by a kernel driver; try netstat -anob as administrator or use Resource Monitor.
Is it safe to kill a process to free a port?
Only if you know what the process is. Killing critical system processes can cause instability. For user applications (like a game server or web server), it is usually safe to close them. For services, stop the service properly via Services (services.msc) instead of killing the process.