How to Use the Sort IPv4 Addresses Numerically Online
- 1Paste valid IPv4 addresses, keeping the address and any label on the same line.
- 2Choose ascending for low address values first or descending for high values first.
- 3Check lines that contain more than one dotted value because the first match controls the sort.
- 4Copy the ordered rows after confirming that unrelated lines are out of the list.
Input & Output Examples
Ascending order compares .2 and .100 numerically after matching the first three octets.
Input Sample
192.0.2.100
192.0.2.2
198.51.100.1Expected Output
192.0.2.2
192.0.2.100
198.51.100.1Descending order moves the whole labeled line. The first octet has priority, then the last octet breaks the remaining tie.
Input Sample
backup 192.0.2.9
primary 198.51.100.4
spare 192.0.2.20Expected Output
primary 198.51.100.4
spare 192.0.2.20
backup 192.0.2.9Practical Developer Workflows
- Arrange example addresses in a documentation table while keeping their labels attached.
- Compare a numeric address order with how the same strings would sort alphabetically.
- Produce a small fixed-order fixture from a list of IPv4 examples.
Zero Server Uploads & Complete Privacy
Runs 100% in your browser; no data is uploaded to any server.
Notice a bug, calculation error, or outdated info?
Let us know directly so our engineering team can fix it.
Frequently Asked Questions
The tool looks for four dot-separated groups, so provide IPv4 addresses in dotted-decimal form. IPv6 uses a different structure. An IPv6-only line with no embedded dotted match is handled like any other line without a match.