← All tools
// Network

IP Address Sorter online

Sort IPv4 and IPv6 addresses numerically, ascending or descending — runs in your browser

Chunky Munster mascot
by
CHUNKY
MUNSTER
// Sorted IP Addresses
Output will appear here...

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.

Why Numeric IP Sorting Matters

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.

Common Use Cases

Frequently Asked Questions

How are IP addresses sorted numerically?

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.

Can I sort a mix of IPv4 and IPv6?

This tool sorts IPv4 addresses numerically. IPv6 addresses are also sorted lexicographically. Mixed lists are sorted with IPv4 addresses first.