Open Command Prompt and run a single command to see your IP address

The fastest way to find your IP address is to open Command Prompt on Windows and type ipconfig, then press Enter. The screen will show a list of network adapters. Look for the one labeled "Ethernet adapter" or "Wireless LAN adapter" depending on how you connect to the internet. Next to "IPv4 Address" you will see a number like 192.168.1.5 or 10.0.0.15 — that is your local IP address, the one your computer uses on your home or office network.

If you want to see your public IP address instead — the one websites and services see when you connect to them — type curl ifconfig.me in Command Prompt and press Enter. This shows the IP address assigned to you by your internet service provider. The public address is what appears in your router's logs and what your ISP uses to identify your connection.

Key Takeaways

  • Type ipconfig in Command Prompt to see your local IP address, which is the address your computer uses on your home network.
  • Your local IP address usually starts with 192.168 or 10.0 and changes only when you restart your router or your computer gets a new lease from it.
  • Type curl ifconfig.me to see your public IP address, which is what websites see when you visit them.
  • Command Prompt is built into Windows and requires no installation or special permissions to open.

How to open Command Prompt on Windows

Press the Windows key on your keyboard, type cmd, and press Enter. A black window will open with a blinking cursor. This is Command Prompt. You can also right-click on the Start button and select "Terminal" or "Command Prompt" from the menu, depending on your Windows version.

If you are using Windows 11, you may see "Windows Terminal" instead of Command Prompt. Windows Terminal works the same way — type the commands below and they will produce the same results. Both are built into Windows and do not require you to download anything.

Understanding the ipconfig output

When you type ipconfig and press Enter, you will see several sections. Each section represents a network adapter — a piece of hardware or software that connects your computer to a network. Most computers have at least two: one for wired (Ethernet) and one for wireless (Wi-Fi).

Look for the adapter you are actually using. If you are connected by cable, find "Ethernet adapter". If you are on Wi-Fi, find "Wireless LAN adapter" or "Wi-Fi". Under that section, the line that says "IPv4 Address" shows your local IP address. This is the address your router assigned to your computer. It stays the same until your router restarts or your computer's lease expires, which usually takes days or weeks.

You will also see a "Default Gateway" line — that is your router's IP address, usually something like 192.168.1.1. If you ever need to log into your router to change settings, you type this address into a web browser.

Finding your public IP address from Command Prompt

Your public IP address is different from your local one. It is assigned by your internet service provider and is what the outside world sees when you visit a website or use an online service. To see it in Command Prompt, type curl ifconfig.me and press Enter.

The command will return a single line with an IP address — something like 203.45.67.89. This is your public IP. It may look different from your local IP because your router translates between the two. Your router has its own public IP (assigned by your ISP) and gives each device on your network a local IP. When you send data out to the internet, your router replaces your local IP with its public IP so websites know where to send the response back.

If the curl command does not work, your version of Windows may not have it installed. Try nslookup myip.opendns.com resolver1.opendns.com instead. This uses a different method to find your public IP but produces the same result.

Why you might need to know your IP address

Your local IP address is useful if you are setting up a printer, security camera, or other device on your home network. You may need to type your computer's local IP into a web browser to access settings or files. It is also helpful if you are troubleshooting network problems — your IT support person might ask for it to see if your computer is properly connected.

Your public IP address matters if you are concerned about privacy or if you need to whitelist your connection for security reasons. Some services block traffic from certain IP ranges, and knowing your public IP tells you whether you are in a blocked range. It is also the address that appears in website logs, so it is the one associated with your browsing activity from the perspective of websites and services.

What to do if ipconfig shows multiple adapters

If you see several adapters listed, do not worry. Most computers have adapters you are not using. Look for the one that is actually connected. An active adapter will have an "IPv4 Address" line with a real number. An inactive adapter might show "Media State: Media disconnected" or have no IPv4 Address listed at all.

If you are on Wi-Fi, ignore the Ethernet adapter section. If you are plugged in with a cable, ignore the wireless adapter. You only need the IP address of the adapter you are actually using. If both are active and you are not sure which one is carrying your traffic, your router's settings page (accessed through the Default Gateway address) will show you which devices are connected and which adapter they are using.

Frequently Asked Questions

Will my IP address change if I restart my computer?

Your local IP address usually stays the same after a restart because your router remembers which address it gave you. Your public IP address may change if your internet service provider reassigns it, but this is not may provide. Some ISPs keep the same public IP for months or years; others change it weekly. If you need a stable public IP, contact your ISP about a static IP option.

Is it safe to share my IP address?

Sharing your local IP address is safe — it only works on your home network and is useless to someone outside it. Your public IP address is less sensitive than a password, but it does reveal your general location and ISP. Avoid posting it publicly, but it is fine to share it with someone who needs to troubleshoot your connection or set up a service that requires it.

What if ipconfig does not show an IP address?

If the IPv4 Address line is blank or missing, your computer is not connected to the network. Check that your Wi-Fi is turned on or your cable is plugged in. If it is, restart your router by unplugging it for 30 seconds, then plugging it back in. Wait a minute for it to restart, then run ipconfig again.

Can I change my IP address from Command Prompt?

You can change your local IP address through Command Prompt using advanced commands, but it is not recommended unless you know what you are doing. It is safer to change it through your router's settings page or through Windows Settings under Network. If you want a different public IP, restart your modem or contact your ISP to request a new one.