IPv4 to Integer Converter

Convert any IPv4 address into its 32-bit integer value — in decimal, hexadecimal, octal, and binary — instantly and entirely in your browser.

Enter a dotted-decimal IPv4 address (four octets 0-255 separated by dots).

ToolsSoup's IPv4 to Integer Converter turns a dotted-decimal IPv4 address such as 192.168.1.1 into its single 32-bit integer value. It shows the result as a decimal number, a hexadecimal value, an octal value, and the full 32-bit binary string, so you can drop the right format straight into a database column, a spreadsheet, or your code. Everything runs locally in your browser — no address you enter is ever sent to a server.

What does IPv4 to integer mean?

An IPv4 address is really a 32-bit number written in a friendly dotted form: four 8-bit octets joined by dots. Converting it to an integer collapses those four numbers into the single value they represent. The math is positional, base 256: the first octet is multiplied by 16,777,216 (256 cubed), the second by 65,536 (256 squared), the third by 256, and the last is added as-is. So 192.168.1.1 becomes 192 x 16777216 + 168 x 65536 + 1 x 256 + 1 = 3,232,235,777. That one number is far easier to store, sort, compare, and index than a string with dots.

How to convert an IPv4 address to an integer

Getting the integer form takes just a moment:

  1. Type a dotted-decimal IPv4 address such as 10.0.0.5 into the box.
  2. Click Convert, or simply press Enter.
  3. Read the decimal, hexadecimal, octal, and 32-bit binary values, and use the Copy button to grab the format you need.

Why store IP addresses as integers?

Databases and analytics tools handle a single integer far more efficiently than a 15-character string. An integer column takes less space, sorts numerically, and lets you do fast range checks — for example, testing whether an address falls inside a CIDR block becomes a simple BETWEEN comparison once both the address and the block bounds are integers. That is why MySQL's INET_ATON, PostgreSQL's inet type internals, and most IP-geolocation datasets work with the 32-bit integer rather than the dotted string.

Why use this IPv4 to integer converter?

  • Outputs the decimal integer plus hexadecimal, octal, and full 32-bit binary in one click.
  • Validates each octet (0-255) and rejects malformed addresses with a clear message.
  • One-click copy on every value so you can paste straight into SQL, a spreadsheet, or code.
  • Matches the same value databases produce with functions like MySQL INET_ATON.
  • Runs 100% in your browser with no network requests, so it works offline and keeps your data private.

Frequently asked questions

What is the integer value of 192.168.1.1?

It is 3,232,235,777. You get it by computing 192 x 16,777,216 + 168 x 65,536 + 1 x 256 + 1. The converter shows this decimal value along with its hexadecimal form 0xC0A80101.

How do I convert the integer back to an IPv4 address?

Reverse the base-256 math: divide and take remainders for each of the four octets, or use bit shifts. This tool converts a dotted address to an integer; for the reverse direction use an integer-to-IPv4 converter, which splits the 32-bit number back into four octets.

Is this the same value as MySQL INET_ATON?

Yes. MySQL's INET_ATON, PostgreSQL casts, and most programming-language helpers produce the same unsigned 32-bit integer for a given IPv4 address, because they all treat the four octets as a base-256 number.

What is the largest possible IPv4 integer?

255.255.255.255 maps to 4,294,967,295, which is 2 to the 32nd power minus one — the maximum value an unsigned 32-bit integer can hold. The smallest, 0.0.0.0, maps to 0.

Does this tool send my IP address anywhere?

No. The conversion is plain arithmetic that runs locally in your browser with no network requests. The tool works offline and never transmits the address you enter.