logo
GeekFormat

What Is My IP?

Core Resultdetected
publicIPv4
Current Public IP
216.73.216.82
Request Chain Analysis1
1
216.73.216.82
Technical Details (Collapsible)
Collapsed by default to avoid reading noise.

Free online tool to view your current public IP address. Automatically detects IPv4/IPv6, geolocation, ISP ASN, and HTTP request headers on page load. Also provides command-line query methods via curl, PowerShell, Python, and more — perfect for server whitelist configuration, proxy/VPN troubleshooting, remote connection verification, and network diagnostics. Ready to use instantly with no installation required.

Related

Use Cases

  • Confirm your current egress IP address before configuring server whitelists, database access permissions, or third-party API authorizations
  • Troubleshoot egress IP changes caused by proxies, VPNs, or CDNs and verify that proxy services are actually working
  • Confirm the public IP address of your current network environment before remote desktop, SSH, or database connections
  • Check whether your network supports IPv6 dual-stack access and see which protocol version your connection prefers
  • Website administrators can compare IP addresses in access logs against their actual egress IP to troubleshoot logging issues
  • Confirm client IP addresses that need to be allowed when configuring firewall rules or cloud server security group policies
  • Diagnose network issues such as IP hijacking, carrier-grade NAT, or routing anomalies
  • Quickly verify whether your egress IP has changed after switching Wi-Fi, mobile data, or VPN nodes
  • Quickly obtain your public IP via curl and other commands in CLI/script environments for automation scripts and CI/CD pipelines

Features

  • Dual mode with Server-Side Rendering (SSR) + client-side refresh — see your public IP as soon as the page HTML loads, no need to wait for JS execution
  • Automatically detects and displays both IPv4 and IPv6 dual-stack addresses, with support for Happy Eyeballs dual-stack environments
  • Smart IP classification labels: automatically identifies public, private, loopback, CGNAT, link-local, and other address types
  • Displays IP geolocation information: country, region/state, city, ISP/ASN number
  • Complete request chain visualization: parses X-Forwarded-For, X-Real-IP, CF-Connecting-IP, True-Client-IP and other proxy headers to display the full IP chain
  • Browser network status detection: online status, network connection type (WiFi/4G/5G), estimated download speed, platform, and language
  • One-click expansion of technical details: displays complete HTTP request header details (User-Agent, Accept-Language, various proxy headers)
  • One-click copying of IP address and full request chain for easy server whitelist configuration, firewall rule setup, and technical support communication
  • Provides curl/PowerShell/Python and other command-line query code examples suitable for scripting and CI/CD environments
  • Compatible with real IP identification across various reverse proxy and CDN architectures including Cloudflare, Nginx, HAProxy, and AWS ALB
  • Includes reference materials such as private IP address range tables and curl public IP service comparison tables, all server-side rendered for better SEO

How to Use

  1. Open this page in your browser — your public IP address is obtained during server-side rendering and displayed immediately upon page load
  2. View the large-font IP address at the top, labeled with its IP version (IPv4/IPv6) and classification (public/private/loopback, etc.)
  3. Check the geolocation section for the IP's corresponding country, region, city, and ISP ASN information
  4. View the request chain section to see candidate IPs after proxy/CDN/load balancer forwarding and understand the full request path
  5. Check the browser network section for your current network status, connection type, estimated download speed, and platform language
  6. Expand technical details to view complete HTTP request headers: X-Forwarded-For, X-Real-IP, CF-Connecting-IP, User-Agent, and more
  7. Click the refresh button to re-detect your IP address — it's recommended to refresh after switching networks to confirm the latest result
  8. Click the copy button to instantly copy the IP address or full request chain for easy pasting into whitelist configurations or technical documentation

FAQ

How do I check my current public IP address?

The easiest way is to open this page — your IP address is automatically parsed from HTTP request headers during server-side rendering and displayed upon page load. If you're in a CLI/server environment, you can quickly get it using curl: curl -s ifconfig.me or curl -s ipinfo.io. Windows users can run (Invoke-WebRequest -Uri "ifconfig.me" -UseBasicParsing).Content in PowerShell.

