What is an IP address? How it works and how to find yours

What an IP address is, how IPv4 and IPv6 differ, why your router and websites see different addresses, what your IP reveals, and how to find it.

Popo
On this page

Loading this page took dozens of packets travelling between your device and a web server. Every packet carries two IP addresses: where it came from and where it's going. Routers along the way only look at the destination and pass the packet on, hop by hop, until it reaches the server. The server replies to the source address, and the data finds its way back to you.

Your device
Home router
Your ISP
The internetMany routers on the way
Web server
RequestFrom 203.0.113.45To 198.51.100.7
ReplyFrom 198.51.100.7To 203.0.113.45
When a request leaves your home, its source is your home's public address, 203.0.113.45, not your device's own address. NAT, covered below, explains why.

Both addresses sit in the header at the start of every packet, next to a few other control fields:

Version4
Header length
Service type
Total length
Identification
Flags
Fragment offset
TTL64
ProtocolTCP
Checksum
Source address203.0.113.45
Destination address198.51.100.7

Data: part of the web page, a video, a message…

The first 20 bytes of an IPv4 header, 32 bits per row. Routers decide where to forward the packet from the destination address. TTL drops by one at every router, and the packet is discarded when it reaches zero. Nothing in the header names a person or an account; the page content comes after it.

An IP address belongs to a network interface, not to a person, and not always to a single device. Your phone has one address on Wi-Fi and another on mobile data, and the same interface can hold an IPv4 address and several IPv6 addresses at the same time.

IPv4 and IPv6

Two versions of IP are in use today.

IPv4 addresses are 32 bits long. To make them readable, they're written as four numbers from 0 to 255 separated by dots, like 203.0.113.45. Each number is 8 bits, which is why it tops out at 255.

IPv6 addresses are 128 bits long, written as eight groups of hexadecimal digits separated by colons. Leading zeros in a group can be dropped, and one run of all-zero groups can be replaced with :: (only once per address), so 2001:db8:85a3:0:0:8a2e:370:7334 can also be written as 2001:db8:85a3::8a2e:370:7334.

IPv432 bits: 4 numbers × 8 bits, so each is 0–255

20311001011
000000000
11301110001
4500101101

IPv6128 bits: 8 groups × 16 bits, in hexadecimal

20010db84f2a0001a1b2c3d4e5f67788

Network prefix · 64 bitsAnnounced by your router, the same for every device on the network

Interface ID · 64 bitsGenerated by the device; temporary addresses change it regularly

Usually written 2001:db8:4f2a:1:a1b2:c3d4:e5f6:7788

The command output at the end of this article uses the same 2001:db8:4f2a:1 prefix.

Why IPv4 ran out

Thirty-two bits allow about 4.3 billion addresses, and about 600 million of those are reserved for private networks, multicast, experiments and other special uses. As of November 2026, the five Regional Internet Registries have about 3.69 billion IPv4 addresses on record as handed out, and only a little over three million left to give. IANA, which oversees the global pool, gave out its last blocks in 2011, and the regional registries ran out of addresses for regular allocation one after another:

  1. Feb 2011IANAGlobal pool
  2. Apr 2011APNICAsia-Pacific
  3. Sep 2012RIPE NCCEurope, Middle East
  4. Jun 2014LACNICLatin America
  5. Sep 2015ARINNorth America

AFRINIC (Africa) is still rationing what it has left

When IANA and each regional registry ran out of IPv4 addresses for regular allocation, according to their own announcements.

The addresses aren't spread evenly, either. In the early internet, American universities, companies and government agencies received whole blocks at a time, and many of those are still held by the original organizations.

IPv4 addresses registered to each country, in millions

  1. United States1,606
  2. China343
  3. Japan189
  4. United Kingdom139
  5. Germany126
  6. South Korea112
  7. Brazil79
  8. India42
Source: the five Regional Internet Registries' combined statistics (NRO delegated stats), 24 November 2026. Only allocated and assigned addresses are counted.

