📄 Here’s an Guide for You:
How to Find and Free Port 80 in Windows Using CMD
In Windows, port 80 is commonly used by web servers like Apache, IIS, or Nginx. If you’re running into port conflicts — for example, when setting up XAMPP — you need to find and free port 80. This guide explains how to check which application is using port 80 and how to stop it.
Step 1 – Check Which Process is Using Port 80
Open Command Prompt (CMD) and run:
netstat -aon | findstr :80
This command lists all processes using port 80, showing something like:
TCP 127.0.0.1:8001 0.0.0.0:0 LISTENING 48188
TCP [::1]:80 [::]:0 LISTENING 43288
TCP [::1]:80 [::1]:56699 TIME_WAIT 0
TCP [::1]:80 [::1]:56700 FIN_WAIT_2 43288
TCP [::1]:80 [::1]:56704 ESTABLISHED 43288
TCP [::1]:56700 [::1]:80 CLOSE_WAIT 29640
TCP [::1]:56704 [::1]:80 ESTABLISHED 29640
TCP [2401:4900:8835:a2a3:4d84:2033:28cb:3879]:56296 [2404:6800:4009:806::200a]:443 ESTABLISHED 29640
TCP [2401:4900:8835:a2a3:4d84:2033:28cb:3879]:56608 [2404:6800:4007:807::2003]:443 ESTABLISHED 29640
TCP [2401:4900:8835:a2a3:4d84:2033:28cb:3879]:56609 [2404:6800:4007:807::2003]:443 ESTABLISHED 29640
TCP [2401:4900:8835:a2a3:4d84:2033:28cb:3879]:56689 [2404:6800:4007:808::200a]:443 ESTABLISHED 29640
LISTENING
means the process is actively using port 80.43288
is the PID (Process ID) — the process responsible for using port 80.

Step 2 – Identify the Process Name
Once you have the PID, run:
tasklist | findstr 43288
Replace 43288
with the PID you found. This will tell you which program is using the port. It could be:
Process | Description |
---|---|
httpd.exe | Apache (often from XAMPP) |
w3wp.exe | IIS (Microsoft’s web server) |
nginx.exe | Nginx server |
System | Sometimes Windows services like World Wide Web Publishing Service can occupy port 80 |
Step 3 – Stop the Process
If you want to free port 80 immediately, you can terminate the process using:
taskkill /PID 43288 /F
/F
forces termination.- Replace
43288
with the correct PID.
Step 4 – Optional: Disable Unwanted Services (Permanent Fix)
If it’s IIS:
You can disable IIS (Internet Information Services) via:
- Press
Windows + R
, typeoptionalfeatures
and press Enter. - Uncheck:
- Internet Information Services.
- World Wide Web Services.
- Click OK.
If it’s Apache from XAMPP:
Use the XAMPP Control Panel to stop/start Apache safely.
⚠️ Important Tips
- Killing processes directly is a temporary fix.
- If you need port 80 permanently free, check Windows Services to find auto-start services using port 80.
Summary of Commands
Command | Purpose |
---|---|
`netstat -aon | findstr :80` |
`tasklist | findstr ` |
taskkill /PID <PID> /F | Force kill the process using port 80 |