About the Sort IP Addresses
Sorting IP addresses as plain text puts 10.0.0.10 before 10.0.0.2, because the text sorter compares one character at a time. This tool compares the four numbers properly, so 10.0.0.2 comes before 10.0.0.10. Paste your IPv4 addresses one per line, choose lowest first or highest first, and decide whether to remove repeated addresses. Lines that are not valid addresses, such as 999.1.1.1, are not mixed into the sorted list: they can be put at the end and are listed in a note. It all runs in your browser.
Updated October 2026
How to use the Sort IP Addresses
- 1Paste your IPv4 addresses, one per line.
- 2Choose lowest first or highest first.
- 3Tick Remove repeated addresses if you want each address once.
- 4Choose whether lines that are not valid go at the end.
- 5Copy the sorted list or download it.
Why numeric sorting matters
Network admins, log analysts and security teams handle lists of addresses: allow lists, block lists, hosts from a scan and clients from a log. A correct order makes lists easier to read and compare, and makes ranges visible, so you can see at a glance which addresses are next to each other.
Sorted lists also compare well with other lists, because identical lists end up identical line by line.
How the sort works
Each address a.b.c.d is read as a single number: a times 16,777,216 plus b times 65,536 plus c times 256 plus d. Addresses are sorted by that number. Each part must be between 0 and 255 to be valid, so an address like 300.1.1.1 is reported.
- Lowest first: 10.0.0.2 before 10.0.0.10
- Highest first: the reverse
- Private ranges such as 192.168.x.x sort in with the rest
Cleaning your list first
Take out ports, slashes and comments before you paste, or they will make a line invalid. If you have CIDR ranges, split off the address part first. Use the Remove Duplicate Lines tool for text lists that are not addresses.
Where lists come from
Server logs, firewall exports, router tables, DHCP leases and scan results all produce address lists in whatever order the events happened. Sorting them turns a pile of lines into something you can read, compare against an allow list and search by eye.
If your addresses are mixed with other text, such as a port after a colon, use a text tool to cut them down to the address first.
Privacy
Address lists often describe a private network, so it matters that nothing leaves your device. The sorting is done by code in your browser tab, and the list is never uploaded or stored. Close the tab and it is gone. To sort by length use Sort Lines by Length, and to join lists use Merge Text Lists.
Features
- True numeric order
- Lowest or highest first
- Optional removal of repeats
- Invalid lines reported and set aside
- Handles long lists
- Private: nothing is uploaded
Frequently asked questions
How do I sort IP addresses?
Paste them one per line and read the sorted list. The tool turns each address into its numeric value, sorts those and writes the addresses back in the original form.
Why is alphabetical sorting wrong for IP addresses?
In text order, 10.0.0.10 comes before 10.0.0.2 and 192.168.1.100 before 192.168.1.9. IP addresses are numbers in four parts, and each part must be compared as a number.
What happens to invalid addresses?
A line like 999.1.1.1 or a word is not a valid IPv4 address. It is kept out of the sorted block and, if you wish, written at the end so nothing is lost. The note lists the first few.
Does it sort IPv6 addresses?
No. This tool is for IPv4 addresses with four numbers separated by dots. IPv6 addresses will be reported as not valid.
Can it remove duplicate addresses?
Yes. Tick the option and every address appears once, and the note shows how many repeats were removed.
Is my list uploaded?
No. The sorting is done in your browser and your list is not sent anywhere.