The United States, with about 340 million people, has more than 1.6 billion IPv4 addresses, over four per person. China has 1.4 billion people and 343 million addresses, less than one for every four people. India, with a population similar to China's, has about 42 million. Few addresses and many users is the direct reason so many mobile and home broadband customers share public addresses (see carrier-grade NAT below).

Scarcity created a market. Registries allow addresses to be transferred between organizations, and across the 596 deals IPv4.Center counted in the first half of 2026, an IPv4 address sold for about $20 on average, so a /24 of 256 addresses cost over $5,000. Cloud providers now charge for public IPv4 separately, too: since February 2024, AWS has billed $0.005 per public IPv4 address per hour, about $3.60 a month.

Why different sites see different addresses

The two versions can't talk to each other directly, so many networks run both side by side. This is called dual stack. When a browser connects to a site that's also dual stack, it tries IPv6 first. If that hasn't connected within about 250 milliseconds, it starts an IPv4 attempt in parallel and uses whichever connects first. This is known as Happy Eyeballs (RFC 8305).

As a result, different sites can see different addresses from the same computer: a site that supports IPv6 will usually see your IPv6 address, and an IPv4-only site sees your IPv4 address.

IPv6 is now mainstream. On 28 March 2026, the share of Google users reaching it over IPv6 passed 50% for the first time. Mobile networks tend to be further along. According to China's IPv6 development report for 2026, IPv6 carried 70.85% of the country's mobile traffic at the end of 2025, but only 32.38% on fixed broadband. On mobile data, then, sites are likely to see your IPv6 address. For more on how the two differ, see IPv4 vs IPv6.

Public and private addresses

The address in your computer's network settings is probably something like 192.168.1.8, and it won't match the one CKIP shows you. That's because they are two different kinds of address.

A public address is unique on the whole internet, and routers anywhere know how to deliver data to it. A private address only works inside a local network such as your home or office. Every local network can reuse the same private ranges, and routers on the internet won't forward packets addressed to them.

Common special-purpose ranges:

RangeUsed for
10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16Private IPv4 addresses. Home routers usually use 192.168.x.x
100.64.0.0/10Shared addresses reserved for carrier-grade NAT (CGNAT)
127.0.0.1, ::1Loopback: the device itself
169.254.x.x, addresses starting with fe80:Link-local. An IPv4 address like this usually means the router never gave one
fc00::/7 (in practice, starting with fd)Private IPv6 addresses, called unique local addresses

The number after the slash is how many leading bits of the address are fixed. The smaller the number, the bigger the block: a /8 holds more than 16 million addresses, and a /16 holds 65,536. See CIDR notation explained.

NAT: one public address for the whole household

Your phone, laptop and TV at home all use private addresses. When one of them visits a website, the router swaps the packet's source address for its own public address before sending it out. This is NAT, network address translation.

Your home network

Phone192.168.1.23
Laptop192.168.1.8
TV192.168.1.40
RouterPrivate 192.168.1.1Public 203.0.113.45
WebsiteSees every request from203.0.113.45
Devices use private addresses with each other and with the router. Once a request leaves the house, its source is the router's public address.

Replies come back addressed to the router's public address, so how does the router know which device each one is for? Ports. Every connection carries a port number as well as an address. When the router rewrites the source address, it also gives the connection a public port and writes down the mapping:

Device at homeRouter rewrites it asWebsite
192.168.1.8:52814203.0.113.45:40112198.51.100.7:443
192.168.1.23:61002203.0.113.45:40113198.51.100.7:443

A reply sent to 203.0.113.45:40113 matches the second entry, so the router passes it to the phone. A connection that starts from outside matches no entry, so the router has nowhere to send it and drops it. That's why devices behind NAT can reach out but can't be reached directly, unless you set up port forwarding on the router.

So the "your IP" that websites see is really your router's public address, and every other device on your home network shows up with the same one.

Carrier-grade NAT (CGNAT)

