Sorting IP addresses requires numeric comparison rather than alphabetical comparison. Alphabetical sorting would place 10.0.0.1 after 9.0.0.1 incorrectly, because the character '1' sorts before '9'. This tool sorts IP addresses by converting each to its 32-bit integer value and performing a true numeric sort.
When analysing firewall logs, access control lists, or network scan results, correctly sorted IP ranges make it much easier to identify ranges, find gaps, and spot anomalies. String-based sorting is a common mistake that produces incorrect output for IP lists.
Each IPv4 address is converted to a 32-bit unsigned integer by treating the four octets as a big-endian number. For example, 192.168.1.1 = (192×2²⁴) + (168×2¹⁶) + (1×2⁸) + 1 = 3232235777. These integers are then sorted normally.
This tool sorts IPv4 addresses numerically. IPv6 addresses are also sorted lexicographically. Mixed lists are sorted with IPv4 addresses first.