Text · Made a little simpler

Text cleaner & line sorter

Trim whitespace, remove empty or duplicate items, sort naturally, or reverse a list. Choose line, comma, semicolon, tab or custom separators for input and output.

Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device

Undo: Ctrl/Cmd+Z · Redo: Ctrl/Cmd+Shift+Z or Ctrl+Y. Up to 20 steps and 4 million retained characters in this tab. Clear discards history.

Separators are literal text, not CSV quoting or regular expressions.

Add this tool to your website

Paste this code into your page to add the tool and a visible ToolMellow credit link.

HTML embed code
Preview embed

Text cleaner & line sorter: how to use it

  1. Paste a list or load a local text file.
  2. Choose input and output separators, whitespace, duplicate, case, and ordering options.
  3. Clean the text, review it, then copy or download your list.

Limits and notes

Input and output are limited to 1 million UTF-16 units; text files must be smaller than 4 MB. Custom separators contain 1–20 UTF-16 units and are literal text, not CSV quoting or regular expressions. Operations run in this order: trim, collapse spaces, remove empty lines, deduplicate, then reorder. The first duplicate is kept. Sorting uses the selected language with natural numeric order. Choose from all eleven supported text languages. Line-break input accepts CRLF, CR and LF; line-break output uses LF. Items can instead be joined with another separator.

How your privacy works →

Text cleaner & line sorter: common questions

Will Apple and apple be treated as duplicates?

Only if Ignore case is selected. By default, duplicate matching is case-sensitive. Trimming happens before duplicate matching when enabled.

Can I keep the original order?

Yes. Keep original order is the default. You can also choose ascending, descending, or reverse order. The original input remains separate from the result.

How do I remove duplicate lines?

Use Line breaks input and enable Remove duplicate lines. Matching uses the item after earlier whitespace steps. It keeps the first retained spelling; Ignore case changes the key to selected-locale lowercase.

How do I convert commas to line breaks?

For a plain list, select Comma input and Line breaks output. Review trim, empty and duplicate settings before cleaning. Quoted CSV fields need a CSV-aware parser because commas inside quotes still split here.

Tool guides