An IPv4 address has over 60,000 ports, so the same trick works a second time. Many ISPs no longer give each customer a public IPv4 address. They run NAT inside their own network and share one public address among many customers, each using different ports. This is carrier-grade NAT, or CGNAT. Most mobile networks work this way, and it's increasingly common on home broadband.

Customers of the same ISP

Home A router100.64.12.7
Home B router100.64.12.8
Home C router100.64.37.2
Carrier-grade NATPublic 203.0.113.45
WebsiteAll three homes show up as203.0.113.45
Each home router gets a shared address from 100.64.0.0/10 and does its own NAT. The ISP then translates again, so all three homes leave through one public address.

Behind CGNAT:

  • The internet address your router receives is in 100.64.x.x or another private range, and it doesn't match the address websites see.
  • Nobody can connect straight into your home from outside, for example to reach a NAS, because the ISP's NAT table isn't yours to configure, so you can't forward ports on it.
  • If someone else sharing your public address sends spam or hammers an API, sites may throw CAPTCHAs at that address or rate-limit it, and you get caught up in it too.

The "Shared devices" field in a CKIP lookup estimates roughly how many devices are sharing that IP. For what CGNAT does to port forwarding and online games, see Public vs private IP addresses.

IPv6 usually doesn't need NAT

There are enough IPv6 addresses for ISPs to give every household a whole block. The router advertises a 64-bit prefix from it to your home network, so each device can have its own public IPv6 address without NAT. That's why some connections have no public IPv4 address but do have public IPv6.

To make it harder for websites to follow one device through a single address over time, mainstream operating systems also create temporary addresses for outgoing connections and regularly replace the last 64 bits. The first 64 bits, the block your ISP gave your household, stay the same, though, so a site can still tell that those connections come from the same network. The command output under your private IP at the end of this article shows a stable address and temporary addresses sharing one prefix.

Where IP addresses come from

IP addresses are managed through a hierarchy and handed down, level by level, to your devices:

  1. IANAOversees the whole address space
  2. Allocates large blocks
    Five regional registriesAFRINIC · APNIC · ARIN · LACNIC · RIPE NCC
  3. Allocates
    ISPs, cloud providers, large organizationsApply for blocks of addresses
  4. Assigns when the router connects
    Your home routerA public or shared IPv4 address, plus an IPv6 block
  5. DHCP for IPv4; devices build their own IPv6
    Your devicesA private IPv4 address and public IPv6 addresses
The arrows show how each level gets its addresses. The first three levels record every allocation in public databases; the last two happen inside your ISP and your home.
  1. IANA, the Internet Assigned Numbers Authority, oversees the whole address space and hands large blocks to five Regional Internet Registries (RIRs).
  2. The five RIRs each cover a region: AFRINIC for Africa, APNIC for Asia-Pacific, ARIN for the US, Canada and parts of the Caribbean, LACNIC for Latin America and parts of the Caribbean, and RIPE NCC for Europe, the Middle East and parts of Central Asia. Some countries also have a national registry, such as JPNIC in Japan and CNNIC in China, which gets addresses from APNIC and assigns them locally.
  3. ISPs, cloud providers and large organizations get address blocks from a registry and assign them to customers or their own servers.

Every assignment is recorded in the registry's database: which organization holds the block, which country it's registered in, and whom to contact about abuse. These records are public, and you can look them up with a WHOIS lookup; WHOIS and RDAP explains how to read them.

A network that holds a block also has to announce it to the rest of the internet over BGP ("these addresses are reachable through me") so that other networks know where to send traffic. The number it announces under is its ASN, or autonomous system number. The ASN and ASN owner in a CKIP lookup show the network currently announcing that address.

The organization a block is registered to and the network announcing it aren't always the same. Take the two best-known public DNS addresses:

BlockRegistryRegistered toAnnounced by
8.8.8.0/24ARINGoogle LLCAS15169 Google
1.1.1.0/24APNICAPNIC Research and DevelopmentAS13335 Cloudflare

