What Is an IP Address? A Complete Guide
Last Updated: October 2026
Key Takeaways
- An IP address is a unique number that identifies every device on the internet.
- IPv4 provides ~4.3 billion addresses; IPv6 provides a virtually unlimited supply.
- Public IPs are visible to websites; private IPs are used only inside your local network.
- IP geolocation can estimate your city and country but cannot reveal your exact street address.
- VPNs, proxies, and Tor can mask your real IP address for privacy.
- Most home connections use dynamic IPs assigned by DHCP; businesses often use static IPs.
Every device that connects to the internet needs an address so that data knows where to go. That address is called an IP address — short for Internet Protocol address. Whether you are browsing a website, sending an email, streaming a video, or playing an online game, IP addresses are working behind the scenes to route data between your device and the servers you are communicating with.
In this comprehensive guide, we will explain exactly what an IP address is, how the two main versions (IPv4 and IPv6) differ, the distinction between public and private addresses, how geolocation works, and what you can do to protect your IP address online.
How IP Addresses Work
The Internet Protocol (IP) is the fundamental set of rules that governs how data is sent across the internet. When you request a web page, your device breaks the request into small chunks called packets. Each packet includes a header that contains the source IP address (your device) and the destination IP address (the web server). Routers along the path read these headers and forward each packet toward its destination, hop by hop, until it arrives.
When the server responds, it reverses the process — it addresses the response packets to your IP address, and the internet's routing infrastructure delivers them back to you. Your device reassembles the packets into the complete web page. This entire process happens in milliseconds, thousands of times per second, for every device connected to the internet.
IP addresses operate at Layer 3 (the Network Layer) of the OSI model. They are responsible for logical addressing and routing, while lower layers handle the physical transmission of data over cables, Wi-Fi, or fiber optics.
IPv4 vs. IPv6
There are two versions of the Internet Protocol in active use today: IPv4 and IPv6. Understanding the differences between them is essential for anyone working with networks.
IPv4 (Internet Protocol Version 4)
IPv4 is the original version of IP, defined in 1981 by RFC 791. It uses 32-bit addresses, written as four decimal numbers (called octets) separated by dots. Each octet ranges from 0 to 255, producing addresses like 192.168.1.1 or 8.8.8.8.
With 32 bits, IPv4 can produce approximately 4.3 billion unique addresses (232 = 4,294,967,296). While this seemed like an enormous number in the early days of the internet, the explosive growth of smartphones, IoT devices, and cloud computing exhausted the available IPv4 address pool. The Internet Assigned Numbers Authority (IANA) allocated its last blocks of IPv4 addresses in 2011, and regional registries have since run out as well.
IPv6 (Internet Protocol Version 6)
IPv6 was designed to solve the IPv4 address exhaustion problem. It uses 128-bit addresses, written as eight groups of four hexadecimal digits separated by colons, such as 2001:0db8:85a3:0000:0000:8a2e:0370:7334. Leading zeros within a group can be omitted, and consecutive groups of all zeros can be replaced with ::, so the address above simplifies to 2001:db8:85a3::8a2e:370:7334.
The 128-bit address space provides approximately 3.4 × 1038 unique addresses — enough to assign a unique address to every atom on the surface of the Earth, many times over. Beyond the larger address space, IPv6 includes built-in improvements such as simplified header format, mandatory support for IPsec, better multicast support, and stateless address autoconfiguration (SLAAC).
Dual-Stack Transition
Because IPv4 and IPv6 are not directly compatible, the internet is currently in a long transition period. Most modern ISPs and websites run a dual-stack configuration, supporting both IPv4 and IPv6 simultaneously. When your device connects to a website that supports IPv6, it will prefer IPv6 automatically. When the destination only supports IPv4, it falls back. This transition is expected to continue for many years.
Public vs. Private IP Addresses
Not all IP addresses are created equal. The distinction between public and private IP addresses is one of the most important concepts in networking.
Public IP Addresses
A public IP address is globally unique and routable on the internet. It is assigned to your router by your Internet Service Provider (ISP). Every website, server, and online service you connect to can see your public IP address — it is how the internet knows where to send data back to you.
All devices in your household share the same public IP address. Your router uses a technique called Network Address Translation (NAT) to map outgoing requests from individual devices to the single public address and route incoming responses back to the correct device.
Private IP Addresses
A private IP address is used only within your local network — your home, office, or data center. Private addresses are assigned by your router using DHCP and are not visible to the outside internet. They allow multiple devices to communicate internally without consuming public IP addresses.
RFC 1918 defines three private IP address ranges that are reserved for local use:
- 10.0.0.0 – 10.255.255.255 (10.0.0.0/8)
- Approximately 16.7 million addresses. Commonly used in large enterprise networks.
- 172.16.0.0 – 172.31.255.255 (172.16.0.0/12)
- Approximately 1 million addresses. Often used in medium-sized organizations.
- 192.168.0.0 – 192.168.255.255 (192.168.0.0/16)
- Approximately 65,000 addresses. The most common range for home routers (192.168.0.x or 192.168.1.x).
These addresses are not routable on the public internet. If a packet with a private destination address reaches an internet router, it is simply dropped. NAT is what bridges the gap between your private network and the public internet.
How NAT Works
Network Address Translation (NAT) is the process your router uses to translate between private and public addresses. When your laptop (e.g., 192.168.1.10) sends a request to a website, the router replaces the source address with its public IP and records the mapping in a translation table. When the website responds, the router looks up the mapping and forwards the response to the correct internal device. This allows dozens or even hundreds of devices to share a single public IP address.
Static vs. Dynamic IP Addresses
IP addresses can be assigned in two ways: statically (permanently) or dynamically (temporarily).
Dynamic IP Addresses (DHCP)
Most home and business networks use the Dynamic Host Configuration Protocol (DHCP) to assign IP addresses automatically. When a device connects to the network, the DHCP server (usually your router) assigns it an available IP address from a pool, along with a lease duration. When the lease expires, the device must renew it or receive a new address.
Dynamic addressing is efficient because addresses are reused when devices disconnect. It also simplifies network administration since you do not need to manually configure each device. Most residential ISPs assign dynamic public IP addresses as well, meaning your home's public IP may change periodically — typically when your router restarts or the lease renews.
Static IP Addresses
A static IP address is manually configured and does not change. Static IPs are essential for servers (web servers, mail servers, VPN servers) that need a consistent address so clients can always find them. Many businesses pay their ISP for a static public IP.
On a local network, you might assign static private IPs to printers, network-attached storage (NAS) devices, or security cameras — anything that other devices need to reach at a predictable address.
How IP Geolocation Works
IP geolocation is the process of estimating the geographic location associated with an IP address. When you visit a website, the server can look up your IP address in a geolocation database (such as those maintained by MaxMind, IP2Location, or DB-IP) to determine your approximate location.
How Geolocation Databases Are Built
Geolocation providers compile their databases from multiple sources:
- Regional Internet Registries (RIRs) — ARIN, RIPE NCC, APNIC, LACNIC, and AFRINIC allocate IP blocks to ISPs and organizations, recording the registrant's country and address.
- ISP data — Some ISPs share location data about their address allocations directly with geolocation providers.
- User-contributed data — Aggregated and anonymized signals from users who opt in to share their location help refine city-level accuracy.
- Network measurements — Latency measurements and traceroutes help triangulate the physical location of network endpoints.
Accuracy and Limitations
IP geolocation is not precise. Typical accuracy levels are:
- Country level: 95–99% accurate
- Region/State level: 70–90% accurate
- City level: 50–80% accurate
The coordinates returned by a geolocation lookup typically point to the center of the identified city or area, not to a specific building. Mobile networks, VPNs, corporate proxies, and satellite connections can significantly reduce accuracy because the IP address may be registered in a different location than where the user is physically located.
What Your IP Address Reveals to Websites
Every website you visit can see your public IP address. From that single piece of information, a website can determine:
- Approximate location — your country, region, and often your city
- Internet Service Provider — the company providing your internet connection
- Connection type — whether you are on a residential, business, or data center connection
- ASN (Autonomous System Number) — the network that owns the IP block
However, your IP address alone does not reveal:
- Your exact street address or physical location
- Your name, email, or any personal identity information
- What other websites you have visited
- The contents of your encrypted communications
Only your ISP can link your IP address to your subscriber account, and they will only do so in response to a court order or lawful legal request. Websites can track you more precisely using cookies, browser fingerprinting, and login data — but those are separate from your IP address.
How to Protect Your IP Address
If you are concerned about privacy, there are several ways to mask or hide your real IP address from websites and online services.
VPN (Virtual Private Network)
A VPN encrypts your internet traffic and routes it through a server in another location. Websites see the VPN server's IP address instead of yours, effectively hiding your real location and ISP. VPNs are the most popular privacy tool for everyday users and are widely available as apps for all platforms.
Proxy Server
A proxy server acts as an intermediary between your device and the internet. Your requests go to the proxy first, which forwards them to the destination using its own IP address. Unlike VPNs, most proxies do not encrypt your traffic, making them faster but less secure. Web proxies, SOCKS proxies, and HTTP proxies each have different capabilities and use cases.
Tor (The Onion Router)
Tor routes your traffic through a series of volunteer-operated relays around the world, encrypting it at each step. This makes it extremely difficult to trace traffic back to your real IP address. Tor provides the strongest anonymity but is significantly slower than VPNs or proxies due to the multiple relay hops. It is commonly used by journalists, activists, and anyone who needs strong anonymity.
Comparison
- VPN — Best balance of speed, security, and ease of use. Suitable for everyday browsing.
- Proxy — Faster but less secure. Good for bypassing simple geo-restrictions.
- Tor — Maximum anonymity but slowest speed. Best for sensitive activities.
Frequently Asked Questions
What is an IP address in simple terms?
An IP address is a unique numerical label assigned to every device connected to the internet. It works like a mailing address for data — it tells the network where to send information so it reaches the right device. Without IP addresses, the internet would have no way to route data between billions of connected devices.
What is the difference between IPv4 and IPv6?
IPv4 uses 32-bit addresses written as four decimal numbers (e.g., 192.168.1.1), providing about 4.3 billion unique addresses. IPv6 uses 128-bit addresses written in hexadecimal (e.g., 2001:db8::1), providing a virtually unlimited number of addresses. IPv6 was created because the world ran out of IPv4 addresses.
What is the difference between a public and private IP address?
A public IP address is assigned by your ISP and is visible to websites on the internet. A private IP address is assigned by your router and is only used within your local network (e.g., 192.168.x.x or 10.x.x.x). All devices on your home network share the same public IP, but each has its own private IP.
Can someone find my exact location from my IP address?
No. IP geolocation can estimate your country, region, and sometimes your city, but it cannot pinpoint your street address or building. The coordinates typically reflect where your ISP registered the IP block. Only your ISP can link your IP to a specific subscriber account, and they require a court order to do so.
What is the difference between a static and dynamic IP address?
A static IP never changes — it is manually configured or permanently assigned. A dynamic IP is temporarily assigned by DHCP and may change when your device reconnects or when the lease expires. Most home connections use dynamic IPs; servers and businesses often use static IPs.
How can I hide or protect my IP address?
The most common method is using a VPN, which routes your traffic through a remote server and replaces your real IP with the VPN server's IP. Other options include proxy servers and the Tor network, each with different trade-offs in speed, security, and anonymity.
Why does my IP address change?
Most ISPs assign dynamic IP addresses using DHCP. Your IP may change when your router restarts, when the DHCP lease expires, or when the ISP rotates addresses. If you need a permanent address, you can request a static IP from your ISP, usually for an additional monthly fee.
What are the RFC 1918 private IP ranges?
RFC 1918 defines three private IP ranges: 10.0.0.0/8 (~16.7 million addresses), 172.16.0.0/12 (~1 million addresses), and 192.168.0.0/16 (~65,000 addresses). These addresses are reserved for internal networks and cannot be routed on the public internet.