Numeric IP Address Sorter & Deduplicator — IPv4 and IPv6
Sort messy IP lists numerically (not alphabetically!) and remove duplicates.
12 lines read → 10 lines out (2 duplicates dropped)
Numeric order: IPv4 first, then IPv6, by address value, then prefix length. Addresses are rewritten in canonical form, so 2001:DB8::10 and 2001:db8::10 count as the same.
When to use the Numeric IPv4/IPv6 Address Sorter & Deduplicator
Numeric, not alphabetical
Plain text sorting puts 10.0.0.10 before 10.0.0.9 and 192.168.1.100 before 192.168.1.20. This tool sorts by the real address value, so the order matches a routing table.
Duplicates in any spelling
Addresses are rewritten in canonical form before comparing, so 2001:DB8::10 and 2001:db8:0:0:0:0:0:10 count as the same and appear only once.
Mixed IPv4, IPv6 and CIDR
IPv4 always comes before IPv6. CIDR blocks sort by their address, then by prefix length, so 10.0.0.0/8 comes before 10.0.0.0/24 and before the single address 10.0.0.0.
Bad lines never vanish quietly
Lines that are not IP addresses, such as host names or octets above 255, are listed separately so you know some data needs checking. Lines starting with a hash are treated as comments.
Frequently asked questions
How is numeric order worked out?
Each address becomes a 32-bit number for IPv4 or a 128-bit number for IPv6 and is sorted by that number.
Can I sort from high to low?
Yes. Choose Descending; IPv6 then comes first because the whole order is reversed.
Are duplicates always removed?
Only when Remove duplicates is ticked. Turn it off to see repeated addresses next to each other.
What about the Linux sort command?
sort -V or sort -t . -k1,1n -k2,2n -k3,3n -k4,4n can sort IPv4, but it does not handle IPv6 or different spellings.
Is my data sent to a server?
No. Sorting runs in your browser, so lists of server and customer addresses stay private.
Similar tools
- CIDR Exclusion & WireGuard AllowedIPs BuilderSubtract LAN or private ranges from 0.0.0.0/0 or any block and get the minimal CIDR list for WireGuard, routing or MikroTik.
- CIDR & IP Range to Full Address List ExpanderExpand IPv4/IPv6 CIDRs and start–end ranges into every individual address, ready to export as TXT for scanners and ACLs.
- IP / CIDR List Diff & Allowlist AuditorCompare two IP/CIDR lists by real address coverage: what was added, removed, or overlaps — ideal for firewall allowlist reviews.
- CIDR Aggregator & Supernet Route SummarizerMerge adjacent IPv4 prefixes and contiguous subnets into minimal routing blocks.