Public vs Private IP Addresses: What's the Difference?
Public IP addresses are unique on the internet. Private IPs exist only inside your local network. Learn the RFC 1918 ranges, how NAT bridges the two, and how to check both of your addresses.
Your computer has an IP address. So does every phone, tablet, and smart speaker on your network. But the address your laptop uses on your home Wi-Fi (something like 192.168.1.45) is invisible to the rest of the internet. Websites see a completely different address when you visit them.
That is because there are two kinds of IP addresses: public IP addresses and private IP addresses. Private IP addresses operate within your Local Area Network (LAN). Public IP addresses face the Wide Area Network (WAN), the internet. They serve very different purposes.
What is a Public IP Address?
A public IP address is a globally unique number that identifies a device (or more precisely, a network) on the internet. No two devices on the public internet share the same public IP at the same time.
Your ISP (internet service provider) assigns a public IP to your router. This public IP address is what websites, game servers, video calls, and every other internet service uses to send data back to you. When you search “what is my IP,” the result you see is your public IP.
Most residential connections use dynamic public IP addresses. The address changes periodically, usually when your router reconnects to the ISP or after a lease period expires. The ISP owns a pool of public IP addresses and rotates them among customers.
Businesses that host servers, run email systems, or need remote access often pay for a static public IP. This address never changes, making it reliable for services that need a consistent endpoint.
What is a Private IP Address?
A private IP address works only inside a local network. It cannot be used on the public internet. Routers, switches, and internet backbone equipment will not forward packets with private IP destination addresses. They discard them.
Three ranges of IPv4 addresses are reserved for private IP use, defined by a 1996 standard called RFC 1918:
| Range | Addresses Available | Common Use |
|---|---|---|
| 10.0.0.0 – 10.255.255.255 | 16,777,216 | Large corporate networks, some ISP equipment |
| 172.16.0.0 – 172.31.255.255 | 1,048,576 | Medium business networks, some cloud platforms |
| 192.168.0.0 – 192.168.255.255 | 65,536 | Home networks, small offices |
The 192.168.x.x range dominates home networking. When you connect to your Wi-Fi, your router’s DHCP server assigns your device a private IP address from this range, typically something like 192.168.1.100 or 192.168.0.15.
The beauty of private IP addresses is reuse. Every home network in the world can use 192.168.1.x without conflicts, because those addresses never touch the public internet. This is what made it possible for billions of devices to get online despite IPv4 only offering 4.3 billion total addresses.
How NAT Bridges Public and Private
If a private IP address cannot reach the internet, how does your laptop load a webpage? The answer is NAT (Network Address Translation). NAT converts between your private IP and public IP on the fly.
Here is what happens step by step:
- Your laptop (private IP 192.168.1.45) wants to load a website. It sends the request to your default gateway, the router.
- The router receives the packet, replaces the source private IP address (192.168.1.45) with its own public IP (say, 203.0.113.50), and notes the mapping in a translation table.
- The web server receives the request from the public IP 203.0.113.50 and sends its response back to that address.
- Your router receives the response, checks its translation table, sees that this session belongs to private IP 192.168.1.45, and forwards the response to your laptop.
This all happens in milliseconds, for every packet, across every device on your network simultaneously. Your router juggles thousands of these public-to-private IP translations at once.
NAT is the reason a household with 30 connected devices only needs one public IP address. It is also a security benefit, since your private IP addresses are hidden from the internet, external attackers cannot directly target individual devices behind the router.
Why the Public/Private Split Matters
The separation between public IP and private IP addresses has real consequences for security, privacy, and how you manage your network.
Address conservation. IPv4 has only 4.3 billion addresses. There are over 20 billion connected devices worldwide. Without private IP addressing and NAT, we would have run out of addresses long before IPv6 was ready. Private IP ranges let billions of devices connect through a much smaller pool of public IP addresses.
Security through obscurity. Devices behind NAT are not directly addressable from the internet. An attacker who knows your public IP can probe your router, but they cannot directly reach your laptop at private IP 192.168.1.45. The router’s firewall provides an additional layer by blocking unsolicited incoming connections by default.
Network independence. You can structure your local network however you want. Use 10.x.x.x for thousands of devices, or stick with the standard 192.168.1.x range. It does not matter what anyone else is doing, because your private IP addresses never leave your network.
Port forwarding implications. If you want to host something accessible from the internet (a game server, a security camera feed, a web server), you need to set up port forwarding on your router. This tells the router: “When traffic comes in on this port, send it to this private IP address.” Without port forwarding, NAT blocks all incoming connections that were not initiated by a device on your network.
How to Check Your Public and Private IP
Finding both your public IP and private IP takes about 30 seconds.
Your public IP: Visit a what is my IP tool. The public IP address displayed is what the internet sees. You can also search “what is my IP” in any search engine and the result appears directly.
Your private IP:
- Windows: Open Command Prompt, type
ipconfig. Find “IPv4 Address” under your active adapter. This is your private IP. The “Default Gateway” line shows your router’s private IP. - macOS: Open Terminal, type
ipconfig getifaddr en0for Wi-Fi oren1for Ethernet. - Linux: Open Terminal, type
hostname -Iorip addr show. - iPhone: Settings > Wi-Fi > tap your network > look for “IP Address.”
- Android: Settings > Network > Wi-Fi > tap your network > look for “IP address.”
Your router’s private IP (the default gateway) is typically 192.168.1.1. You can type this address into a browser to access the router admin panel and manage your network settings.
Does This Change with IPv6?
IPv6 was designed to eliminate the address shortage that made NAT necessary. With 340 undecillion addresses available, every device can have its own globally unique IPv6 address. In theory, the public IP versus private IP distinction becomes less important.
In practice, IPv6 still has a concept similar to private IP addresses called Unique Local Addresses (ULAs, in the fc00::/7 range), used for internal communication that should never touch the internet. Many networks still run IPv4 and IPv6 side by side (dual-stack), so the public IP and private IP setup is not going away soon.
For home users, the practical difference is minimal right now. Your router handles both protocols, NAT still runs for IPv4 traffic, and your devices still get private IP addresses for local network communication.
Frequently Asked Questions
How do I know if my IP address is public or private?
If your IP address falls within 10.0.0.0-10.255.255.255, 172.16.0.0-172.31.255.255, or 192.168.0.0-192.168.255.255, it is a private IP. Any address outside these ranges (and not a special reserved range) is a public IP. Use a 'what is my IP' tool to see your public IP, and check your device's network settings to see your private IP.
Can two devices have the same private IP address?
Two devices on the same local network cannot share a private IP without causing a conflict. However, devices on different networks can use the same private IP with no issues. Millions of home networks all use 192.168.1.1 for their router. They never interfere because private IPs are not routable on the internet.
Why does my router need both a public and private IP?
The public IP lets your router communicate with the internet. The private IP lets it communicate with your local devices. The router uses NAT (Network Address Translation) to convert between the two, allowing all your devices to share a single public IP address for internet access.
Can someone hack me through my public IP address?
A public IP address alone is not enough to hack a device, but it does identify your router on the internet. An attacker could scan your public IP for open ports and exploit vulnerable services. A properly configured router firewall blocks unsolicited incoming connections by default, which is the primary defence.
Does a VPN change my public or private IP?
A VPN changes the public IP that websites and services see. Your actual public IP (assigned by your ISP) and your private IP (assigned by your router) remain the same, but all your traffic is tunnelled through the VPN server, so the destination only sees the VPN server's IP address.