MagmaNex LogoMagmaNex

IPv4 to Integer Converter

Convert an IPv4 address to a 32-bit integer and hex — or back. Useful for databases and programming.

What does this tool do?

The IPv4 to Integer Converter turns an IPv4 address into a single 32-bit integer and its hex equivalent, and converts an integer back to dotted IPv4. It is handy when storing or comparing addresses in a database. The conversion runs entirely in your browser.

How to use it

  1. Enter an address, domain or value.
  2. View the results instantly.
  3. Copy the details you need.

How it works

Each IPv4 octet is 8 bits, and the tool combines the four octets in base 256. For 192.168.1.1 the math is (192*16777216)+(168*65536)+(1*256)+1 = 3232235777, shown in hex as 0xC0A80101. Enter an integer in the reverse direction and it is mapped back to dotted IPv4 using the same bit shifts.

Common use cases

Storing IP addresses in an INT column uses far less space than a text field and speeds up range comparisons (BETWEEN queries). Developers prefer this numeric form for GeoIP tables, log analysis and address-range checks.

Frequently asked questions

What integer does 192.168.1.1 map to?

The address 192.168.1.1 equals the 32-bit integer 3232235777, or 0xC0A80101 in hex. The value is produced by shifting each octet into its correct bit position.

Does this tool also convert IPv6 addresses?

No, this tool is for 32-bit IPv4 addresses only. IPv6 addresses are 128 bits and do not fit in a single standard 32-bit integer, so they are not supported here.

Is IPv4 to Integer Converter free?

Yes. IPv4 to Integer Converter and all 300+ tools on MagmaNex are completely free with no signup or account required.

Is my data safe?

Yes. Everything runs locally in your browser. The data you enter is never sent to a server, stored, or shared.

Does it work on mobile?

Yes. IPv4 to Integer Converter works on phones, tablets and desktops — no app download needed.

🔒 Privacy: everything runs in your browser, your data is never sent to a server.

Related Tools

📝 Related Articles

Popular Tools