Your IP address is a number that identifies your device on the internet, similar to a mailing address for your computer

An Internet Protocol address, or IP address, is a string of numbers separated by periods — something like 192.168.1.5 or 2001:0db8:85a3:0000:0000:8a2e:0370:7334. Every device connected to the internet has one. Websites, email servers, and online services use your IP address to send data back to you. Without it, the internet would not know where to deliver the information you request.

Your device does not create or choose its IP address. Your internet service provider (ISP) assigns one to you, usually automatically. If you are at home on Wi-Fi, your router gets a public IP address from your ISP, and then your individual devices (phone, laptop, tablet) get private IP addresses from your router. When you visit a website, the website sees the public IP address of your router, not the private addresses of your individual devices.

There are two versions of IP addresses in use. IPv4 addresses look like 192.168.1.1 and use four numbers between 0 and 255. IPv6 addresses are longer and use letters and numbers, like 2001:0db8:85a3::8a2e:0370:7334. IPv6 was created because the world ran out of available IPv4 addresses. Most home internet still uses IPv4, but IPv6 is becoming more common.

Key Takeaways

  • Your IP address is assigned by your internet service provider and identifies your connection to the internet, similar to how a mailing address identifies your home.
  • Websites and online services see your public IP address when you visit them, which can reveal your approximate geographic location.
  • Your IP address changes when you restart your modem, switch networks, or use a VPN, but it does not change simply by closing your browser.
  • IP addresses are necessary for the internet to function, but you can hide yours using a VPN if you want to browse without revealing your location to websites.

How websites use your IP address

When you type a web address into your browser, your device sends a request to that website's server. The request includes your IP address so the server knows where to send the webpage back to. The website can then log your IP address in its records, along with the time you visited, what pages you looked at, and how long you stayed.

Websites use IP addresses for practical reasons: to detect fraud, to block users who are attacking their servers, to show you content in your language, and to comply with laws that require them to know where their traffic comes from. Some websites also use IP addresses to estimate your location — not your exact address, but your city or region. This is how a website can show you local news or local business listings without you telling it where you are.

Advertisers and data brokers also collect IP addresses. They use them to build profiles of your browsing habits and sell that information to other companies. This is one reason why ads seem to follow you across the internet.

The difference between public and private IP addresses

A public IP address is the one your ISP assigns to your home internet connection. It is visible to every website you visit. It is unique across the entire internet — no other home internet connection has the same public IP address at the same time. This is the address that websites see and log.

A private IP address is assigned by your router to each device on your home network. It looks similar to a public IP address but is only used within your home network. Your phone, laptop, and smart TV each have their own private IP address. These addresses are never sent to websites. Only your router's public IP address leaves your home.

This separation exists for security. Your individual devices are hidden behind your router. A website cannot directly contact your laptop or phone — it can only contact your router. Your router then decides whether to pass the data through to your devices.

When and why your IP address changes

Your ISP does not assign you a permanent IP address. Most home internet connections use dynamic IP addresses, which means your address changes periodically — usually when you restart your modem or after a set number of days. Some business internet connections use static IP addresses, which stay the same indefinitely, but this is rare for home users and usually costs extra.

Your IP address changes when you restart your modem, when your ISP's lease on your current address expires, or when you switch to a different internet connection entirely (such as moving to a new home or connecting to a coffee shop's Wi-Fi). Simply closing your browser or turning off your computer does not change your IP address. The address stays the same until your modem restarts or your lease expires.

If you use a VPN (virtual private network), your IP address appears to change to the location of the VPN server you connect to. A website will see the VPN server's IP address instead of your real one. This is the main reason people use VPNs — to hide their real location and ISP from websites.

How to find your own IP address

To find your public IP address, you can visit a website like whatismyipaddress.com or iplocation.net. These sites display your public IP address and your approximate location. You can also search "what is my IP" in any search engine and the result will appear at the top of the page.

To find your private IP address (the one your router assigned to your device), the steps differ by device. On Windows, open Command Prompt and type ipconfig, then look for "IPv4 Address" under your network connection. On Mac, go to System Preferences, click Network, select your connection, and look for "IP Address". On iPhone or iPad, go to Settings, tap Wi-Fi, tap the network you are connected to, and look for "IP Address". On Android, go to Settings, tap About Phone, then Status, and look for "IP Address".

What information can be learned from an IP address

An IP address reveals your approximate location — usually your city or region, sometimes more precisely depending on your ISP's network structure. It does not reveal your street address or exact coordinates. It also reveals your ISP's name, which can sometimes indicate your country or region if you are traveling.

An IP address does not reveal your name, phone number, email address, or browsing history on its own. However, if a website has your account information and logs your IP address, they can connect the two. Law enforcement can also subpoena your ISP to learn which customer was using a specific IP address at a specific time, but this requires a court order.

Scammers sometimes claim they have your IP address and use it to threaten you. This is a common scam. An IP address alone cannot be used to hack your device, steal your passwords, or access your files. It is not secret information — websites see it every time you visit.

IP addresses and privacy

Your IP address is logged by every website you visit. This is unavoidable — the internet cannot function without it. However, you can limit what websites learn about you by using a VPN, which masks your real IP address. You can also use privacy-focused browsers and browser extensions that block trackers, though these do not hide your IP address from the website itself.

Some websites allow you to browse without logging in, which means they cannot connect your IP address to your name or account. Other websites require you to create an account, which means they can link your IP address to your identity. Reading a website's privacy policy will tell you whether they log IP addresses and how long they keep that data.

If you are concerned about your IP address being visible, a VPN is the most direct solution. It replaces your real IP address with the VPN provider's address, so websites see the VPN's location instead of yours. Keep in mind that the VPN provider itself can see your real IP address, so choosing a reputable VPN service matters.

Frequently Asked Questions

Can someone hack me if they know my IP address?

No. An IP address alone cannot be used to hack your device, steal your passwords, or access your files. It is similar to knowing someone's mailing address — it does not give you access to their house. However, if someone knows your IP address and your device has other security vulnerabilities, they might be able to exploit those. Keeping your device's software updated is the best protection.

Why do websites need my IP address?

Websites need your IP address to send you the data you request. When you visit a website, your browser sends a request that includes your IP address so the server knows where to send the webpage back to. Without it, the internet could not deliver information to the right device.

Does restarting my computer change my IP address?

Restarting your computer does not change your IP address. You need to restart your modem (the device your ISP provided) to get a new IP address. Restarting your modem disconnects it from your ISP's network, and when it reconnects, it receives a new dynamic IP address.

Is my IP address the same on all devices at home?

Your public IP address is the same for all devices at home because they all connect through the same router. However, each device has its own private IP address assigned by your router. Websites see only the public IP address, which is shared by all your devices.

Can I get a permanent IP address?

Most home internet uses dynamic IP addresses that change periodically. You can request a static IP address from your ISP, but this usually costs extra money per month and is typically offered only to business customers. For most home users, a dynamic IP address is standard and sufficient.