IP Geolocation Lookup

Why does the displayed IP differ from my local IP?

Because this page shows your public egress IP, while the IP configured on your computer's network adapter is typically a LAN private address (e.g., 192.168.x.x, 10.x.x.x). When you access the internet through a router, the router uses NAT (Network Address Translation) to convert internal private IPs to public IPs — servers on the internet see the translated public IP, not your device's LAN IP. If you use a VPN or proxy, the displayed IP will be the VPN/proxy server's egress IP.

What is NAT?

Can an IP address reveal my exact location/home address?

No. IP geolocation can only roughly infer location at the country, region, and city level, at most pinpointing a carrier's access point (BRAS device location). It cannot pinpoint a street, neighborhood, building number, or specific room. IP addresses do not contain personal identity information such as your name, phone number, or ID number. Specific user identity information can only be provided by ISPs when cooperating with law enforcement, and requires precise timestamps and log records. An IP address alone cannot reveal personal identity or an exact address.

Can someone hack my computer just by knowing my IP address?

Merely knowing an IP address is insufficient to hack your computer. Modern operating systems (Windows/macOS/Linux) have built-in firewalls that block unsolicited inbound connections by default; home routers also have NAT firewalls that prevent external access to internal network devices. To successfully compromise a system, attackers typically also need: known vulnerabilities in system/software, you actively clicking malicious links or running malware, or weakly password-protected services exposed to the internet (e.g., ports 3389, 22). Keeping your system updated, not downloading software from untrusted sources, and using strong passwords will ensure basic security.

Port Checker Tool

Why does my IP change when I switch networks/VPN?

After changing Wi-Fi networks, switching mobile data, or connecting to different VPN nodes or proxy servers, your internet egress point changes, and your public IP changes accordingly. Most home broadband connections use dynamic IP assignment (DHCP), and IPs may also change after rebooting the optical modem or router. A small number of enterprise broadband or cloud servers use static IPs (fixed IPs) that do not change with network reboots. Before configuring server whitelists or firewall rules, we recommend re-opening this page in the new network environment to confirm your current IP.

What's the difference between IPv4 and IPv6? Why do we need IPv6?

IPv4 uses 32-bit addresses with approximately 4.3 billion total addresses, which were officially exhausted in 2019. IPv6 uses 128-bit addresses, providing approximately 3.4×10³⁸ addresses (enough to assign an IP to every grain of sand on Earth), thoroughly solving the address exhaustion problem. IPv6 also offers more efficient routing structures, built-in IPSec encryption, better QoS support, Stateless Address Autoconfiguration (SLAAC), and eliminates NAT to enable true end-to-end communication. Major domestic ISPs have largely completed IPv6 deployment, and an increasing number of websites support IPv6 dual-stack access.

IPv4 Format Converter

What's the difference between public and private IPs? How do I tell them apart?

A public IP is a globally unique routable address assigned by an ISP that can be accessed directly on the internet. A private IP is an address reserved by IANA for internal LAN use that can be reused across different LANs, cannot be routed directly on the public internet, and requires NAT translation for internet access. Private IP ranges include: 10.0.0.0/8 (starts with 10), 172.16.0.0/12 (starts with 172.16–31), 192.168.0.0/16 (starts with 192.168), 100.64.0.0/10 (carrier CGNAT), and 127.0.0.0/8 (loopback). This tool automatically displays IP classification labels (public/private/loopback, etc.).

Private Address Range Table

Why is IP geolocation inaccurate/showing a different city?

Common reasons for IP geolocation inaccuracy include: 1) Using a VPN/proxy, which shows the proxy node location; 2) ISPs using provincial unified egress points rather than local city-level egress (especially common on mobile networks); 3) IP ranges recently reallocated but GeoIP databases not yet updated; 4) ISPs using CGNAT (Carrier-Grade NAT) where multiple users share an egress IP; 5) Enterprise lines using headquarters registered addresses rather than actual branch locations. City-level accuracy of IP geolocation databases is approximately 80–90%, with lower accuracy at district/county level.

