What is an IP address? Public, private, IPv4 and IPv6 explained

Who hands out IP addresses, why yours changes, how your public address differs from the private one your router gives each device, what IPv4 and IPv6 addresses look like, and what a website can and can't learn from yours.

On this page What an IP address does

An IP address is the number that identifies a connection on the internet, so that data can be delivered to it. When your phone or laptop loads a page, the server on the other end sees that number and uses it to send the page back to you. You can see yours at what is my IP, which shows the address websites see right now, along with the approximate location and the network it belongs to.

Most people only look it up when a game says their IP is banned or a site shows the wrong country. This guide covers who hands the number out, why it changes, and what it says about you.

What an IP address does

IP stands for Internet Protocol, the set of rules every device on the internet uses to move data around. An IP address is the label that tells the network where a packet of data should go, much like the address on an envelope. Each packet carries two of them: the address it came from and the address it's going to. Routers along the way read the destination and pass the packet on, one hop at a time, until it arrives.

The address identifies a connection to the network. It doesn't identify a person, and often not even a single device: a whole household, an office or, behind some ISPs' carrier-grade NAT, many customers can share one public address.

What one looks like

There are two versions of the protocol in use, and their addresses look nothing alike.

IPv4: four numbers, 32 bits

An IPv4 address is 32 bits long (RFC 791). It's written as four numbers from 0 to 255, separated by dots:

text
8.8.8.8
192.168.1.20
203.0.113.7

Each of the four numbers is one byte (8 bits). Thirty-two bits allow 2³² combinations, which is 4.294.967.296 addresses in total. That sounded like plenty in 1981. It isn't enough for a world with several connected devices per person, and the free supply has all but run out, which is why so much of the internet now shares IPv4 addresses.

IPv6: eight groups of hex, 128 bits

An IPv6 address is 128 bits long (RFC 4291 defines the addressing; the protocol itself is RFC 8200). It's written as eight groups of four hexadecimal digits separated by colons, and long runs of zeros can be shortened to :::

text
2001:4860:4860:0000:0000:0000:0000:8888
2001:4860:4860::8888

Both lines are the same address, one of Google Public DNS's. With 128 bits there are 2¹²⁸ possible addresses, a number 39 digits long, so IPv6 networks don't need to share addresses the way IPv4 networks do. Many connections today have both kinds, and the browser picks one for each site it connects to, usually IPv6 when both work. What is my IPv6 shows whether your connection has working IPv6. What is my IPv4 shows your IPv4 address when your browser reaches it over IPv4.

Who hands out IP addresses

No single company owns the address space. It's handed down in layers:

  1. The Internet Assigned Numbers Authority (IANA) manages the global pool and allocates large blocks to the five Regional Internet Registries (IANA: number resources).
  2. The RIRs serve one region each: AFRINIC (Africa), APNIC (Asia/Pacific), ARIN (Canada, the USA and some Caribbean islands), LACNIC (Latin America and some Caribbean islands) and RIPE NCC (Europe, the Middle East and Central Asia). The NRO coordinates them. They allocate addresses to ISPs, hosting companies, universities and other networks in their region, and keep public records of who holds each block.
  3. Your ISP assigns one of its addresses to your connection, usually automatically.
  4. Your home router then gives each device in the house its own local address.

The records at step 2 are why anyone can look up which organization holds an address. An IP lookup shows the ISP, the organization and the network's autonomous system number (ASN) for any public address.

Your public address and your private address

Your devices have two kinds of address at once.

The public address is the one your ISP assigned to your connection. It's the one websites see and the one what is my IP shows. Every device behind your router shares it.

The private address is the one your router gave each device on your home network. These come from ranges set aside for local networks in RFC 1918: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Homes all over the world use 192.168.1.x at the same time without conflict, because these addresses never appear on the public internet. When a device sends a request out, the router swaps its private address for the shared public one and keeps track of which reply belongs to which device. That translation is called NAT (network address translation).

So if your laptop's settings say 192.168.1.20 and a website says something else entirely, both are right: the laptop shows its private address, and the website sees the public one. Public vs private IP addresses covers the reserved ranges in depth.

With IPv6 there's usually no translation step: each device gets its own public IPv6 address, and the router's firewall decides what can reach it.

Why your IP address changes

Most home and mobile connections get a dynamic address. On home broadband, your router asks the ISP for an address when it connects, and the ISP lends one for a period of time, called a lease. The protocol for this on most broadband networks is DHCP (RFC 2131); some ISPs use PPPoE sessions instead, with the same effect. When the lease runs out, or the router reconnects after a power cut, it may get the same address back or a different one. How often that happens depends on the ISP, and some connections keep the same address for a long time.

Mobile carriers work differently: the network assigns your phone an address when it opens a data session, and a new session can bring a new address. For IPv6, devices usually build their own address from a prefix the network advertises (SLAAC, RFC 4862), or get one from a DHCPv6 server.

A static address is one the ISP reserves for your connection permanently. It's usually offered on business plans, often for a fee, for people who run servers or need other systems to recognize their address.

Your address also changes when you change networks. Your phone has one public address on home Wi-Fi and a completely different one on mobile data, because those are two different networks. A VPN or relay changes the address websites see, because they then see the VPN server's address instead of yours.

On IPv6, many devices also rotate their own addresses on purpose. Operating systems create temporary addresses that change regularly (RFC 8981), which makes it harder for sites to follow a device by its address over time.

What a website can see from your IP (and what it can't)

A site that looks up your address learns an approximate location (usually the right country, and a city that is often only nearby), the ISP or organization that runs the network, its ASN and the time zone. IP lookup shows the same fields for any address, and how accurate IP geolocation is explains why the city is often off.

The address doesn't give anyone your name, street address, phone number or email, and there's no public directory that maps IP addresses to people. Only the ISP that assigned the address can link it, at a given time, to a customer account, and ISPs normally hand that over only when the law requires it, for example under a court order. Your login, cookies and anything you type into a form identify you far more precisely. For more detail, see what someone can find out from your IP.

FAQ

Is my IP address the same on every device in my house?

The public IPv4 address usually is. Each device still has its own private address, and over IPv6 usually its own public address as well.

Can two people have the same IP address?

At the same moment, on the public internet, an address belongs to one connection, but that connection can be shared. Everyone in a household, an office or a café shares the public IPv4 address of that network, and some ISPs put many customers behind one address with carrier-grade NAT. Private addresses like 192.168.1.10 are reused in countless homes, which is fine because they never leave the local network.

Is it dangerous to share my IP address?

The risk is low. Someone who has it can find your approximate area and your ISP, which is roughly what every website you visit already sees. They can't get your name or home address from it. The more realistic risks are someone trying to connect to services you've exposed on your router, or flooding your connection with traffic, which is mostly a problem for people who stream or host games. Keep your router's firmware updated and don't open ports you don't need.

See your own address and what it reveals: what is my IP.

Look up an IP address now

Free IP lookup: location, network and bot flags, no account needed.