8.8.8.8 is registered to Google and announced by Google. The block used to be part of Level 3's 8.0.0.0/8 and has only been registered to Google directly since December 2023. The block holding 1.1.1.1 is registered to APNIC's research arm, which runs the public resolver together with Cloudflare, so the record notes "Routed globally by AS13335/Cloudflare". Both registrations and announcements change over time; IP prefix history explains how to look up past records.

How your devices get their addresses

  • Home broadband: when your router or modem connects to the ISP, the ISP gives it a public IPv4 address, or a shared one behind CGNAT, and usually a block of IPv6 addresses as well.
  • Devices at home: when a device joins your Wi-Fi, the router gives it a private IPv4 address over DHCP. For IPv6, the device usually builds its own address from the prefix the router advertises.
  • Mobile data: the carrier assigns addresses directly, usually a shared IPv4 address behind CGNAT plus a public IPv6 address.

Dynamic and static IP addresses

Most home broadband and mobile connections use dynamic IPs. The address can change when you reconnect, restart your modem, when the lease runs out, or when the ISP reorganizes its network. Mobile addresses change even more often; toggling airplane mode is frequently enough to get a new one.

A static IP stays the same. It's typical for business lines, servers and cloud instances. On home broadband, a fixed public address usually has to be requested from the ISP separately.

Dynamic versus static is a separate question from public versus private: a dynamic IP can be public, and a static IP can be private.

What your IP address reveals

The only thing a website gets straight from the network is your IP address and port.

Web server access log

203.0.113.45 - - [25/Nov/2026:14:03:17 +0000] "GET /blog HTTP/2.0" 200 18342 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 18_1 like Mac OS X) …"

IP databases

What the site can work out (example)

Location
United Kingdom, London; the city may be off
Network
AS64500, a broadband provider
Type
Residential broadband
History
No proxy flag, no abuse reports
Not in any of them
Your name, phone number or street address
The 203.0.113.45 at the start of the log line comes from the packet header. The time, page, phone model and browser after it are recorded by the server or sent by the browser. Below it is the rough profile an IP database lookup returns.

With the address, a website can look up:

  • Approximate location: the country is usually right, the city is often off. Mobile addresses often show up in the city where the carrier's gateway sits rather than where you are. See How IP geolocation works.
  • Network operator: which ISP or cloud provider the address belongs to, and under which ASN.
  • Network type: home broadband (residential), mobile, data center, or a business or university network. See Residential, mobile and datacenter IPs.
  • History: whether the address is flagged as a proxy, VPN or Tor exit, and whether it has recent abuse reports.

Your IP address doesn't reveal your name, phone number or street address. Only the ISP knows which customer had a given address at a given time (behind CGNAT, it also needs the port), and it hands that out only through legal process.

That's still enough for websites to make a lot of decisions: showing language and prices by region, restricting video by licensing region, asking for verification on a login from an unusual location, and showing CAPTCHAs to, or blocking, data-center addresses and addresses with abuse reports. If you keep running into CAPTCHAs or "not available in your region", start by checking what your IP looks like to websites.

What proxies and VPNs change

With a proxy or VPN, your data goes to the proxy server first, and the server forwards it to the website. The site sees the server's exit address instead of your public address, and its judgments about location, network type and risk all apply to that exit.

Your device203.0.113.45
Encrypted
Proxy or VPN serverExit 198.51.100.23
WebsiteSees198.51.100.23

Two paths that can go around the proxy

Your device
DNS lookup
Your ISP’s DNS serverLearns your ISP and rough location
Your device
WebRTC
The web pageMay get your real address203.0.113.45
The solid line is the normal path through the proxy. The dashed paths skip it, and however good your exit is, they can still reveal your ISP and your real address.

Two paths can still go around the proxy, though. WebRTC in your browser can tell a web page your real public address, and DNS lookups that don't go through the proxy are sent to your ISP's resolver, which reveals which ISP you use and roughly where you are. After switching exits, it's worth running a DNS leak test and a WebRTC leak test.

How to find your IP address

Your public IP

Open the CKIP home page to see the public address you're using for this visit, along with its location, ASN, IP type and risk checks. How to read an IP lookup explains every field. You can also look up any other IP, domain or ASN from the search box in the header.