What are 192.168.1.1, 127.0.0.1, and localhost?

192.168.1.1 is the most common Class C private IP address, typically used as the default admin panel address for home routers — visit http://192.168.1.1 in a browser to access the router settings interface. 127.0.0.1 is the IPv4 loopback address, and localhost is its hostname, always pointing to your own device. Accessing localhost does not go through the network adapter and is mainly used for local service development and testing (e.g., accessing a local dev server at http://localhost:3000). If you cannot ping 127.0.0.1, there is a fault in your local TCP/IP protocol stack.

Loopback Details

What's the difference between static and dynamic IPs? Which is better?

A static IP is a fixed public IP that does not change even when you reboot your router or reconnect to the network. It usually requires an additional fee from your ISP and is suitable for scenarios requiring externally accessible services (such as enterprise web servers, VPN gateways, remote video surveillance access, self-hosted game servers, etc.). A dynamic IP is dynamically assigned by an ISP via DHCP and may change with each connection. Ordinary home broadband defaults to dynamic IPs — the advantages are no extra cost and flexible address resource management by ISPs. Regular users do not need a static IP for browsing the internet.

What is X-Forwarded-For? Why do I see multiple IPs?

X-Forwarded-For (XFF for short) is a standard HTTP request header used to record each layer of IP addresses as a request passes through proxy/CDN/load balancer chains, formatted as a comma-separated IP list. The leftmost IP is the original client's real IP, followed by each proxy IP in sequence. For example: `X-Forwarded-For: userIP, cdnNodeIP, loadBalancerIP`. This tool's "Request Chain" section displays all candidate IPs in full to help you troubleshoot proxy configuration issues. Similar headers include X-Real-IP (Nginx) and CF-Connecting-IP (Cloudflare).

HTTP Headers CheckerGlossary: X-Forwarded-For

How can I hide or change my public IP?

Common methods include: 1) Using a VPN service, where traffic is forwarded through a VPN server and the target website sees the VPN server's IP; 2) Using an HTTP/SOCKS5 proxy server; 3) Using the Tor anonymity network; 4) Connecting to public Wi-Fi (using a different network egress). These methods can change your displayed public IP and provide a degree of privacy protection. Please note: when using VPNs/proxies, you should comply with local laws and regulations and not use them for illegal activities.

What is CGNAT (Carrier-Grade NAT)? Why can't I do port forwarding?

CGNAT (Carrier-Grade NAT, RFC 6598) is NAT deployed by ISPs at the backbone level to mitigate IPv4 address exhaustion, where multiple users (typically dozens to hundreds) share a single public IP. The telltale sign is that the IP obtained on the router's WAN port is in the 100.64.x.x–100.127.x.x range (belonging to the 100.64.0.0/10 reserved range). In a CGNAT environment, users cannot directly access internal network devices from the internet, and port mapping, P2P downloads, remote desktop, game server hosting, and similar features are restricted. Solutions include requesting a public IP or upgrading to IPv6.

Why do I see both IPv4 and IPv6? Which one is actually being used?

If your network environment is assigned both IPv4 and IPv6 addresses (dual-stack network), the operating system and browser automatically select the preferred protocol based on network conditions. Modern browsers typically use the Happy Eyeballs algorithm (RFC 8305), attempting both IPv4 and IPv6 connections simultaneously and using whichever responds first. When you visit this tool, whichever IP version is displayed indicates which protocol your current connection is preferring. Use curl -4 or curl -6 to force a specific protocol version for testing.

Which IP should I use when configuring server/firewall whitelists?

When configuring whitelists, you should use the primary IP address displayed in large font at the top of this tool (i.e., the public IP labeled with the classification tag 'public'). Recommendations: 1) Refresh this page before configuring to confirm your IP; 2) If your network has multi-line egress (telecom/unicom/mobile), obtain and add the corresponding IP under each line separately; 3) Note that home broadband IPs may change — apply for a static IP or use dynamic DNS (DDNS) if necessary; 4) If using a VPN/proxy, make sure to obtain the IP from your actual office network environment.

