Home/Text Sort / Unique
Text

Text Sort / Unique

Sort, deduplicate and shuffle lines

Order
Input
Result

Overview: Text Sort / Unique sorts and deduplicates text line by line. It supports ascending, descending and random ordering, and offers optional case sensitivity, duplicate removal and natural sort so that item2<item10. It is a great tool for line-oriented data such as configuration entries, word lists, log lines or code snippets.

How to use: Step 1 — paste the text you want to sort on the left (one item per line). Step 2 — pick the sort mode in the toolbar: A→Z is ascending, Z→A is descending, "Shuffle" randomises the order. Step 3 — tick "Case-sensitive" to sort with case (uppercase letters come first) or leave it off to compare after lower-casing; tick "Remove duplicates" to keep only the first occurrence of each line; tick "Natural sort" so that item2<item10 instead of dictionary order. Step 4 — the right panel shows the result live.

Typical scenarios: Organise IP allow-lists, domain lists or word lists alphabetically; deduplicate column names exported from a database for documentation; shuffle lottery names or question banks; sort package.json dependencies; count unique error lines from log analysis; sort file-name lists in natural order.

Technical notes: Sorting uses JavaScript’s localeCompare (with { numeric: true } for natural sort) which handles mixed Chinese/English correctly. Shuffling uses the Fisher-Yates algorithm for a uniform distribution. Deduplication uses a hash set for good performance. Blank lines participate in sorting and deduplication as normal lines. Only the order of lines is changed — line content is preserved.

Privacy: Sorting, deduplication and shuffling all happen locally in your browser and no text is uploaded, so it is safe to use with internal lists or word lists.

Frequently Asked Questions

How do I use Text Sort / Unique?
Step 2 — pick the sort mode in the toolbar: A→Z is ascending, Z→A is descending, "Shuffle" randomises the order. Step 4 — the right panel shows the result live.
What can Text Sort / Unique do?
Typical scenarios: Organise IP allow-lists, domain lists or word lists alphabetically; deduplicate column names exported from a database for documentation; shuffle lottery names or question banks; sort package.json dependencies; count…
Is my data private when I use Text Sort / Unique?
Privacy: Sorting, deduplication and shuffling all happen locally in your browser and no text is uploaded, so it is safe to use with internal lists or word lists. Privacy: Sorting, deduplication and shuffling all happen locally in your browser and no text is uploaded, so it is safe to use with internal lists or word…
What technical details should I know about Text Sort / Unique?
Shuffling uses the Fisher-Yates algorithm for a uniform distribution. Deduplication uses a hash set for good performance.