If your network has both IPv4 and IPv6, or you use a proxy with routing rules, different sites may see different addresses. The network exit check asks several sites what address they see and lists every one.

You can also check each version from the command line. ckip.net runs on Cloudflare, and /cdn-cgi/trace returns details about the current connection. -4 and -6 tell curl to use only IPv4 or only IPv6:

Terminal
curl -4 https://ckip.net/cdn-cgi/tracefl=534f156h=ckip.netip=203.0.113.45ts=1795585619.000visit_scheme=httpsuag=curl/8.7.1colo=LHRsliver=nonehttp=http/2loc=GBtls=TLSv1.3sni=plaintextwarp=offgateway=offrbi=offkex=X25519

ip= is the address Cloudflare sees, and loc= is the country or region it places you in. Run it again with -6 instead of -4 and ip= changes to your IPv6 address. If that fails to connect, your network has no working IPv6 right now. With a proxy on, you'll see the proxy's exit here.

Your private IP

Private addresses have to be checked on the device itself.

Windows: open Command Prompt and run ipconfig.

Command Prompt
ipconfigWireless LAN adapter Wi-Fi:    Connection-specific DNS Suffix  . :   IPv6 Address. . . . . . . . . . . : 2001:db8:4f2a:1:8f3:b2c1:7a4e:9d10   Temporary IPv6 Address. . . . . . : 2001:db8:4f2a:1:a1b2:c3d4:e5f6:7788   Link-local IPv6 Address . . . . . : fe80::1c2b:3aff:fe4d:5e6f%12   IPv4 Address. . . . . . . . . . . : 192.168.1.8   Subnet Mask . . . . . . . . . . . : 255.255.255.0   Default Gateway . . . . . . . . . : 192.168.1.1

This shows most of the address types covered above. IPv4 Address is the private address from your router. The two addresses starting with 2001:db8:4f2a:1: are public IPv6 addresses with the same first 64 bits, and websites see the temporary one. The fe80: address only works on the local network.

macOS: Wi-Fi is usually en0; wired adapters may have other names. For just the IPv4 address:

Terminal
ipconfig getifaddr en0192.168.1.8

For every address, use ifconfig:

Terminal
ifconfig en0 | grep inet	inet6 fe80::1c2b:3aff:fe4d:5e6f%en0 prefixlen 64 secured scopeid 0xf	inet6 2001:db8:4f2a:1:8f3:b2c1:7a4e:9d10 prefixlen 64 autoconf secured	inet6 2001:db8:4f2a:1:5d07:21e9:c6b3:40fa prefixlen 64 deprecated autoconf temporary	inet 192.168.1.8 netmask 0xffffff00 broadcast 192.168.1.255	inet6 2001:db8:4f2a:1:a1b2:c3d4:e5f6:7788 prefixlen 64 autoconf temporary

secured marks the device's stable address on this network, and temporary marks a temporary one. The one flagged deprecated is the previous temporary address: a new one has replaced it, so it's no longer used for new connections, but existing connections keep working until it expires.

Linux:

Terminal
ip -brief address

On an iPhone, go to Settings → Wi-Fi and tap ⓘ next to the current network. On Android, open the details of your Wi-Fi network; the exact location varies by manufacturer.

Check whether you're behind CGNAT

Turn off any proxy or VPN, then find the device that connects to your ISP: usually your router, or the ISP's modem or gateway if your router plugs into one. In its admin page, find the WAN or internet IP address and compare it with the IPv4 address websites see. If the CKIP home page shows an IPv6 address, the network exit check, or the curl -4 command above, will show your IPv4 address.

  • The two addresses match: you have your own public IPv4 address.
  • The WAN address is between 100.64.0.0 and 100.127.255.255, or a private address such as 10.x.x.x: your ISP uses CGNAT, and you share a public address with other customers.
  • Your router shows 192.168.x.x: it's probably plugged into another router or the ISP's modem at home, so check that device instead.