Search Our Database

How to find which application is using a specific port on Windows

Last updated on |
by

Introduction

When managing services like web servers, database systems, or email applications on a Windows machine, it is common to encounter port conflicts. If a specific port (such as 80, 443, or 3306) is already in use, new services may fail to start or operate as expected. Identifying which application is using a given port is a crucial first step in diagnosing the issue.

Windows provides built-in tools such as netstat, PowerShell, and Task Manager to determine which process is bound to a particular port. This is especially useful for developers, system administrators, and hosting users managing local servers, Docker environments, or external service connections.

This article explains how to identify the application using a specific port on Windows using several command-line methods and includes guidance for closing the process if necessary.

 

Prerequisites

  • A system running Windows 7, 8, 10, 11, or Windows Server.
  • Administrator privileges to run certain commands.
  • Familiarity with basic command-line tools like Command Prompt or PowerShell.

 

Step-by-step Guide

Step 1: Open Command Prompt or PowerShell as Administrator

  1. Press Windows + S and type cmd or powershell.
  2. Right-click on Command Prompt or Windows PowerShell.
  3. Select Run as administrator.

 

Step 2: Identify the Port in Use with netstat

To find which process is using a specific port (e.g., 80), run:

netstat -aon | findstr :80

Example output:

TCP    0.0.0.0:80           0.0.0.0:0            LISTENING       1234
TCP    0.0.0.0:80           0.0.0.0:0            LISTENING       2345

This command shows all active ports and their associated process IDs.

Tips 🖊️: Replace :80 with any port number you want to check.

 

 

Step 3: Find the Application Associated with the PID

Once you have the PID from the netstat output, run the following command to identify the application:

tasklist /fi "PID eq 1234"

Replace 1234 with the PID obtained in the previous step.

Example output:

C:\Windows\System32>tasklist /fi "PID eq 1234"

Image Name                     PID       Session Name        Mem Usage
=========================     =======   ================    ==========
nginx.exe                     1234      Console             5,200 K

 

 

Step 4: Optional – Use PowerShell for the Same Task

You can also use PowerShell to identify the process using a specific port:

Get-NetTCPConnection -LocalPort 80 | Select-Object -ExpandProperty OwningProcess

This returns the PID. To get the process name:

Get-Process -Id (Get-NetTCPConnection -LocalPort 80).OwningProcess

 

Step 5: (Optional) Stop the Process Using the Port

If the application holding the port is not needed, terminate it with:

Command Prompt:

taskkill /PID 1234 /F

PowerShell:

Stop-Process -Id 1234 -Force
⚠️ Important Note: Only stop processes you are certain are safe to terminate. Ending critical services can cause system instability or data loss.

Conclusion

Determining which application is using a specific port on Windows is an essential task when troubleshooting service conflicts, blocked ports, or performance issues. Tools like netstat, 1tasklist, and PowerShell provide fast and effective ways to trace port usage and identify the responsible application.

Whether managing a local development server or diagnosing a production environment, these steps can help ensure smooth operation and prevent service interruptions.

Should you have any inquiries about the guidelines, please feel free to open a ticket through your portal account or contact us at support@ipserverone.com. We’ll be happy to assist you further.