Find Which App Is Listening On Which Port In Windows

App listening to ports Windows 10 11App listening to ports Windows 10 11

If you are using an application that needs to connect to the internet, like an online game, WhatsApp, etc., then it is definitely using and listening on a specific network port. Network ports are used by services and apps to send and receive data over the network.

Like an IP address guides traffic between different devices over the internet, a port defines which application or service the data is intended for, once it reaches (or leaves) a device.

There can be occasions when a network admin or even a simple user would need to know which port or ports are being used by a specific application or vice versa.

As a gamer, there are instances when you must use port forwarding on your router to reduce latency between the game and its servers. But that cannot be done without knowing which port it is using. This is where we come in.

In this guide, we will discuss how you can determine which port(s) are being used by an application on a Windows computer, or which app is using a specific port.

How to Check Which Port is Used by an App

First, we will show you how to check which port is being used by a specific application. For this, you must know the Process ID (PID) for the process running behind the application.

Follow these steps to check which port is being used by an application on a Windows computer:

  1. First, we must find the PID for the process for the app for which you wish to find the listening port. For that, run the application, minimize it, and then open the Task Manager using the Ctrl + Shift + Esc shortcut keys.

  2. In the Processes tab, expand the app processes by clicking on it, right-click on the app and then click Go to details from the context menu.

    Open process details
    Open process details
  3. You will now be taken to the Details tab where the file name and its details for the associated process will be highlighted. Note down its PID which is in the second column from the left.

    Note down the PID
    Note down the PID
  4. Now that you have the PID, run an elevated Command Prompt instance and use the following cmdlet to find its listening port. Replace [PID] with the Process ID noted in Step 3 above.

    Note: You can also find the port number using the file name running the process. However, in that case, you would need to use the exact name of the file which is also case-sensitive. Therefore, we do not recommend that method since a single typo would make the result unobtainable.

    netstat -aon | findstr [PID]
    Find details using PID
    Find details using PID

In the last step above, you will have the details for the specific PID where you can see its local IP address followed by the port number being used (denoted after the colon), remote IP address and port number, connection state, and its PID (in that order – left to right).

From this, you shall have which port the application is using.

The app is listening on this port
The app is listening on this port

If it is using more than one port, then you will see multiple entry rows. However, if you enter an incorrect PID or the app is not using an internet connection, then you have no results after running the command above.

How to Check Which App is using a Specific Port

If you already know that your PC is listening on a specific port but want to know which app or service is using it, that can also be done. Here is how:

  1. Run the following cmdlet in an elevated Command Prompt while replacing [PortNumber] with the port number that you already know is listening.

    netstat -aon | findstr [PortNumber]
    Find PID for process running the app
    Find PID for the process running the app

    This will now give you different details about the app and its process, except for the name of the app. However, you will get the associated Process ID (PID), which is in the last column. Note down this PID.

  2. Now, use the following cmdlet while replacing [PID] with the PID noted in the step above.

    tasklist | findstr [PID]
    Find app name using PID
    Find app name using PID

As you can see in the image above, you will now have the name of the file running the process for that application, using which you now know which application is listening on that specific port.

File naeme obtained
File name obtained

If at any point in the process you did not get a result after running a cmdlet, then it is likely that you entered an incorrect port number or PID.

Moreover, an app can listen on multiple ports simultaneously, so do not be confused if you get multiple results.

Closing Thoughts

Port mapping can significantly improve your internet speed and reduce latency. But for that, you must know which port or ports you want to configure for maximum throughput. On a Windows PC, this is the way to go to find out which app is using which port, and vice versa.

Once you know which ports are being used by which apps, you can now configure them on your router. Or, you may close an open port by terminating its respective process/app.

If you liked this post, Share it on:

Get Updates in Your Inbox

Sign up for the regular updates and be the first to know about the latest tech information

Subhan Zafar is an established IT professional with interests in Windows and Server infrastructure testing and research, and is currently working with Itechtics as a research consultant. He has studied Electrical Engineering and is also certified by Huawei (HCNA & HCNP Routing and Switching).

Leave the first comment