Yes, you can find your IP address in Windows using just the Command Prompt—no third-party tools required. Open Command Prompt and type ipconfig, then press Enter. Your IPv4 address will appear next to "IPv4 Address" under your active network adapter (usually Ethernet or Wi-Fi). For a quicker check, use ping google.com | find "Reply" to see your public IP. For the full guide, including how to distinguish between local and public IPs, follow the steps below.

What You'll Need

  • A Windows PC (Windows 10 or 11).
  • Administrator privileges (not always required, but some commands may prompt for them).
  • An active internet connection (for checking public IP) or a local network (for local IP).
  • Basic familiarity with the Command Prompt (though no prior experience is needed).

Step-by-Step

  1. Open Command Prompt:
    1. Press the Windows key + R to open the Run dialog.
    2. Type cmd and press Enter. Alternatively, search for "Command Prompt" in the Start menu and open it.

    Note: Menu labels may vary slightly depending on your Windows version or region.

  2. Find your local IPv4 address:
    1. In the Command Prompt window, type ipconfig and press Enter.
    2. Look for the section labeled with your active network adapter (e.g., "Wi-Fi" or "Ethernet").
    3. Under that section, locate the line that says IPv4 Address. The value next to it (e.g., 192.168.1.100) is your local IP address.
    4. (Optional) To see detailed information about your default gateway (router), DNS servers, and MAC address, look for the Default Gateway and DNS Servers lines.

    Example output:

                    Wi-Fi adapter Wi-Fi:
    
                       Connection-specific DNS Suffix  . :
                       IPv4 Address. . . . . . . . . . . : 192.168.1.100
                       Subnet Mask . . . . . . . . . . . : 255.255.255.0
                       Default Gateway . . . . . . . . . : 192.168.1.1
                

  3. Find your public IP address (external IP):
    1. Type the following command in Command Prompt and press Enter: ping google.com | find "Reply"

      This command sends a ping to Google's servers and extracts the IP address from the reply.

    2. The output will look like this:
                          Reply from 142.250.190.46: bytes=32 time=12ms TTL=118
                      
      The IP address after "Reply from" (e.g., 142.250.190.46) is your public IP.
    3. (Alternative) For a simpler method, type nslookup myip.opendns.com resolver1.opendns.com and press Enter. The output will show your public IP under the "Address:" line.
  4. Distinguish between local and public IP:
    1. A local IP address (e.g., 192.168.x.x) is assigned by your router and is only visible on your home/office network.
    2. A public IP address (e.g., 142.250.x.x) is your unique address on the internet, assigned by your ISP.
    3. Your local IP changes only if you disconnect/reconnect from the network or if your router reassigns it. Your public IP may change if your ISP dynamically assigns it (common with most home connections).

Common Mistakes

  1. Assuming the first IPv4 address is the correct one:

    Your Command Prompt output may list multiple IPv4 addresses (e.g., for VPNs, virtual adapters, or secondary connections). Always check the adapter name (e.g., "Wi-Fi" or "Ethernet") to ensure you're looking at the right one.

  2. Ignoring the adapter type:

    If you're on a VPN or have multiple network connections, the ipconfig output will show all of them. Focus on the adapter you're actively using (e.g., Wi-Fi for laptops, Ethernet for desktops).

  3. Misinterpreting the public IP command:

    The ping google.com | find "Reply" command relies on Google's servers being reachable. If you're offline or your ISP blocks pings, this won't work. In that case, use nslookup myip.opendns.com resolver1.opendns.com as an alternative.

  4. Not checking for typos:

    Commands like ipconfig are case-sensitive. Typing Ipconfig (with a capital "I") will trigger an error. Always double-check your spelling.

