Free tool · converter

IP address converter

Convert an IP address into its numeric forms and IPv6 representations, or turn a number back into an IP address.

Enter an IPv4 or IPv6 address, or a decimal number. Runs in your browser.

Building this into an app? Use the IP lookup API and its IP info endpoint documentation.

Frequently asked questions

How do I convert an IPv4 address to a number?

Multiply the four octets by 256³, 256², 256 and 1 and add them up: 192.0.2.1 = 192×16,777,216 + 0×65,536 + 2×256 + 1 = 3221225985. Databases often store IPs this way for range queries.

How do I convert IPv4 to IPv6?

There is no one-to-one conversion, but an IPv4 address can be written as an IPv4-mapped IPv6 address (::ffff:192.0.2.1), which dual-stack software uses internally.

IP geolocation API

Get this data in your app

ipbase returns location, ISP, ASN and time zone for any IPv4 or IPv6 address, up to 1,000 addresses per POST request. Security flags (VPN, proxy, Tor, data center) are on the Small plan and above.

Read the documentation

150 free requests every month. No credit card required.

GET https://api.ipbase.com/v2/info?ip=1.1.1.1

{
  "data": {
    "ip": "1.1.1.1",
    "type": "v4",
    "connection": {
      "asn": 13335,
      "organization": "APNIC and Cloudflare DNS Resolver project",
      "isp": "Cloudflare, Inc",
      "range": "1.1.1.0/24"
    },
    "location": {
      "country": { "alpha2": "AU", "name": "Australia" },
      "zip": "4000"
    },
    "security": { "is_vpn": null, "is_tor": null, "threat_score": null }
  }
}

Free IP tools

Example lookups: 8.8.8.8 · 8.8.8.0/24 · AS15169 · example.com · all IPv4 ranges

Get your free IP geolocation API key

Start with 150 free requests a month