IP Information Lookup

Query detailed information about an IP address, including geographical location, ISP, ASN, and more.

Query Settings

Query Result

Please enter an IP address or click "Detect My IP" to begin

Privacy and Security

When using this tool to query IP information, please note the following:

  • ℹ️ Query requests are sent to third-party APIs; we do not log your query history
  • ℹ️ IP geolocation data is typically accurate only to the city level and cannot pinpoint an exact address
  • ℹ️ Most home broadband connections use dynamic IPs, so your IP address may change periodically
  • ℹ️ If you're using a VPN or proxy, the results will show information about the proxy server

Use Cases

Security Monitoring

Analyze access logs for suspicious IP sources to identify potential security threats.

Network Debugging

Troubleshoot connectivity issues and verify the geographic location of your server or CDN nodes.

Geolocation

Deliver localized content, language, or services (e.g., CDN distribution) based on the user's IP address.

Frequently Asked Questions

How accurate is IP geolocation?

IP geolocation is typically accurate to the city level, with potential errors ranging from tens to hundreds of kilometers. It cannot pinpoint exact street addresses or building numbers.

Why does my IP address change?

Most home broadband connections use dynamic IP allocation (DHCP), so your ISP periodically assigns a new IP. Businesses or servers usually use static IPs.

How can I hide my real IP address?

You can use a VPN, proxy server, or the Tor network to conceal your real IP. However, note that these services may slow down your connection or block access to certain websites.

Why do I have two IP addresses?

You likely have both an IPv4 and an IPv6 address. Modern networks are transitioning from IPv4 to IPv6, and many devices support both protocols simultaneously.

What is an IP Address?

An IP (Internet Protocol) address is a unique identifier for devices on the internet, similar to a street address in the physical world. Every device connected to the internet has an IP address used to locate and communicate with other devices.

IPv4 vs IPv6: Why Do We Need IPv6?

IPv4 (1981)

Format: Four decimal numbers separated by dots (e.g., 192.168.1.1)

Total: Approximately 4.3 billion addresses (2³² = 4,294,967,296)

Problem: Addresses are nearly exhausted; fully allocated by 2011

Length: 32-bit

IPv6 (1998)

Format: 8 groups of hexadecimal numbers (e.g., 2001:0db8::1)

Total: Approximately 340 undecillion addresses (2¹²⁸)

Advantage: Nearly unlimited address space—enough to assign an IP to every grain of sand on Earth

Length: 128 bits

Why Is IPv4 Insufficient?

  • • Global population of 8 billion, with at least 2–3 devices per person (phones, computers, tablets)
  • • Explosive growth of IoT devices (smart homes, cars, wearables)
  • • Enterprises and data centers require vast numbers of IP addresses
  • • Early allocation was inefficient (e.g., MIT was assigned 16 million IPs)

Special IP Address Ranges

Loopback Address

127.0.0.0/8 (127.0.0.1 – 127.255.255.255)

Used for local testing; data never leaves the machine. Commonly, 127.0.0.1 represents localhost

Use: Testing local services, development and debugging

Private Addresses

  • 10.0.0.0/8 (10.0.0.0 – 10.255.255.255) – Class A
  • 172.16.0.0/12 (172.16.0.0 – 172.31.255.255) – Class B
  • 192.168.0.0/16 (192.168.0.0 – 192.168.255.255) – Class C

Used internally within local networks; cannot directly access the internet without NAT translation

Use: Home networks, enterprise intranets

APIPA Address

169.254.0.0/16

A temporary address automatically assigned by the system when a DHCP server is unavailable

Use: Automatic configuration (indicates network configuration failure)

Multicast Address

224.0.0.0/4 (224.0.0.0 – 239.255.255.255)

Used for one-to-many communication, such as live video streaming and IPTV

Reserved Addresses

  • 0.0.0.0/8 – Represents "this network"
  • 255.255.255.255 – Broadcast address
  • 192.0.2.0/24 – Reserved for documentation examples
  • 198.18.0.0/15 – Reserved for benchmark testing

Top Public DNS Servers

