Open Command Prompt and run ipconfig

The fastest way to find your IP address is to open Command Prompt and type a single command. On Windows, press the Windows key, type cmd, and press Enter. A black window will open.

Type ipconfig and press Enter. Command Prompt will display a list of network adapters and their settings. Look for the line labeled IPv4 Address — that is your local IP address, the one your computer uses on your home or office network. It usually starts with 192.168 or 10.0.

If you see multiple network adapters listed (for example, Ethernet and Wi-Fi), find the one you are actually using. If you are connected by cable, look under the Ethernet adapter. If you are on Wi-Fi, look under the wireless adapter.

Key Takeaways

  • Type ipconfig in Command Prompt to see your local IP address, which appears next to "IPv4 Address".
  • Your local IP address (usually starting with 192.168 or 10.0) is what your device uses on your home or office network.
  • If you have multiple network adapters, check the one matching how you are connected — Ethernet for cable, wireless for Wi-Fi.
  • To find your public IP address instead, type ipconfig /all and look for "Default Gateway", or use an online tool.

Find your public IP address with ipconfig /all

Your public IP address is different from your local one. It is the address your internet service provider assigns to your home or office, and it is what websites see when you visit them. Command Prompt can show you clues about it, though not the address itself directly.

Type ipconfig /all and press Enter. This shows more detail about each network adapter. Look for the line labeled Default Gateway — this is your router's address. Your public IP is assigned to your router by your internet service provider, not to your computer directly.

To see your actual public IP address, you will need to check it through a website or a different method, because Command Prompt only shows addresses on your local network. Many websites display your public IP if you search "what is my IP" in a browser.

Understand the difference between IPv4 and IPv6

When you run ipconfig, you may see two different addresses listed: IPv4 Address and IPv6 Address. Both are valid addresses for your computer, but they work differently.

IPv4 is the older standard and looks like four numbers separated by periods: 192.168.1.5. Most home networks and websites still use IPv4 as the main address. IPv6 is the newer standard and looks like a longer string of letters and numbers: 2001:0db8:85a3:0000:0000:8a2e:0370:7334. IPv6 is becoming more common, but many networks do not use it yet.

For most purposes, you only need to know your IPv4 address. If a device or service asks for your IP address and does not specify which type, IPv4 is almost always the one they want.

Save your IP address to a file

If you need to keep a record of your IP address or share it with someone else, you can save the output of ipconfig to a text file. Type ipconfig > myip.txt and press Enter. Command Prompt will create a file called myip.txt in your user folder containing all the network information.

You can also save the full details by typing ipconfig /all > myip.txt. Open the file with Notepad or any text editor to read it. This is useful if you need to troubleshoot network problems with your internet service provider or a tech support person, because they can see exactly what your system reports.

Use ipconfig /release and /renew to reset your IP

Sometimes your computer's connection to your router gets stuck or confused. You can reset it by releasing your current IP address and asking for a new one. Type ipconfig /release and press Enter, then type ipconfig /renew and press Enter.

This tells your router to forget your computer's current address and assign a new one. Your local IP address will likely change after you do this. Run ipconfig again to see your new address. This step is often the first thing to try if your internet is slow or you cannot reach certain devices on your network.

Troubleshoot if ipconfig shows no IP address

If you run ipconfig and the IPv4 Address line is blank or shows 169.254.x.x, your computer is not connected to your network properly. This usually means your network adapter is not talking to your router.

First, check that your cable is plugged in (if using Ethernet) or that you are connected to your Wi-Fi network. Then restart your router by unplugging it for 30 seconds and plugging it back in. Wait a minute for it to fully start, then run ipconfig /renew to ask for a new address. If the problem continues, your network adapter driver may need updating, or your router may need a restart or reset.

Frequently Asked Questions

What is the difference between my local IP and my public IP?

Your local IP is used only on your home or office network and lets your computer talk to your router and other devices nearby. Your public IP is assigned by your internet service provider and is what the outside internet sees. Websites record your public IP, not your local one.

Why does my IP address keep changing?

Most home networks use DHCP, which means your router assigns a new local IP address each time you connect or restart. Your public IP can also change if your internet service provider reassigns it, though this usually happens less often. If you need a stable address, you can set a static IP in your router settings.

Can I find someone else's IP address using Command Prompt?

Command Prompt shows only your own computer's addresses on your local network. To find another person's IP, you would need access to your router's settings or network management tools. You cannot find someone's public IP through Command Prompt alone.

Is my IP address the same as my MAC address?

No. Your IP address is a number your router assigns so devices can find each other on the network. Your MAC address is a permanent identifier built into your network adapter. Run ipconfig /all to see both — MAC address appears as "Physical Address".