Text Cleaner & List Tools

Tidy text copied from PDFs, emails and spreadsheets, and clean up lists of names, numbers or keywords: remove extra spaces, delete duplicate lines, sort, and convert a column into a comma-separated list.

  • Runs in your browser. Nothing is uploaded
  • Free, no sign-up
  • Works offline once opened

Removes double spaces, tabs and extra blank lines, and can join lines broken by PDFs into paragraphs.

Your files stay here

  • Text Cleaner & List Tools runs inside this browser tab.
  • Nothing is sent to a server, so there is nothing to delete later.
  • Close the tab and it is gone from DeskTray.

Often used next

Looking for something else?

DeskTray has hundreds of free tools that work the same way.

How to clean text and lists

  1. Choose what to do: Clean spaces, Remove duplicates, Sort lines or Comma list.
  2. Paste your text or list, one item per line, or open a .txt or .csv file.
  3. Pick the options. The result updates as you type.
  4. Copy or save the result, or press “Use as input” to run another tool on it.

Features

  • Four jobs on one page: clean spaces, remove duplicate lines, sort lines, comma lists
  • Your text stays when you switch, and “Use as input” chains the jobs
  • Join lines broken by PDFs into paragraphs
  • Natural sorting (2 before 10), sort by length, reverse and secure shuffle
  • Column ⇄ list with any delimiter and optional quotes
  • Open .txt and .csv files, save or copy the result

Remove extra spaces and broken line breaks

Text copied from a PDF, a scanned document or a web page rarely pastes cleanly. Words are separated by two or three spaces, tabs creep in, every line of a paragraph ends with a hard line break, and there are rows of empty lines between sections. Clean spaces fixes all of that in one go: it collapses runs of spaces into one, turns tabs into spaces, trims the start and end of every line and reduces several blank lines to a single one. Non-breaking spaces from web pages are treated as ordinary spaces.

For text from a PDF, tick “Join broken lines into paragraphs”. Lines inside a paragraph are joined with a space, a word split with a hyphen at the end of a line is put back together, and the blank lines between paragraphs are kept, so the structure survives. “Remove all line breaks” goes further and makes the whole text one line, which suits a form field that rejects line breaks. The note under the result says how many characters were removed.

Remove duplicate lines from a list

Remove duplicates keeps the first copy of every line, in its original place, and drops the repeats. It suits mailing lists, phone numbers collected from several sheets, keyword lists, roll numbers and product codes. “Ignore case” treats Apple and apple as the same line, “Ignore leading/trailing spaces” catches copies that differ only by a stray space, and “Sort result” gives you the unique lines in alphabetical order. The note shows how many lines went in, how many came out and how many were removed.

Sort lines alphabetically, by number or by length

  • A → Z and Z → A sort alphabetically with natural ordering, so “Class 2” comes before “Class 10”. Tick Case-sensitive to keep capitals and small letters apart.
  • Numbers 1 → 9 sorts lines by the number they contain, useful for amounts, marks or file names with numbers.
  • Shortest first and Longest first sort by the length of each line.
  • Reverse order flips the list, and Shuffle puts it in a random order using your browser’s secure random generator, fair for a speaking order, a quiz round or a duty roster.

Lines in Hindi, Telugu and other Indian scripts are sorted too, using your browser’s language rules. Empty lines are dropped unless you untick that option.

Comma separator: column to list and back

Comma list turns a column, one item per line as it comes out of Excel or Google Sheets, into a single line separated by commas, semicolons, pipes, spaces or tabs. Add single quotes to build an SQL IN (…) clause, or double quotes for a JSON array or code. Semicolons suit the To field of Outlook, which expects addresses separated that way. “List → column” does the reverse and splits a comma-separated list back into lines, removing surrounding quotes, and Swap flips between the two.

Chain the jobs together

The text stays in the box when you switch between the four jobs, and “Use as input” replaces the input with the result, so you can run one job after another. A messy column of email addresses can be cleaned of stray spaces, stripped of duplicates with Ignore case, sorted A → Z and finally joined with commas, ready to paste into an email. Everything runs in your browser, so customer lists and phone numbers are never uploaded.

Frequently asked questions

How do I fix line breaks from a PDF?

Choose Clean spaces and tick “Join broken lines into paragraphs”. Lines inside a paragraph are joined, words split with a hyphen at the end of a line are rejoined, and blank lines between paragraphs are kept.

Does it remove non-breaking spaces?

Yes. Non-breaking spaces from web pages are turned into normal spaces first, so they are cleaned like any other space.

Is the original order kept when duplicates are removed?

Yes. The first copy of each line stays in its place. Tick “Sort result” if you want the unique lines in alphabetical order instead.

Why does 10 come after 2 when sorting?

The sorter uses natural ordering, so numbers inside text are compared by value: “item 2” comes before “item 10”. Choose “Numbers 1 → 9” to sort lines by the number they contain.

Is the shuffle random?

Yes. Shuffle uses your browser’s secure random number generator, so every order is equally likely. It is fair for picking a speaking order or a team list.

How do I make a list for an SQL IN clause?

Choose Comma list, single quotes and “Comma + space”. The output looks like 'a', 'b', 'c', ready to paste inside IN (…).

Can it split a comma-separated list into lines?

Yes. In Comma list choose “List → column”, or press Swap after joining. Quotes around items are removed.

Can it handle large lists?

Yes. Lists with hundreds of thousands of lines are processed in your browser in a moment, and nothing is uploaded.

More Text tools

All 30 Text Tools