Google DNS

8.8.8.8 / 8.8.4.4

2001:4860:4860::8888 / 2001:4860:4860::8844

Fastest and most reliable globally, supports DNSSEC

Cloudflare DNS

1.1.1.1 / 1.0.0.1

2606:4700:4700::1111 / 2606:4700:4700::1001

Privacy-focused, ultra-fast, and no logging

Quad9 DNS

9.9.9.9 / 149.112.112.112

Security protection, blocks malicious websites

OpenDNS

208.67.222.222 / 208.67.220.220

Parental controls, content filtering

Asia Region DNS

  • Alibaba Cloud DNS (China): 223.5.5.5 / 223.6.6.6
  • DNSPod (China): 119.29.29.29
  • 114 DNS (China): 114.114.114.114

Interesting IP Facts

💰 The Most Expensive IP Address Blocks

The 1.0.0.0/8 block was once purchased by APNIC for millions of dollars for research purposes. Certain 'premium' IPs (like 8.8.8.8 and 1.1.1.1) are extremely valuable—Cloudflare spent a significant amount to acquire 1.1.1.1 from a telecom provider.

📍 Why Does the Same IP Show Different Locations?

  • • Different IP geolocation databases (each API uses different data sources)
  • • Dynamic IP addresses change (reassigned by ISPs)
  • • VPN/proxy servers (show the proxy server's location)
  • • CDN nodes (show the nearest CDN server location)
  • • Mobile networks (cell tower locations may be inaccurate)

📊 IPv6 Adoption Rate

As of 2024, global IPv6 adoption is around 40%, led by India, the United States, and Germany. China stands at approximately 30%. Belgium has the highest IPv6 adoption rate worldwide, exceeding 60%.

🎂 The First IP Address

On January 1, 1983, the internet officially adopted the TCP/IP protocol, marking the birth of the first IP address. Leonard Kleinrock of BBN Technologies is widely regarded as the first person to use an IP address.

🗑️ Inefficient IP Allocation

Early internet IP allocation was extremely generous: MIT (a single university) was assigned 16 million IPs (the entire 18.0.0.0/8 block), and Apple was assigned 16 million IPs (17.0.0.0/8). Meanwhile, the entire mainland China received only about 330 million IPs—serving nearly a billion internet users. Assuming two devices per person, at least 2 billion IPs would be needed. This imbalance forced China to heavily rely on NAT technology to share IPs.

🚫 IP Blacklist

Globally, there are multiple IP blacklist databases (such as Spamhaus) used to flag IPs associated with spam, malware, DDoS attacks, and other malicious activities. Once an IP is blacklisted, it may result in emails being rejected or websites being blocked.

🤯 Bizarre Cases of IP Geolocation

A regular household in Kansas, USA, was assigned the default coordinate (38°N 97°W—the geographic center of the U.S.) by MaxMind’s IP database. As a result, millions of IP addresses unable to be precisely located were mapped to this home. The family unexpectedly became known as 'America’s hacker hub,' receiving countless harassing calls and visits from the FBI, police, debt collectors, and scam victims—some even broke in at night. In 2016, the family sued MaxMind and ultimately won compensation.

💸 IPv4 Addresses Can Be Bought and Sold

Due to IPv4 address exhaustion, IP addresses have become tradable commodities. On the black market, prices can reach up to $40 per address. In 2011, Microsoft purchased 666,000 IP addresses from the bankrupt Nortel for $7.5 million—averaging about $11.25 per IP. In 2014, tech giants like Amazon and Microsoft aggressively hoarded IPv4 addresses, driving prices to record highs.

🤦 The IPv4 Designers' Miscalculation

In 1981, the designers of IPv4 believed that '4.3 billion addresses would last forever.' They never anticipated the internet’s explosive growth: today’s global population of 8 billion people, each owning at least 2–3 devices, plus the surge of IoT devices. Had IPv4 been designed with 64-bit or 128-bit addressing, we wouldn’t be facing today’s address exhaustion crisis.

🏠 The Secret of 127.0.0.1

127.0.0.1 (localhost) isn’t just a single address—the entire 127.0.0.0/8 range (roughly 16 million addresses) is reserved for loopback. You can ping any address within this range—like 127.0.0.2 or 127.1.2.3—and they’ll all point back to your own machine.

⏰ Timeline of IPv4 Address Exhaustion

On February 3, 2011, IANA allocated its final IPv4 address block. On April 15, 2011, APNIC (Asia-Pacific) ran out. In September 2012, RIPE NCC (Europe) exhausted its pool. In September 2015, ARIN (North America) depleted its remaining addresses.

📏 The Longest IP Address

An IPv6 address can be up to 39 characters long (8 groups of 4 hexadecimal digits each, plus 7 colons). However, through compression rules, it can be significantly shortened—for example, ::1 represents the IPv6 loopback address.

🚀 IP Address Has Nothing to Do with Internet Speed

Many people mistakenly believe that changing your IP address can improve internet speed. In reality, an IP address is merely a 'street address' on the network; speed depends on bandwidth, routing, server performance, and other factors—not the IP address itself.

Features and Pros/Cons of IPv6

Advantages

  • Huge address space: 2¹²⁸ addresses—virtually unlimited
  • Simplified routing: Hierarchical addressing reduces routing table size
  • Automatic configuration: Supports SLAAC without requiring DHCP
  • Enhanced security: Built-in IPsec support
  • Better QoS: Flow label field optimizes real-time applications
  • No NAT required: Every device has a public IP address
  • Improved mobility: Better support for mobile devices

Disadvantages

  • Compatibility issues: Requires device and network support
  • Learning curve: Address format is complex and hard to remember
  • Transition cost: Requires upgrading hardware and software
  • Dual-stack operation: Must support both IPv4 and IPv6 during transition

Related IP Information Services

This tool uses the following APIs to provide services, and we also recommend these other excellent IP lookup services:

IP-API.com

Used by this tool ⭐

The primary API used by this tool. Completely free (non-commercial use), supports batch queries, and provides data in JSON/XML/CSV formats. Limit: 45 requests per minute.

IPapi.co

Used by this tool ⭐

A backup API for this tool. Provides additional details such as currency, language, and connection type. Free tier allows 30,000 requests per month.

IPInfo.io

Accurate data, developer-friendly API

Delivers detailed IP information, including ASN data, geolocation, and company details. Offers a free plan (Free Plan).

IPGeolocation.io

Feature-rich

Provides IP geolocation, timezone, currency, weather, and more. Free tier allows 30,000 requests per month.

MaxMind GeoIP2

Most accurate, enterprise-grade

An industry-standard IP geolocation database with high accuracy. Offers both offline databases and online APIs.

IPStack

Security detection

Supports IPv4 and IPv6, with security modules to detect proxies, VPNs, and Tor. Free tier allows 100 requests per month.

IPData.co

Threat intelligence

Provides threat intelligence, ASN information, and company data. Free tier allows 1,500 requests per day.

Abstract API

Simple and easy to use

A simple and easy-to-use IP geolocation API. Free tier allows 1,000 requests per month with a limit of 1 request per second.

IPRegistry

Get 100,000 free requests on signup

Offers IP geolocation, company information, threat detection, and proxy resolution. Register to receive 100,000 free requests.

DB-IP

Open-source database

Offers free downloadable IP geolocation databases, along with an online query service.

IPify

Get your public IP

Specializes in retrieving your public IP address—simple, fast, and completely free.

How to retrieve an IP address programmatically?

Below are example codes for retrieving visitor IP addresses in different programming languages:

Java (Spring Boot)

import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;

@RestController
public class IpController {
    
    @GetMapping('/ip')
    public String getClientIp(HttpServletRequest request) {
        String ip = request.getHeader("CF-Connecting-IP");
        
        if (ip == null || ip.isEmpty()) {
            ip = request.getHeader("X-Forwarded-For");
            if (ip != null) {
                ip = ip.split(",")[0];
            }
        }
        
        if (ip == null || ip.isEmpty()) {
            ip = request.getHeader("X-Real-IP");
        }
        
        if (ip == null || ip.isEmpty()) {
            ip = request.getRemoteAddr();
        }
        
        return ip;
    }
}

PHP

function getClientIp() {
    $ipKeys = [
        'HTTP_CF_CONNECTING_IP',
        'HTTP_X_FORWARDED_FOR',
        'HTTP_X_REAL_IP',
        'REMOTE_ADDR'
    ];
    
    foreach ($ipKeys as $key) {
        if (!empty($_SERVER[$key])) {
            $ips = explode(',', $_SERVER[$key]);
            return trim($ips[0]);
        }
    }
    
    return $_SERVER['REMOTE_ADDR'] ?? 'Unknown';
}

$ip = getClientIp();
echo "Your IP: " . $ip;

JavaScript (Node.js)

const express = require('express');
const app = express();

app.get('/ip', (req, res) => {
    const ip = req.headers['cf-connecting-ip'] ||
                req.headers['x-forwarded-for']?.split(',')[0] || 
                req.headers['x-real-ip'] || 
                req.socket.remoteAddress;
    
    res.json({ ip: ip });
});

app.listen(3000);

Python (Flask)

from flask import Flask, request

app = Flask(__name__)

@app.route('/ip')
def get_ip():
    ip = request.headers.get('CF-Connecting-IP') or \
         request.headers.get('X-Forwarded-For', '').split(',')[0] or \
         request.headers.get('X-Real-IP') or \
         request.remote_addr
    
    return {'ip': ip}

if __name__ == '__main__':
    app.run()

Rust

use actix_web::{web, App, HttpRequest, HttpServer, Responder};

fn get_client_ip(req: &HttpRequest) -> String {
    if let Some(ip) = req.headers().get("CF-Connecting-IP") {
        return ip.to_str().unwrap_or("").to_string();
    }
    
    if let Some(forwarded) = req.headers().get("X-Forwarded-For") {
        if let Ok(forwarded_str) = forwarded.to_str() {
            if let Some(first_ip) = forwarded_str.split(',').next() {
                return first_ip.trim().to_string();
            }
        }
    }
    
    if let Some(ip) = req.headers().get("X-Real-IP") {
        return ip.to_str().unwrap_or("").to_string();
    }
    
    req.peer_addr()
        .map(|addr| addr.ip().to_string())
        .unwrap_or_else(|| "Unknown".to_string())
}

async fn ip_handler(req: HttpRequest) -> impl Responder {
    let ip = get_client_ip(&req);
    format!("Your IP: {}", ip)
}

#[actix_web::main]
async fn main() -> std::io::Result<()> {
    HttpServer::new(|| {
        App::new().route("/ip", web::get().to(ip_handler))
    })
    .bind("127.0.0.1:8080")?
    .run()
    .await
}

Go

package main

import (
    "net/http"
    "strings"
)

func getClientIP(r *http.Request) string {
    if ip := r.Header.Get("CF-Connecting-IP"); ip != "" {
        return ip
    }
    
    if forwarded := r.Header.Get("X-Forwarded-For"); forwarded != "" {
        ips := strings.Split(forwarded, ",")
        return strings.TrimSpace(ips[0])
    }
    
    if ip := r.Header.Get("X-Real-IP"); ip != "" {
        return ip
    }
    
    return r.RemoteAddr
}

func handler(w http.ResponseWriter, r *http.Request) {
    ip := getClientIP(r)
    w.Write([]byte("Your IP: " + ip))
}

func main() {
    http.HandleFunc("/ip", handler)
    http.ListenAndServe(":8080", nil)
}

注意事项:

  • • Note: If your website uses a CDN (e.g., Cloudflare) or reverse proxy (e.g., Nginx), you must extract the real IP from specific HTTP headers.
  • • Priority order: CF-Connecting-IP > X-Forwarded-For > X-Real-IP > RemoteAddr
  • • X-Forwarded-For may contain multiple IPs (comma-separated); the first one is the client's real IP.
  • • Browser-side JavaScript cannot directly obtain an IP address—it requires calling a third-party API.