IP list sorter & deduplicator
Paste whatever you have — commas, quotes, brackets, host:port pairs, one per line or all on one. You get unique addresses in true numeric order, and anything unrecognised listed separately rather than silently dropped.
7 unique addresses · 1 duplicate removed · 1 not recognised
8.8.8.8
10.0.0.1
10.0.0.9
10.0.0.10
192.168.1.5
198.51.100.22
203.0.113.7Show the 1 unrecognised token
not-an-addressWhy lexicographic sorting is wrong here
An IPv4 address is four numbers that happen to be written with dots between them. Sorting the text compares them digit by digit, so 10.0.0.9 lands after 10.0.0.10 and any address starting with 9 lands after one starting with 100. The result looks sorted at a glance, which is what makes it dangerous.
Sorting on the 32-bit value fixes it, and has the useful side effect of putting addresses in the same block next to each other — so scanning a sorted list makes the ranges obvious.
What gets cleaned up
| Pasted | Read as | Why |
|---|---|---|
| "10.0.0.1", | 10.0.0.1 | CSV quoting and trailing comma |
| [203.0.113.7] | 203.0.113.7 | Bracketed log format |
| 198.51.100.22:8443 | 198.51.100.22 | host:port pair |
| 10.0.0.1 | 10.0.0.1 | Repeats counted, kept once |
| 10.0.0.0/24 | unrecognised | A block, not an address |
| 2001:db8::1 | unrecognised | IPv4 only, for now |
Frequently asked
- Why does sort put 10.0.0.10 before 10.0.0.9?
- Because a plain text sort compares character by character, and '1' sorts before '9'. Addresses only sort correctly as text when every octet is zero-padded to three digits. This tool sorts on the 32-bit numeric value instead, which is what you almost always mean.
- How do I sort IPs correctly on the command line?
- sort -t . -k1,1n -k2,2n -k3,3n -k4,4n treats each octet as its own numeric key and gives the right order. The -V flag (version sort) usually works too and is shorter to type, though it is comparing version strings rather than addresses, so it will do something surprising if the list contains anything that is not an address.
- What happens to ports and CIDR blocks?
- A trailing :port is stripped when what remains is a valid address, so 198.51.100.22:8443 becomes 198.51.100.22. CIDR blocks are not expanded — a token like 10.0.0.0/24 is reported as unrecognised rather than silently turned into one address or 256 of them. Use the IP range generator if you want a block expanded.
- Does anything I paste get sent to you?
- No. The parsing and sorting run entirely in your browser — the page makes no request while you use it. That is worth knowing given the lists people paste into tools like this usually come from access logs.
Doing this for thousands of addresses?
These calculators run in your browser and never send us your input. When you need geolocation, ASN and network data for addresses in bulk, the API answers in one call — no key required to try it.
curl https://api.ipaddresstoday.com/api/v1/8.8.8.8Other free tools
- Subnet calculatorNetwork and broadcast address, subnet mask, wildcard mask, usable host range and host count for any IPv4 block.
- CIDR to IP rangeConvert a CIDR block to its first and last address, or collapse an arbitrary address range into the smallest set of CIDR blocks.
- IP address converterConvert an IPv4 address between dotted-quad, decimal, hexadecimal, binary and octal.
- IPv6 expand & compressExpand an IPv6 address to its full 39-character form, or compress it to the canonical RFC 5952 short form.
- IP range generatorList every address in a CIDR block or a first–last range, ready to paste into a firewall rule or a script.
- Random IP generatorGenerate random IPv4 addresses for test fixtures and load tests — optionally inside a given block, and publicly routable only.
- IP in range checkerCheck whether an address falls inside a CIDR block or a first–last range, and see how two blocks relate to each other.
- Subnet mask cheat sheetEvery IPv4 prefix from /32 to /0 with its subnet mask, wildcard mask, host count and block size — plus a mask to prefix converter.
- IPv4 to IPv6 converterSee an IPv4 address in every standard IPv6 form: IPv4-mapped, 6to4, NAT64 and the deprecated IPv4-compatible notation.
- Reverse DNS name generatorBuild the in-addr.arpa or ip6.arpa PTR name for any address, and list the reverse zones covering a whole block.
- Bulk IP lookupLook up country, city, ISP and ASN for a whole list of addresses at once, and export the result as CSV.