
Every machine you have ever used answers to 127.0.0.1. It is not on your network, it does not belong to your router, and no packet addressed to it ever leaves the device. That single fact explains most of the confusion around it, including why a page can load perfectly at that address while the internet is completely down.
Build a loopback URL and see what should be listening
Pick a port and the panel below assembles the correct address, tells you which service normally claims that number, and prints the command you would run to confirm something is bound to it.
Loopback is a rule, not a device
The entire 127.0.0.0/8 block is reserved. Your operating system intercepts anything sent there and hands it straight back to itself, without touching a cable or a radio. That is why you can develop a website on a laptop in airplane mode. It is also why nobody else can visit your 127.0.0.1, no matter how many times you paste the link into a chat.
Contrast that with the address your router hands you. A phone sitting on a home network might be 192.168.1.34 with a gateway at the router's 192.168.1.1 configuration page. Those addresses are routable inside your house. Loopback is not routable anywhere.
Reading the error message properly
Two failures look identical in a browser and mean opposite things.
- Connection refused. Something answered. The operating system checked the port, found no process listening, and closed the door immediately. Your service is not running, or it started on a different port than you think.
- Connection timed out. Nothing answered at all. On loopback this is almost always a firewall or security tool intercepting local traffic, since the kernel would otherwise reply instantly.
- This site can't be reached, ERR_EMPTY_RESPONSE. The process is alive but crashed mid-request, or you are speaking HTTP to something expecting HTTPS.
The distinction saves hours. Refused means fix the server. Timed out means fix the environment around it.
See what runs on 127.0.0.1:7860 and why that port keeps appearingThe high port numbers people keep searching
Development tools grab whatever port is free, so users end up staring at strings of digits they never chose. A number in the 49152 to 65535 range was almost certainly assigned automatically rather than configured. If you landed here after seeing one of them, the specific cases are covered separately: port 49342 and its ephemeral range behaviour, and the 57573 listener that turns up in security scans.
Editors add their own. Attaching a debugger opens a second socket alongside whatever you were already running, and the 62893 debug port is the one people notice most, usually while wondering what just claimed it.
Finding out what is actually holding a port
On Windows, netstat -ano | findstr :8080 returns a process ID, and Task Manager translates that ID into a name. On macOS or Linux, lsof -i :8080 gives you the process name directly. Killing the wrong one is easy, so read the output before reaching for a kill command.
The hosts file, and how localhost gets hijacked
Loopback resolution comes from a plain text file: C:\Windows\System32\drivers\etc\hosts on Windows, /etc/hosts elsewhere. Editing it lets you point a made-up domain at your own machine, which is how developers test multi-site setups. It is also a favourite trick of blocking tools, which redirect ad servers to 127.0.0.1 so the request dies instantly. If a site you need is unreachable and nothing else explains it, that file is worth opening.
Loopback in networking work
Pinging 127.0.0.1 is the oldest sanity check there is. A successful reply proves the TCP/IP stack on the machine is functioning. It proves nothing about your cable, your WiFi, or your gateway. Plenty of people report that ping works and then wonder why the internet is still gone, which is the expected outcome rather than a contradiction.
For anything beyond the machine itself, you need real addressing: an interface address, a subnet mask, and a default gateway. The mask decides how large your local network is, and the 255.255.255.0 mask breakdown covers why 254 usable hosts is the standard household figure.
Next device on the LAN keeps getting 192.168.1.2? Here is what that meansFAQ
Is 127.0.0.1 the same as localhost?
Practically yes, but not technically. Localhost is a name resolved through the hosts file, and on many systems it resolves to IPv6 ::1 first. 127.0.0.1 is the literal IPv4 address with no lookup involved.
Can someone else access my 127.0.0.1?
No. Loopback traffic never leaves the machine, so the address always means whatever device is typing it. Sharing the link only points the other person at their own computer.
Why does 127.0.0.1 say connection refused?
Because no program is listening on that port. The address itself is fine. Start the service, or check whether it chose a different port at launch.
What is the difference between 127.0.0.1 and 0.0.0.0?
Loopback restricts a server to the local machine only. Binding to 0.0.0.0 makes it listen on every network interface, so other devices on your LAN can reach it.
Does pinging 127.0.0.1 test my internet connection?
No. It only confirms the network stack on your own computer is working. A successful ping is completely normal even with the router unplugged.