An IP address is a string of numbers separated by periods, and its length depends on which version you're using

An IP address (Internet Protocol address) is how your device identifies itself on a network so other devices can find and talk to it. Think of it like a mailing address for your computer. The length of that address — how many numbers it contains — depends on whether you're using the older IPv4 standard or the newer IPv6 standard.

IPv4 addresses are 32 bits long and always appear as four numbers separated by periods, like 192.168.1.1. Each of those four numbers can range from 0 to 255, which gives you a total of about 4.3 billion possible addresses. IPv6 addresses are 128 bits long and look much longer: they use hexadecimal notation (numbers 0–9 and letters A–F) arranged in eight groups of four characters each, like 2001:0db8:85a3:0000:0000:8a2e:0370:7334. That's roughly 340 undecillion possible addresses — far more than we'll ever need.

Key Takeaways

  • IPv4 addresses are always four numbers separated by periods, each number between 0 and 255.
  • IPv6 addresses are much longer, using eight groups of hexadecimal characters separated by colons.
  • Your device has both a public IP address (visible to the internet) and a private IP address (used only on your local network).
  • The internet is gradually shifting from IPv4 to IPv6 because we ran out of new IPv4 addresses to assign.

Why IPv4 addresses ran out and IPv6 exists

When the internet was young, nobody imagined we'd need billions of addresses. IPv4's 4.3 billion possible addresses seemed like plenty. But as smartphones, tablets, smart home devices, and cloud services multiplied, we started running out. Internet registries stopped handing out new IPv4 addresses around 2011.

IPv6 was designed to solve this problem with vastly more addresses. However, switching the entire internet over takes time. Many networks still run on IPv4, and most devices support both standards. Your internet service provider may assign you an IPv4 address, an IPv6 address, or both, depending on their infrastructure and your location.

Public versus private IP addresses

Your device actually has two IP addresses: a public one and a private one. Your public IP address is what the wider internet sees when you visit a website or send data outside your home or office network. Your internet service provider assigns this to you, and it's visible to websites you visit (though they usually see it only as a general location, not your exact address).

Your private IP address is used only within your local network — your home WiFi, your office network, or a coffee shop's guest network. It's assigned by your router and follows a specific range: typically something like 192.168.x.x or 10.x.x.x. Devices on the same network use private addresses to talk to each other. When you send data to the internet, your router translates your private address into your public one, a process called Network Address Translation (NAT).

How to find your IP address

Finding your public IP address is straightforward. On Windows, open Command Prompt and type ipconfig, then look for "IPv4 Address" under your active connection. On Mac or Linux, open Terminal and type ifconfig or ip addr. You can also visit any website that displays your IP — search "what is my IP" in any browser and you'll see your public address in the results.

To find your private IP address on Windows, use the same ipconfig command. On Mac, go to System Preferences, click Network, select your connection, and look for "IPv4 Address". On Linux, use ifconfig or ip addr. Your router's admin page also lists all devices on your network and their private addresses — usually accessible by typing your router's IP (often 192.168.1.1 or 192.168.0.1) into a browser.

What those numbers and letters actually mean

In an IPv4 address like 192.168.1.100, each number represents part of the address structure. The first one or two numbers identify the network class and the organization. The middle numbers narrow it down to a specific network. The last number identifies your individual device on that network. This structure lets routers quickly figure out where to send your data.

IPv6 addresses use hexadecimal (base-16) instead of decimal (base-10), which is why you see letters mixed in. The first half of an IPv6 address identifies the network, and the second half identifies your device. IPv6 also allows for address compression — you can drop leading zeros and replace consecutive groups of zeros with a double colon (::), so 2001:0db8:0000:0000:0000:0000:0000:0001 becomes 2001:db8::1. This makes long addresses slightly easier to read and type.

Why IP address length matters for your privacy and security

Your public IP address can reveal your approximate location to websites you visit — usually your city or region, not your street address. Websites log your IP when you visit, which is how they build profiles of your browsing. If you want to hide your IP address, you can use a VPN (Virtual Private Network), which routes your traffic through another server and shows websites that server's IP instead of yours.

Your private IP address is only visible to devices on your local network, so it's less of a privacy concern. However, if someone gains access to your network, they can see it. Using a strong WiFi password and keeping your router's firmware updated reduces this risk. Understanding that you have both addresses helps you make better choices about which tools to use when privacy matters to you.

Frequently Asked Questions

Can I change my IP address?

Your public IP address is assigned by your internet service provider and changes periodically on its own — usually every few days to months. You can force a change by unplugging your modem for a few minutes, though the new address is still assigned by your provider. Your private IP address is assigned by your router and can be changed through the router's settings, but most people leave it alone since it only matters on your local network.

Why do some IP addresses start with 127 or 10?

These are reserved ranges. 127.0.0.1 is your computer talking to itself (called localhost). Addresses starting with 10, 172.16–172.31, or 192.168 are private ranges that never appear on the public internet — any device can use them on its own network without conflict. This is why your home router can assign 192.168.1.x addresses to all your devices without those addresses conflicting with anyone else's.

Do I need to know my IP address for anything?

Most of the time, no. Your device handles IP addresses automatically. You might need to know your private IP if you're setting up a printer on your home network or accessing your router's settings. You might need your public IP if you're troubleshooting a connection issue with your internet provider or if a website is blocking you and you want to see what address they're seeing.

Is IPv6 more find than IPv4?

IPv6 was designed with security in mind and includes built-in encryption features that IPv4 lacks. However, security depends more on how your network is configured and what software you're running than on the IP version itself. Both can be find or insecure depending on the circumstances. The main advantage of IPv6 is that it solves the address shortage, not that it's inherently safer.