Open Command Prompt and run ipconfig
The fastest way to find your IP address on Windows is to open Command Prompt and type a single command. Press the Windows key, type cmd, and press Enter. A black window will open — this is Command Prompt.
Type ipconfig and press Enter. Windows will display a list of all your network connections and their IP addresses. Look for the section labeled with your connection type — usually "Ethernet adapter" if you use a cable, or "Wireless LAN adapter" if you use WiFi.
Your IPv4 Address is the number you need in most cases. It looks like four groups of numbers separated by periods, such as 192.168.1.100. This is the address your device uses on your local network.
Key Takeaways
- Open Command Prompt by pressing Windows key, typing cmd, and pressing Enter.
- Type ipconfig and press Enter to see all your network addresses at once.
- Your IPv4 Address is the local network address you use most often — it appears under your active connection type.
- If you need your public IP address instead, use ipconfig /all or visit a public IP lookup website from your browser.
- The ipconfig command works the same way on all Windows versions from Windows 7 onward.
Understanding what ipconfig shows you
When you run ipconfig, Windows lists every network adapter on your computer, even ones you are not currently using. Each adapter shows several pieces of information. The IPv4 Address is what most programs and devices on your home or office network use to find you. The Subnet Mask tells your network which addresses belong to the same group as yours. The Default Gateway is usually your router — the device that connects you to the internet.
You will also see an IPv6 Address, which is a newer format that looks like letters and numbers separated by colons. Most home networks still use IPv4, so unless you have a specific reason to use IPv6, you can ignore it.
If you see multiple adapters listed, find the one that shows "Media State: Connected". That is your active connection. Disconnected adapters will show "Media State: Disconnected" and you can skip those.
Finding your public IP address from Command Prompt
The address ipconfig shows you is your local IP address — the one your router assigns to your computer. Your public IP address is different. It is the address the outside internet sees when you visit a website or send data out. You cannot see your public IP address using ipconfig alone, but you can see it with a modified command.
Type ipconfig /all and press Enter. This shows much more detail about each adapter. Scroll through the output and look for "DHCP Server" — this is usually your router. Your public IP address is not listed here either, but this command confirms your network is working correctly.
To find your actual public IP address, the easiest method is to open your web browser and search for "what is my IP". Any of the results will show you the address the internet sees. You can also visit websites like whatismyipaddress.com directly. This is faster and more reliable than trying to extract it from Command Prompt.
Saving your IP address information to a file
If you need to keep a record of your IP address or send it to someone else, you can save the ipconfig output to a text file. Type ipconfig > myip.txt and press Enter. Windows will create a file called myip.txt in your user folder containing all the information ipconfig displays.
You can also use ipconfig /all > myip.txt to save the detailed version. Open the file by typing notepad myip.txt and pressing Enter, or by opening File Explorer, navigating to your user folder, and double-clicking the file.
This method is useful when you need to troubleshoot network problems with your internet provider or IT support. You can send them the file, and they will see exactly what your network settings are.
Renewing or releasing your IP address
Sometimes your computer gets stuck with an old or incorrect IP address. You can force Windows to ask your router for a new one using Command Prompt. Type ipconfig /release and press Enter. This tells your router to take back your current address. Then type ipconfig /renew and press Enter. Your router will assign you a new address.
This process usually takes a few seconds. After you run both commands, type ipconfig again to confirm you have a new IPv4 Address. This fixes many network problems where your computer cannot reach the internet or other devices on your network.
You may see a brief moment where you lose internet connection while the renewal happens. This is normal and expected. If you are in the middle of something important, save your work before running these commands.
Troubleshooting when ipconfig does not show an address
If you run ipconfig and see "Media State: Disconnected" for all adapters, your computer is not connected to any network. Check that your WiFi is turned on, or that your ethernet cable is plugged in firmly on both ends — into your computer and into your router or wall jack.
If you see an address that starts with 169.254, your computer is not talking to your router correctly. This is an automatic address Windows assigns when it cannot reach a DHCP server. Unplug your router for 30 seconds, plug it back in, wait for it to fully restart, and run ipconfig /renew again.
If ipconfig itself does not work, make sure you opened Command Prompt correctly. Right-click the Command Prompt icon and select "Run as administrator" if you see a permission error. On some older Windows systems, you may need to use "ipconfig.exe" instead of just "ipconfig".
Frequently Asked Questions
What is the difference between IPv4 and IPv6?
IPv4 addresses use four groups of numbers (like 192.168.1.100) and are what most devices still use. IPv6 addresses use letters and numbers separated by colons and are the newer standard designed to handle more devices. Most home networks use IPv4, and you can ignore IPv6 unless your network specifically requires it.
Can I change my IP address using Command Prompt?
You can release and renew your IP address using ipconfig /release and ipconfig /renew, which asks your router for a new one. To set a permanent static IP address, you need to go into your network settings or your router's admin panel, not Command Prompt. Most home users do not need to do this.
Is my local IP address the same as my public IP address?
No. Your local IP address (what ipconfig shows) is only used on your home or office network. Your public IP address is what the internet sees and is different. You cannot find your public IP using ipconfig — search "what is my IP" in your browser instead.
Why does my IP address keep changing?
Most home routers assign addresses automatically using DHCP, which means your address can change when you restart your computer or router. If you need the same address every time, you can set a static IP in your network settings or reserve an address in your router's admin panel.
Do I need administrator rights to run ipconfig?
No. The basic ipconfig command works for any user. Some advanced commands like ipconfig /release and ipconfig /renew may require you to run Command Prompt as administrator, which you can do by right-clicking the Command Prompt icon and selecting "Run as administrator".