How to Sort and Clean Up Lines of Text
Text & Writing · Step-by-step guide · 4 steps · 2 min read
Text Toolkit tidies up lists. You can sort names, remove repeats, delete empty lines and more. Each line counts as one item.
Open the Text Toolkit — Sort, Dedupe & Clean Lines
In the pictures, orange letters like A show where to look. Each step tells you its letter.
Step 1: Paste your list
Put your text in Your text — one item per line. Put one item on each line. See A in the picture.
Step 2: Sort it
In 1 Sort, press a button like A → Z, Z → A or By length. You can also Shuffle the list or Reverse order. See B in the picture.
Step 3: Clean it
In 2 Clean up, press Remove duplicates, Remove blank lines or Trim spaces. Each button works right away. You can press more than one. See C in the picture.

Step 4: Copy the result
Check your list. Then press Copy Result or Download .txt. Made a mistake? Press Undo. See D in the picture.

Tips and questions
Do capital letters matter when removing repeats?
Yes, by default. "Apple" and "apple" count as two items. Tick Ignore capital letters when sorting and removing duplicates to treat them as one.
Can I add text to the start of every line?
Yes. Open More tools. Type in Prefix each line or Suffix each line. Then press Apply prefix / suffix.
Can I split a list with commas into lines?
Yes. Open More tools and press Split on commas. To join lines back, press Join into one line.
Can I find and replace words?
Yes. Open More tools and use Find and replace. Coders can tick Use regular expression for pattern search.
Privacy
Everything runs in your browser. Your lists never leave your device.
Try it now
The Text Toolkit — Sort, Dedupe & Clean Lines is free. You do not need an account.
Open the Text Toolkit — Sort, Dedupe & Clean Lines