How to free port 3000 on Mac
Updated 2026-09-28
Direct answer
To free port 3000 on Mac, find the process listening on TCP 3000 and stop it. With Terminal: run `lsof -iTCP:3000 -sTCP:LISTEN`, note the PID, then `kill <PID>` (or `kill -9 <PID>` if it ignores SIGTERM). With PortSnap: open the menu bar app, select port 3000, and Kill with confirmation — or use Free port… and enter 3000.
Free port 3000 with Terminal (macOS)
- Open Terminal.
-
List the listener on 3000:
lsof -iTCP:3000 -sTCP:LISTEN -
Note the
PIDcolumn, then stop the process:
If it does not exit:kill <PID>kill -9 <PID> - Confirm the port is free by running
lsofagain — empty output means nothing is listening.
Tip: add -n -P to skip name lookups:
lsof -nP -iTCP:3000 -sTCP:LISTEN.
Free port 3000 with PortSnap
- Download PortSnap and open it from the menu bar (⌘⇧P).
- Find 3000 in the live port list — or use Free port… and enter 3000.
- Confirm Kill. The listener stops; your next
npm run devcan bind again. - Optional: use Kill + Restart if you saved a start command for that project.
PortSnap shows process name, PID, command, and working directory so you do not kill the wrong app when two tools both want :3000. See features and pricing ($29 one-time).
When developers hit this
Create React App, Next.js, and many Node servers default to port 3000. Leaving a previous
npm run dev running — or a zombie after closing a tab — causes “port already in use.”
Related: fix EADDRINUSE in Node and
find what’s using a port on Mac.
FAQ
- Why is port 3000 still in use after I closed the terminal?
- The Node/Vite/Next process may still be running in the background. Closing the terminal tab does not always stop child processes. Check with lsof or PortSnap and kill the listener explicitly.
- Is kill -9 safe for freeing port 3000?
- Prefer a normal kill first so the process can exit cleanly. Use kill -9 only if the process ignores SIGTERM. PortSnap’s Kill sends a confirmed stop so you see the process name and cwd first.
- Can PortSnap free port 3000 without Terminal?
- Yes. Open PortSnap, find 3000 in the live list, and Kill — or choose Free port… and enter 3000. You need a Harbor license after install.