Sort IP Addresses
Sort IPv4 and IPv6 addresses in true numeric order, with duplicates removed and non-IP lines reported separately.
About this tool
Firewall rules, allow lists and log extracts are easier to read and diff when the addresses are in order. Sort IP Addresses converts each address to its numeric value and sorts accordingly, handling IPv4 and IPv6 side by side, dropping duplicates and listing lines that are not valid addresses so nothing is lost silently.
Extract addresses from raw text first with the IP extractor.
How to use it — quick steps
- 01
Enter the ip addresses
Type or paste the ip addresses in the field above, one item per line. It stays in your browser.
- 02
Adjust the options
Pick the settings that fit your case; the defaults work for most people. Changes apply instantly.
- 03
Press "Sort IP addresses"
Press "Sort IP addresses" or Ctrl + Enter. The result appears instantly below the form.
Key features of this tool
Nothing leaves your browser
The processing is plain JavaScript that runs on your device: the text you paste is never uploaded to our servers or to anyone else.
Instant results
Results appear the moment you press the button, even for long inputs, and every block has copy and download actions.
Works everywhere
No installation, no account and no limits: the tool works on desktop and mobile, in any modern browser, as often as you like.
Frequently asked questions
Why is alphabetical sorting wrong for IPs?
Each octet is a number: 10.0.0.9 is lower than 10.0.0.10, but as text "10.0.0.10" sorts first. This tool converts addresses to integers before comparing.
What happens to IPv6 addresses?
They are normalised (compressed form) and sorted after the IPv4 list by their 128-bit value.
Are my files or data uploaded?
No. The tool is plain JavaScript that runs in your browser; the files or data you provide here are never uploaded to our servers.