A public IP address is used for communication across the internet, while a private IP address is used inside a local network. Your router commonly connects these two addressing areas, allowing phones, computers, and other devices with private addresses to share a public connection.
Public vs Private IP Address: The Short Answer
The main public vs private IP address difference is where the address can be routed. A public address participates in internet routing. A private IPv4 address belongs to a reserved local range and is not routed directly across the public internet.
One home can have many private addresses but only one shared public IPv4 address. For example, a laptop may use 192.168.1.25 inside the home while websites see 198.51.100.40 at the router or provider edge.
Neither type identifies a person by itself. Addresses describe network connections and can be shared, reassigned, translated, or changed by providers, routers, mobile networks, workplaces, and VPN services.
Public and Private IP Address Comparison
- Routing: Public addresses can be routed across the internet. Private IPv4 addresses stay inside local routing environments.
- Assignment: Providers and network operators assign public addresses. Routers, DHCP servers, or administrators assign private addresses.
- Uniqueness: A routed public address must be unambiguous in its internet routing context. Unrelated local networks can reuse the same private value.
- Website visibility: Websites normally see the public connection address, not a device's private address.
- Common purpose: Public addresses connect networks and services globally. Private addresses connect devices locally.
- Typical changes: A public address can change after provider or connection events. A private address can change after DHCP or local-network events.
- Security: Neither address type is a complete security control. Firewalls, updates, authentication, and safe configuration remain necessary.
What Is a Public IP Address?
A public IP address is an IPv4 or IPv6 address used in public network routing. An internet provider may assign one to a home router. A hosting company can assign one to a server, and a mobile carrier or VPN can present a shared gateway address to websites.
Public does not mean that every device can connect directly to the address. Firewalls, NAT, carrier-grade NAT, provider filtering, and service configuration can prevent inbound connections. It means the address belongs to public routing space rather than an IPv4 private block.
Use the IP Lookup tool from ipdnslookup to see the public address visible to the service and review its approximate network information.
What Is a Private IP Address?
A private IP address identifies a device or interface inside a local IPv4 network. Homes, offices, schools, data centres, and labs can use private space without requesting a unique public address for every device.
RFC 1918 reserves these private IPv4 blocks:
10.0.0.0/8, from 10.0.0.0 through 10.255.255.255172.16.0.0/12, from 172.16.0.0 through 172.31.255.255192.168.0.0/16, from 192.168.0.0 through 192.168.255.255
Only the stated 172 range is private. Addresses such as 172.15.1.1 and 172.32.1.1 fall outside it.
How Public and Private Addresses Work Together
- A device joins locally: A laptop connects to Wi-Fi.
- DHCP provides settings: The router assigns a private address, gateway, subnet mask, and DNS information.
- The device opens a connection: It sends traffic toward the router.
- The router translates IPv4 traffic: NAT replaces local source details with public connection details and records the session.
- The website receives the request: It sees the public-facing address.
- The reply returns: The router uses its session record to deliver data to the correct private device.
This translation is why several local devices can share one public IPv4 address while keeping separate private values.
A practical home-network example
A router uses 192.168.1.1. A laptop receives 192.168.1.25, a phone receives 192.168.1.26, and a printer receives 192.168.1.50. These private addresses work inside the home.
The router uses one provider-facing public address for outgoing IPv4 traffic. Websites can see that public connection, but they do not ordinarily receive the three private addresses in the network packets sent across the internet.
How DHCP Assigns Private IP Addresses
Dynamic Host Configuration Protocol, or DHCP, gives devices addresses and other network settings automatically. The assignment has a lease period and can be renewed.
A device may keep the same private address for a long time, but it can receive another value after reconnecting, changing networks, using a randomized Wi-Fi identity, or losing its previous lease. A DHCP reservation can give a printer, camera, or local server a more predictable value.
How NAT Connects Private IPv4 to the Internet
Network Address Translation lets private IPv4 devices communicate through a public IPv4 connection. The router tracks ports and sessions so returning traffic reaches the correct local device.
NAT conserves public IPv4 space, but it is not the same as a firewall and does not guarantee security. Avoid unnecessary port forwarding, keep equipment updated, use strong administration passwords, and allow only services that are genuinely required.
What Is Carrier-Grade NAT?
Carrier-grade NAT adds translation inside the provider network. Several customer connections can share a provider-controlled public IPv4 address. RFC 6598 defines 100.64.0.0/10 as shared address space for this type of provider use.
CGNAT can make inbound hosting and port forwarding difficult because the visible public address is not assigned directly to the customer's router. Ask the provider about public IPv4 or IPv6 options when inbound access is necessary.
Public and Private Addresses in IPv6
IPv6 does not use the three RFC 1918 ranges. Globally routable IPv6 unicast addresses can provide public connectivity without ordinary IPv4 NAT. Firewalls are still essential because global addressing does not mean every inbound connection should be accepted.
Unique local IPv6 addresses use fc00::/7 for local communication. IPv6 link-local addresses use fe80::/10 and work only on their local link. A device can have link-local, unique-local, and global IPv6 addresses at the same time.
How to Find Your Public and Private IP Addresses
- Find the public address: Open the IP Lookup tool and read the main IPv4 or IPv6 value.
- Find the private address: Open the active network details on Windows, macOS, Linux, Android, or iPhone.
- Check the gateway: The local router address often appears beside the private address.
- Confirm the interface: Ignore disconnected, loopback, virtual, or VPN interfaces unless they matter to the task.
- Compare carefully: A VPN or mobile network can change the address visible online.
The guide How to Find Your IP Address on Any Device provides detailed steps.
When Should You Use Each Address?
- Use a private address to open a router page, reach a local printer, connect to a camera, or access a service inside the same network.
- Use a public address when checking what a website sees, reviewing provider routing, configuring an approved allowlist, or diagnosing an internet-facing connection.
- Use a stable local reservation for devices that must remain easy to reach inside the network.
- Use secure remote access rather than exposing local administration pages directly to the internet.
- Use the correct IP version because IPv4 and IPv6 addresses on the same device can follow different paths.
Security and Privacy Differences
A private address is not routed directly on the public internet, but other devices on the same network may still reach it. Guest devices, malware, weak Wi-Fi security, exposed file sharing, and outdated equipment can create local risk.
A public address can reveal approximate network location and provider information. It does not reveal a person's name or exact street address by itself. Many users can share one public address, and one user can appear through several addresses.
A changed public or private address is not automatically evidence of hacking. DHCP leases, router reconnects, VPNs, mobile gateways, and provider maintenance commonly change addresses.
Common Public and Private IP Mistakes
- Assuming every 172 address is private: Only 172.16.0.0 through 172.31.255.255 is private.
- Using a public lookup for a private address: A website cannot determine the reusable local address from ordinary internet routing.
- Confusing the gateway with the device: The router and computer normally have different private addresses.
- Treating NAT as complete security: Continue using firewalls, updates, and authentication.
- Expecting one permanent IP: Both public and private assignments can change.
- Calling all non-public addresses private: Loopback, link-local, documentation, multicast, and reserved ranges have other purposes.
Frequently Asked Questions
Is 192.168.1.1 public or private?
It is private and commonly used as a local router address.
Can two homes use the same private IP?
Yes. Separate networks can reuse private ranges without conflicting.
Can two devices use the same private IP on one network?
Two active devices in the same subnet normally create an address conflict.
Does a website see my private IP?
Ordinary web traffic exposes the public-facing connection. The private source address is normally translated before crossing the internet.
Is a public IP unsafe?
Having a public address is normal. Risk depends on exposed services, firewall rules, software, and authentication.
Does a VPN hide my public IP?
Websites normally see the VPN exit address, while the VPN provider and your direct provider retain different network visibility.
Can my public and private IP both change?
Yes. Provider events can change the public address, while local DHCP events can change the private address.
Does IPv6 have private addresses?
IPv6 uses unique-local and link-local ranges for local purposes rather than RFC 1918 private IPv4 blocks.
Choose the Address That Matches the Task
Use the public address for internet-facing checks and the private address for local communication. Confirm the IP version, interface, network boundary, and security requirement before changing any configuration.
Use the Usable IP Range Calculator to inspect subnet boundaries or the Number of Hosts Calculator to plan capacity. The related public and private IP guides from ipdnslookup provide deeper explanations for each address type.