Dad’s Words tools

Sort Lines

Sort lines alphabetically, reverse, or deduplicate — instantly in your browser.

Input
Sorted Output

Sorted output will appear here.

Paste, upload, or drop a file in the input panel to get started.

Three sort modes

"A → Z" sorts lines ascending using locale-aware comparison (localeCompare). "Z → A" sorts descending with the same comparator. "Unique" deduplicates lines (case-sensitive, exact match) and then sorts ascending — it removes duplicate lines but does not sort within groups of duplicates before removal.

ModeInputOutput
A → Zbanana apple cherryapple banana cherry
Z → Abanana apple cherrycherry banana apple
Uniqueapple banana apple cherryapple banana cherry
A → ZBanana appleapple Banana (locale-dependent)
Warning: The sort is case-sensitive by default in JavaScript's localeCompare. Depending on the system locale, "Banana" may sort before or after "apple". If you need case-insensitive sorting, convert all lines to lowercase first.

Empty lines and whitespace

Empty lines are not filtered out before sorting — they participate in the sort as empty strings and typically sort to the top in ascending order. The Unique mode removes duplicate empty lines. If you want to remove empty lines entirely before sorting, use the Remove Empty Lines tool first.

Frequently Asked Questions

Your files stay on your computer. Dad promised.

Words tools

Search the Words tools