Tips

  1. Save time with aliases:

    If you frequently check your IP, create a shortcut in Command Prompt by typing alias ipcheck="ipconfig && ping google.com | find "Reply" && nslookup myip.opendns.com resolver1.opendns.com" (Note: Aliases in Windows Command Prompt are not permanent by default; you'd need a batch script for this).

  2. Use PowerShell for a cleaner output:

    If you prefer PowerShell, run Get-NetIPAddress | Where-Object InterfaceAlias -eq "Wi-Fi" | Select-Object IPAddress to filter for your Wi-Fi adapter specifically.

  3. Check for multiple adapters:

    If you have a VPN or virtual machine running, your ipconfig output may include additional adapters. Ignore these unless you're troubleshooting them.

  4. Note your subnet mask:

    The Subnet Mask value (e.g., 255.255.255.0) is important for network configuration. It defines the range of your local network.

  5. Clear the command history:

    After checking your IP, you can clear the Command Prompt history by typing cls (clear screen) or exit to close the window.

Troubleshooting

If your IP address isn't displaying correctly or the commands aren't working, try these steps:

  1. Restart your network adapter:
    1. Press Windows + S, type Device Manager, and open it.
    2. Expand the Network adapters section.
    3. Right-click your active adapter (e.g., Wi-Fi or Ethernet) and select Disable device. Wait 10 seconds, then right-click again and choose Enable device.
    4. Re-run ipconfig in Command Prompt to see if the IP address updates.
  2. Release and renew your IP:
    1. In Command Prompt, type netsh interface ip reset and press Enter. This resets the TCP/IP stack.
    2. Then type netsh winsock reset and press Enter.
    3. Restart your PC and check your IP again.
  3. Check for VPN or proxy interference:
    1. If you're using a VPN or proxy, your local IP may appear different from your public IP. Disable the VPN/proxy temporarily and re-check.
  4. Verify internet connectivity:
    1. If you can't ping any external sites (e.g., Google), your public IP won't appear. Test connectivity with ping 8.8.8.8. If this fails, your internet connection may be down.
  5. Update your network drivers:
    1. Outdated or corrupted network drivers can cause ipconfig to fail. Update them via Device Manager (right-click your adapter > Update driver).
  6. Run Command Prompt as Administrator:
    1. Right-click Command Prompt and select Run as administrator if you encounter permission errors.

If That Did Not Work

If none of the above steps resolve the issue, your system may have deeper network configuration problems. In that case:

  1. Check your router's admin panel (usually 192.168.1.1 or 192.168.0.1) to manually assign a static IP or verify network settings.
  2. Contact your ISP to confirm your public IP assignment method (static vs. dynamic).
  3. As a last resort, reset your router to factory settings (this will disconnect all devices and require reconfiguration).

Frequently Asked Questions

What's the difference between a local IP and a public IP?

A local IP (e.g., 192.168.1.100) is assigned by your router and is only used within your home/office network. A public IP (e.g., 142.250.190.46) is your address on the internet, assigned by your ISP. Your router uses NAT (Network Address Translation) to share your public IP among all devices on your local network.

Why does my public IP change?

Most home internet connections use dynamic public IP addressing, meaning your ISP assigns a new public IP periodically (often daily or weekly). This is normal and not a sign of a problem. If you need a static public IP (e.g., for hosting a server), you'll need to contact your ISP to configure it.

How do I check my IP without Command Prompt?

You can check your local IP by:

  1. Clicking the Wi-Fi/Ethernet icon in the taskbar, then selecting the Wi-Fi settings (Windows 10/11). Your local IP will appear under the network name.
  2. Using online tools like whatismyip.com to check your public IP in a web browser.
  3. Checking your router's admin panel (e.g., 192.168.1.1) for connected devices and their local IPs.

What if my local IP isn't showing in ipconfig?

If ipconfig doesn't display an IPv4 address, it could mean:

  1. Your adapter isn't connected to a network.
  2. Your DHCP client isn't receiving an address (check your router settings).
  3. There's a network driver issue (update or reinstall the driver).

Run ipconfig /release and ipconfig /renew to force a DHCP lease refresh. If the problem persists, your router may be misconfigured.

Is there a way to find my IP without internet access?

No, you can only find your public IP when connected to the internet. However, you can still find your local IP even without internet access using:

  1. ipconfig in Command Prompt (as shown above).
  2. Checking your router's admin panel (if you're connected to it).
  3. Using the Settings app (Windows 10/11): Go to Settings > Network & Internet > Wi-Fi/Ethernet to see your local IP.

Why does my IP address have numbers like 169.254.x.x?

An IP address in the range 169.254.x.x indicates your device is using APIPA (Automatic Private IP Addressing), which happens when:

  1. Your device fails to obtain an IP from the DHCP server (router).
  2. Your network cable is unplugged (for wired connections).
  3. Your Wi-Fi is connected but not to a router (e.g., direct peer-to-peer connection).

To fix this, ensure your device is properly connected to a router and that the router's DHCP server is enabled. Run ipconfig /release and ipconfig /renew in Command Prompt to force a new DHCP lease.