What Is 127.0.0.1 and localhost?
127.0.0.1 is the loopback address: an IP that always means "this same machine". The hostname localhost normally resolves to it. Traffic sent there never leaves the device — it loops back inside the network stack.
Why It Matters
- Local development: running a web app on
http://127.0.0.1:3000orhttp://localhost:3000serves it only to your own machine. - Testing & security: services bound to
127.0.0.1are not reachable from the network, only locally.
The Full Range and IPv6
The entire 127.0.0.0/8 block (127.0.0.1–127.255.255.254) is reserved for loopback, though 127.0.0.1 is the one everyone uses. In IPv6 the loopback is ::1.
| Form | Loopback |
|---|---|
| IPv4 | 127.0.0.1 (range 127.0.0.0/8) |
| IPv6 | ::1 |
| Name | localhost |
See more reserved addresses in special IP addresses. Note that looking up 127.0.0.1 in the IP Lookup tool returns no registration data, because loopback is never publicly allocated.