What are the risks if my IP address is exposed? Should I be worried?

When browsing websites normally, web servers necessarily see your public IP (otherwise they couldn't return data to you) — this is how the HTTP protocol works, and there is no such thing as a "leak." An IP address itself is not sensitive information, and ordinary users do not need to worry excessively. Potential risks include: 1) DDoS attacks (targeted at gamers/service operators); 2) IP bans (being mistakenly banned from forums/games affecting other users on the same IP); 3) Rough geographic location inference. Regular internet users browsing normally do not need to hide their IP; those engaged in sensitive activities should use a trusted VPN.

What services are commonly used to check public IP from the command line?

Common public IP query API services include: ifconfig.me (the most classic, supporting plain text/JSON), ipinfo.io (returns the richest JSON information including geolocation/ASN), icanhazip.com (operated by Cloudflare, minimal output), api.ipify.org (open source, stable), ifconfig.co (fast), ident.me, and more. All of these services can be called directly via curl and are suitable for use in shell scripts, CI/CD pipelines, and server initialization. See the Code Examples section of this page for specific usage.

Why can I ping 127.0.0.1 but can't access the internet?

Pinging 127.0.0.1 tests whether your local TCP/IP protocol stack is working correctly — it only confirms that your computer's network components are not damaged, not that you can access the external network. Possible reasons for not being able to access the internet include: 1) Ethernet cable/Wi-Fi not connected or poor signal; 2) Router not dialed up successfully or WAN port failure; 3) DNS misconfiguration (can ping IPs but can't open web pages); 4) ISP line failure; 5) Firewall/proxy software blocking. You can troubleshoot by sequentially pinging your gateway (192.168.1.1), a public IP (e.g., 8.8.8.8), and domain names to isolate the problem.

DNS Lookup ToolDNS Health Check

What Is an IP Address?

An IP address (Internet Protocol address) is a unique numerical identifier assigned to every device connected to the internet, similar to a physical mailing address or phone number in real life. It operates at the network layer (Layer 3) of the OSI model, allowing devices to locate and communicate with each other and ensuring data packets are correctly routed to their destinations. Without IP addresses, devices on the internet would be unable to find one another.

Two major versions of IP addresses are currently in widespread use: **IPv4** and **IPv6**. IPv4 uses a 32-bit address space with a format of four groups of decimal numbers (0–255) separated by dots (e.g., `192.168.1.1`), providing approximately 4.3 billion addresses total. Due to the explosive growth of mobile internet and IoT devices, IPv4 addresses were fully exhausted as early as 2019. **IPv6** uses a 128-bit address space expressed as eight groups of hexadecimal numbers separated by colons (e.g., `2001:0db8:85a3:0000:0000:8a2e:0370:7334`), providing approximately 3.4×10³⁸ addresses — thoroughly solving the address exhaustion problem.

IP addresses are typically classified into two categories: **Public IP** and **Private IP**. A public IP is a globally unique routable address on the internet, assigned by an ISP (Internet Service Provider), and can be directly accessed by other devices on the internet. A private IP is an address used within a local area network (LAN), reserved by IANA specifically for internal networks. It cannot be routed directly on the public internet and requires **NAT** (Network Address Translation) to convert private addresses to public IPs for internet access. Common private IP address ranges include `10.0.0.0/8`, `172.16.0.0/12`, and `192.168.0.0/16`.

This page displays your **public egress IP** — the IP address exposed by your device that other servers on the internet see. If you use a router, proxy server, VPN, or CDN service, the displayed IP may be the address of these intermediate devices rather than your device's local private IP. When you visit a website, this public egress IP is what the web server sees.

An IP address can be used to roughly infer a visitor's geographic location, typically accurate to the country, region, and city level, along with corresponding ISP information. However, please note: IP geolocation **cannot pinpoint a street, neighborhood, or specific room**, nor does it directly contain personal identity information such as your name or phone number. IP geolocation information is obtained by querying IP address databases (such as MaxMind GeoIP, IP2Location, etc.) that record registration and allocation information for different IP ranges.

