Text Toolkit

Line Sorter and Deduplicator

Sort, deduplicate, shuffle, or clean up a list of lines.

0 lines

About this tool

Lists pasted from spreadsheets, logs, or CSVs often need cleanup: duplicate entries removed, blank lines stripped, or the whole thing sorted alphabetically. This tool runs those operations on a block of text treated as one item per line, applying each one directly to your text so you can chain multiple operations together.

Sorting uses your browser's language-aware comparison, so accented letters sort alongside their unaccented forms rather than after Z. Standard A to Z sorting compares text character by character, which puts "item10" before "item2", since the character 1 comes before 2. Natural sort reads runs of digits as whole numbers instead, so "item2" comes before "item10", which is usually what you want for file names, version numbers, and numbered lists. It also ignores letter case.

Shuffle uses the Fisher-Yates algorithm, which gives every possible ordering an equal chance, making it suitable for randomizing a list of names for a drawing or the order of quiz questions. For deduplicating messy data, run "Trim whitespace" first so that lines differing only by a trailing space are treated as duplicates.

Frequently asked questions

Can I apply more than one operation in a row?
Yes, each button applies to whatever is currently in the box, so you can, for example, remove empty lines and then sort what's left.
How does "Remove duplicates" decide what counts as a duplicate?
An exact, case-sensitive match against the full line, including any leading or trailing whitespace.
Why did my numbers sort as 1, 10, 2?
Standard alphabetical sorting compares text one character at a time. Use "Natural sort" instead, which treats numbers as numbers and sorts them as 1, 2, 10.
Does removing duplicates keep the original order?
Yes. The first occurrence of each line stays where it was, and later repeats are removed.

Share this tool

🔒 All tools run entirely in your browser. Nothing you type is sent anywhere.