How to Check If a Port Is in Use on Windows
Find which process is using a port on Windows 10 or 11 with netstat, identify it, and stop it from Command Prompt.
You start a server and get "address already in use", or an app refuses to bind to its port. Here is how to find out what is on the port and free it.
Run netstat for the port
Open Command Prompt or PowerShell as an administrator (right-click Start, then choose the Terminal or Command Prompt option marked Admin). Run this, replacing 3000 with your port:
netstat -ano | findstr :3000
-a lists all connections, -n shows numbers instead of names, and -o adds the process ID. findstr filters to your port.
If nothing prints, the port is free.
Read the process ID
A hit looks like this:
TCP 0.0.0.0:3000 0.0.0.0:0 LISTENING 14832
The last number is the PID. LISTENING means a process is actively holding the port.
Find out what the process is
Look the PID up:
tasklist | findstr 14832
This prints the executable name, like node.exe or java.exe, so you know what you are about to stop.
Stop the process
taskkill /PID 14832 /F
/F forces it to close. Run the netstat command again to confirm the port is gone.
Ports that come back. If the same port is taken again after a reboot, a service is starting it automatically. Open Services (search "services" in Start), find the one matching the executable name, and set its startup type to Manual.
See also
More Windows how-tos
- How to Boot into Safe Mode on Windows 11
- How to Change DNS Servers on Windows
- How to Change the Default Browser on Windows 11
- How to Check Which Windows Version You Have
- How to Check Your PC Specs on Windows
- How to Enable Clipboard History on Windows
- How to Find Your IP Address on Windows
- How to Flush DNS on Windows
- How to Force Quit a Program on Windows
- How to Free Up Disk Space on Windows 11
- How to Map a Network Drive on Windows
- How to Open Command Prompt as Administrator
- How to Rename Multiple Files at Once on Windows
- How to Show File Extensions in Windows 11
- How to Take a Screenshot on Windows
- How to Turn Off Startup Programs on Windows 11
- How to Turn On Dark Mode on Windows 11
- How to Uninstall a Program on Windows 11
- How to Zip and Unzip Files on Windows