IPv4 to Integer
Convert a valid IPv4 address to its unsigned integer.
Read the guideRun the tool
The calculation runs in your browser. This tool does not send your input to JVR Software.
More information
Back to the toolWhat it is and when to use it
IPv4 to Integer converts a familiar dotted IPv4 address into its equivalent unsigned 32-bit number. It is useful for data migrations, teaching address ranges and comparing a decimal-only stored identifier with a display address. The conversion keeps the address semantics and changes the notation.
How it works
The four decimal address components are bytes. Starting from the left, the tool combines them with place values of 256 cubed, 256 squared, 256 and one. Each component has an allowed range of 0 through 255. The total ends at 4,294,967,295 for the largest address.
How to use it
- Paste a complete IPv4 address with four numbers separated by periods.
- Convert it and copy the decimal result without grouping separators if a database field expects plain digits.
- Confirm the round trip in Integer to IPv4 before updating a fixture or application value.
Worked example
The documentation address 192.0.2.1 converts to 3221225985. Its first 192 is the most significant byte. Changing the last component from 1 to 2 adds exactly one to the output. Changing the third component by one adds 256.
Reading the result
A result larger than 2,147,483,647 still fits unsigned 32-bit storage but exceeds the positive range of signed 32-bit storage. Understand the schema’s signedness and byte order when interoperating with existing systems. A printed number alone does not explain how a database stored it.
Common mistakes and limits
Use plain dotted decimal without a port, CIDR suffix or hostname. Applications can disagree on zero-padded address components. Prefer conventional decimal with no padding when moving values between stacks. IPv6 needs wider storage and a different notation and converter.
