Guides

Step-by-step practical fixes for everyday technical problems.
Windows Guides

How to Check Open Ports on Windows

View listening ports and active connections using built-in Windows commands.

Before you start

For many checks, normal Command Prompt is enough.
If you need to close the related process later, Administrator mode may be helpful.
A listening port does not always mean there is a problem. It may belong to a normal app or service.

Step-by-step instructions

1. Open Command Prompt

Open Command Prompt and prepare to inspect Windows network activity.

Quick way

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.

Command
netstat -ano
Why this command is useful

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.

Command
netstat -ano | findstr :8080
Example

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.

What to look for

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.

Command
tasklist | findstr 1234
Replace the PID

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.

Command
taskkill /PID 1234 /F
Important

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

A local app will not start

Another program may already be using the required port.

You want to confirm a service is listening

netstat helps verify whether the expected port is actually open and waiting for connections.

You are checking unexpected local activity

Reviewing active ports can help you understand which apps are communicating or listening in the background.

About this guide

This guide shows how to check open ports and active connections on Windows using built-in command line tools. It is useful when a program will not start, a port may already be in use, or you want to confirm whether a service is listening correctly.

How to follow this guide

  1. Open Command Prompt.
  2. Use netstat to view listening ports and active connections.
  3. Filter the results by port number if needed.
  4. Identify the PID attached to the port.
  5. Use Task Manager or taskkill if you need to inspect or close the related process.

Why use this method?

Checking open ports helps you understand which applications are listening for connections and whether a port conflict is blocking your software. It is useful for both everyday troubleshooting and more technical support work.

Frequently Asked Questions

What is an open port?

It is a network port that a program or service is using to listen for or maintain network connections.

Why would I check open ports on Windows?

You may need to check them when an app cannot start, a port is already in use, or you want to verify a local service is listening properly.

What is PID in netstat output?

PID means Process ID, which identifies the running process using the port.

Do I need extra software?

No. Windows includes netstat and related tools by default.