# Sort & Deduplicate Lines

URL: https://phishdestroy.io/developer-tools/sort-deduplicate-lines
Category: General dev
Where it runs: Runs locally (nothing you enter is uploaded)

Paste one item per line and remove duplicates, or sort the list A→Z, Z→A, numerically or at random. Handy for merging domain or URL lists from several feeds before you build a blocklist.

## Example input

Domain list with repeats

```
login.example.com
cdn.example.net
login.example.com
verify.example.org

cdn.example.net
```

Deduplicate keeps the first copy of each line in its original order and drops the blank line, leaving login.example.com, cdn.example.net and verify.example.org.

## FAQ

### What does each button do?

A→Z and Z→A sort with the browser's locale-aware comparison, Numeric sorts by the number at the start of each line, Deduplicate removes repeated lines and keeps the first one in place, and Shuffle randomises the order. Blank lines are always dropped.

### Why are some duplicates not removed?

Lines are compared exactly, so Login.example.com and login.example.com, or a line with a trailing space, count as different; clean the list with Trim / Clean Lines first. Every button reads the input box, so to sort a deduplicated list paste the result back in, and Numeric is unreliable when some lines do not start with a number.

### Is my list sent anywhere?

No. Sorting and deduplication run in your browser; nothing is uploaded or stored.

## Related tools

- [Trim / Clean Lines](https://phishdestroy.io/developer-tools/trim-lines)
- [Find & Replace](https://phishdestroy.io/developer-tools/find-and-replace)
- [Text Diff Viewer](https://phishdestroy.io/developer-tools/text-diff)
- [List Converter](https://phishdestroy.io/developer-tools/list-converter)
- [Blocklist Converter](https://phishdestroy.io/developer-tools/blocklist-converter)

All tools: https://phishdestroy.io/developer-tools
