Text cleaner: remove duplicates, sort and replace
Remove duplicate or empty lines, sort lists A-Z or by number, add text to every line, and find and replace.
Clean lines
Sort lines
Add text to every line
Find and replace
Filter lines
๐ Works offline in your browser. Your files are not uploaded anywhere.
How to use Text Cleaner
- Paste your list or text, one item per line (names, emails, keywords, URLs, product codesโฆ).
- Tap a button: remove duplicates, remove empty lines, sort, shuffle or number the lines.
- Use Add text to every line or Find and replace for bulk edits. Press Undo if a change is not what you wanted.
- Copy the cleaned text or download it as a .txt file.
About this tool
Lists copied from spreadsheets, emails, chat exports and websites are messy: the same email address appears three times, there are blank lines everywhere, spaces hide at the end of lines and nothing is in order. This text cleaner fixes all of that in a few taps, right in your browser. It is built for everyday jobs such as cleaning a guest list, merging two mailing lists, preparing keywords for an ad campaign, sorting product codes or making a random order for a quiz or a draw.
What each tool does
| Tool | Example |
|---|---|
| Remove duplicate lines | apple, Apple, apple โ apple, Apple (or just apple with Ignore case) |
| Sort A โ Z | Natural order: item 2 comes before item 10 |
| Numbers 1 โ 9 | Sorts by the first number in each line, so "Room 7", "Room 12" sort correctly; decimals and thousands separators are understood |
| Shortest first | Sorts by length, useful for finding odd entries |
| Shuffle | Random order using your browser's secure random generator |
| Add text to every line | john โ john@example.com, or add quotes and a comma to make a code list |
| Remove numbers / bullets | "1. Milk" or "โข Milk" โ "Milk" |
Find and replace with regular expressions
Plain find and replace changes every match of a word or phrase. Tick Whole words so that "cat" does not change "category". For advanced patterns, tick Regular expression: \d+ finds any number, ^ means the start of a line, \s+$ finds spaces at line ends, and $1 in the replacement inserts the first bracketed group. For example, find (\w+)@(\w+) and replace with $2: $1. Type \n in the replacement to insert a line break. The match counter shows how many places will change before you press Replace all.
Empty lines are kept where they are when you sort or remove duplicates, so paragraphs don't get mixed up; use Remove empty lines to drop them. Your text is saved in this browser, so it is still there if you close the tab by mistake.
Frequently asked questions
How do I remove duplicate lines but keep the first one?
Paste the list and tap Remove duplicate lines. The first time a line appears is kept, later copies are removed, and the order of the list stays the same.
Does it treat "Apple" and "apple" as duplicates?
Only if you tick Ignore case. Without it, lines must match exactly. Spaces at the start and end of lines are ignored by default; untick that option for an exact match.
Can I sort numbers correctly (2 before 10)?
Yes. Use Numbers 1 โ 9, which sorts by the first number found in each line. The A โ Z sort also uses natural order, so "file2" comes before "file10".
Is there a limit on how many lines I can clean?
No set limit. Lists with hundreds of thousands of lines work on a computer; very large lists may take a second on older phones.
Is my list uploaded anywhere?
No. All cleaning happens in your browser and your text is only stored on your own device.