In HTTP requests passing through reverse proxies (Nginx, HAProxy), CDNs (Cloudflare, CloudFront), or load balancers, the real client IP is transmitted via specific request headers. The most common include: `X-Forwarded-For` (records the entire proxy chain), `X-Real-IP` (commonly used by Nginx), `CF-Connecting-IP` (Cloudflare-specific), and `True-Client-IP` (Akamai/Cloudflare Enterprise). This tool automatically parses these headers and displays the complete request chain.

术语表

IPv4
Internet Protocol version 4 uses a 32-bit address length in dotted-decimal format (e.g., 192.168.1.1), with approximately 4.3 billion total addresses. It is the most widely used IP protocol version today, but addresses have been fully exhausted. RFC 791 is the core specification document for IPv4.IPv4 Format ConverterSubnet Calculator
IPv6
Internet Protocol version 6 uses a 128-bit address length in colon-separated hexadecimal notation (e.g., 2001:db8::1), providing a nearly unlimited address space (approximately 3.4×10³⁸ addresses). IPv6 is the future direction of the internet, supporting more efficient routing, built-in IPSec security, better QoS support, and Stateless Address Autoconfiguration (SLAAC).
Public IP
A globally unique routable IP address on the internet, assigned by ISPs (Internet Service Providers) to user devices or networks, and directly accessible by other servers on the internet. Public IPs are globally unique, just like your real physical mailing address. This page displays your current public egress IP.IP Geolocation Lookup
Private IP
IP address ranges reserved by IANA for internal use within local area networks that cannot be routed directly on the public internet. Private IP addresses can be reused across different LANs. Common private IP ranges include: 10.0.0.0/8 (Class A), 172.16.0.0/12 (Class B), and 192.168.0.0/16 (Class C). Home routers typically assign 192.168.x.x addresses to devices.
NAT (Network Address Translation)
A technology that allows multiple devices to share a single public IP address for internet access. Home/enterprise routers use NAT to convert internal private IPs to public IPs, solving the IPv4 address shortage problem but also requiring additional configuration (such as UPnP, port forwarding) for P2P connections and port mapping scenarios.
Loopback Address (localhost)
A special IP address that points to the local machine. In IPv4 it is 127.0.0.1 (the entire 127.0.0.0/8 range is reserved for loopback); in IPv6 it is ::1. Accessing the loopback address does not send packets onto the network but instead loops them back internally on the local machine, commonly used for local service testing (e.g., accessing http://localhost:3000).
127.0.0.1
The IPv4 loopback address, equivalent to localhost, always pointing to your own device. Whether or not you have a network connection, ping 127.0.0.1 will always succeed — it is commonly used to test whether the local TCP/IP protocol stack is functioning correctly. If you cannot even ping 127.0.0.1, there is a problem with your local network stack.
192.168.1.1
One of the most common private IP addresses, typically used as the default admin panel address for home routers. Many router brands including TP-Link, Xiaomi, and Huawei use this address as the default gateway — users can enter http://192.168.1.1 in a browser to access the router settings page. Other common default gateways include 192.168.0.1, 192.168.3.1, and 10.0.0.1.
ASN (Autonomous System Number)
A unique number assigned by IANA to network operators such as ISPs (Internet Service Providers), large enterprises, and cloud providers. Each ASN manages one or more IP address ranges and exchanges routing information with other ASes via the BGP protocol. Common ASNs include China Telecom 4134, China Unicom 4837, China Mobile 9800, Cloudflare 13335, and Google 15169.IP Geolocation Lookup
X-Forwarded-For
An HTTP request header field formatted as a comma-separated list of IPs, used to record the proxy/load balancer chain an HTTP request has passed through. The leftmost IP is typically the original client IP, followed by each proxy IP in sequence. For example: X-Forwarded-For: 203.0.113.195, 70.41.3.18, 150.172.238.178. It is the standard way to identify the real client IP after proxying.HTTP Headers Checker
CF-Connecting-IP
A Cloudflare CDN-specific HTTP request header used to pass the real client IP to the origin server. When a website uses Cloudflare CDN, the connection IP seen by the origin is a Cloudflare edge node IP, while the CF-Connecting-IP header contains the visitor's real IP. Similar headers include X-Real-IP (commonly used by Nginx) and True-Client-IP (Akamai/Cloudflare Enterprise).
Subnet Mask
A 32-bit value used to distinguish between network bits and host bits in an IP address, e.g., 255.255.255.0. Combining an IP address with a subnet mask allows determining whether two IPs are on the same subnet. CIDR notation (e.g., /24) is a shorthand form for subnet masks. This site provides a subnet calculator to help quickly compute network addresses, broadcast addresses, usable host ranges, and more.Subnet Calculator
CIDR (Classless Inter-Domain Routing)
A method of IP address allocation and route aggregation, expressed as an IP address followed by a slash and a prefix length (e.g., 192.168.1.0/24). The prefix length indicates the number of network bits; /24 corresponds to subnet mask 255.255.255.0 and supports 256 addresses. CIDR replaced the earlier Class A/B/C address classification, allowing more flexible allocation of IP address space.Subnet CalculatorIPv4 Range Expander
Dynamic IP vs Static IP
A dynamic IP is dynamically assigned by an ISP via DHCP and may change each time you dial up or reboot your router — most home broadband connections use dynamic IPs. A static IP is a fixed, unchanging IP address that usually requires an additional fee from your ISP, suitable for servers, VPN gateways, video surveillance, and other scenarios requiring externally accessible services.
CGNAT (Carrier-Grade NAT)
Also known as Large-Scale NAT (LSN). Due to IPv4 address exhaustion, ISPs deploy NAT at the carrier level, causing multiple users to share a single public IP egress. The user's router also receives a private IP (typically in the 100.64.0.0/10 range, i.e., 100.64.x.x–100.127.x.x). This causes difficulties for P2P, port mapping, remote access, and similar scenarios.

IPv4 Private/Special Reserved Address Ranges

The following address ranges are reserved by IANA (Internet Assigned Numbers Authority) and will not be routed on the public internet — they are used only for special or internal purposes:

Address TypeStart AddressEnd AddressCIDR NotationAddress CountUsage Description
Class A Private10.0.0.010.255.255.25510.0.0.0/816,777,216Large enterprise internal networks
Class B Private172.16.0.0172.31.255.255172.16.0.0/121,048,576Medium enterprise/campus networks
Class C Private192.168.0.0192.168.255.255192.168.0.0/1665,536Home/small office LANs
CGNAT100.64.0.0100.127.255.255100.64.0.0/104,194,304Carrier-grade NAT shared addresses
Link-Local169.254.0.0169.254.255.255169.254.0.0/1665,536Auto-configuration (when DHCP fails)
Loopback127.0.0.0127.255.255.255127.0.0.0/816,777,216Local loopback/localhost
Documentation192.0.2.0192.0.2.255192.0.2.0/24256Documentation/example code only (TEST-NET-1)
Multicast224.0.0.0239.255.255.255224.0.0.0/4268,435,456Class D/multicast
Reserved240.0.0.0255.255.255.255240.0.0.0/4268,435,456Class E/experimental research reserved

Comparison of Common curl Public IP Services

Below are common public services for obtaining your public IP from the command line, suitable for use in scripts, CI/CD, and server environments:

ServiceAPI AddressOutput FormatIPv6Features
ifconfig.meifconfig.mePlain text/JSONMost classic, supports JSON format with detailed info
ipinfo.ioipinfo.ioJSONReturns complete info including geolocation/ASN/org
icanhazip.comicanhazip.comPlain textOperated by Cloudflare, minimal pure IP output
api.ipify.orgapi.ipify.orgPlain text/JSONOpen source, supports separate IPv4/IPv6 endpoints
ifconfig.coifconfig.coPlain text/JSONFast, supports multiple output formats
ident.meident.mePlain textSimple, supports traceroute testing

Authoritative References