Home / Localhost / localhost:4200

localhost:4200: what runs on it and how to open it

Port 4200 is the Angular dev server. How to start it, change the port and fix common errors.

localhost:4200 in a browser address bar reaches port 4200 on your computer, where Angular dev server is running

Open this address: http://localhost:4200This opens on your own computer. It only works if the program is running.

localhost:4200 is the default address for an Angular app started with ng serve. If it will not open, the server is not running or the port is taken.

What runs on localhost:4200

Commands to start and test port 4200

Start Angular
ng serve
Open the browser automatically
ng serve --open
Use another port
ng serve --port 4300
If ng is not found
npx ng serve

Find what is using port 4200

Run these in a terminal on your computer. Nothing is sent to this site.

If localhost:4200 will not open

Port 4200 is already in use
Angular offers another port, or stop the old server using the tool below.
ng is not recognized
The Angular CLI is missing. Install it with npm install -g @angular/cli or run npx ng serve inside the project.
Blank page
Look at the terminal for compile errors, and the browser console (F12) for runtime errors.

Other ports like 4200

PortUsually used by
localhost:3000React, Next.js, Express
localhost:5173Vite dev server
localhost:5000Flask
localhost:8000Django, PHP, Python
localhost:8080Tomcat, Spring Boot, Docker
localhost:8888Jupyter Notebook
localhost:9000PHP-FPM, SonarQube

Questions about localhost:4200

What is localhost:4200?
The default address of the Angular development server, started with ng serve.
How do I change the Angular port?
Run ng serve --port 4300, or set the port under the serve options in angular.json.
Is localhost:4200 safe?
Yes, as long as it stays on localhost. Only your own computer can reach localhost:4200. It becomes reachable from other devices only if you start the program on 0.0.0.0 or your computer's IP address. Development servers are for testing, so do not put them on the public internet.
Can I use a different port instead of 4200?
Yes. Most programs let you choose the port with a setting or a command option. Pick a free port above 1024 and open that number instead, for example localhost:4201.
How do I check what is using port 4200?
Use the port checker on this page. It shows the command for Windows, macOS and Linux and does not send anything to this site.
Can I open localhost:4200 from my phone?
Yes, if both are on the same Wi-Fi. Start the program so it listens on all addresses, then open your computer's IP address with :4200 on the phone. A firewall on the computer can still block it.

Updated 2026-10-02

Free tools that help

Related pages