Home › Text tools › Cleaner
Text tool

Clean up messy text online — blank lines, duplicates and spacing

Turn messy, pasted-from-anywhere text into tidy, consistent lines in one click. Kill blank lines and duplicates, fix spacing and case, sort lists — every action is instant and undoable.

Perfect for
Text pasted from a PDF Copying columns out of a spreadsheet Cleaning web-page copy before editing Deduplicating long lists & imports Normalising case for a database
How to clean your text
1
Paste your textDrop the messy content straight from a PDF, sheet or website.
2
Run the fixesTrim line ends first, then remove blanks, duplicates or extra spaces.
3
Adjust case & orderSwitch to lowercase, uppercase or title case; sort or reverse the lines.
4
Copy or downloadGrab the clean result or save it as a .txt file.

Clean-up actions

Every action can be undone, so experiment freely.

0Lines
0Words
0Characters

Why copied text is always a mess

Always trim firstInvisible trailing spaces are the sneakiest problem — they stop duplicate detection and sorting from working properly. Run "Trim line ends" before anything else and the other tools behave far better.

Copying text out of a PDF, a spreadsheet or a web page almost never gives you clean content. PDFs insert a line break at the end of every visual line, so a single paragraph arrives as six fragments. Spreadsheets add tab characters between columns. Web pages include non-breaking spaces and invisible zero-width characters that later break your search-and-replace.

This tool fixes those problems deterministically. It does not try to be clever — each button does exactly one predictable thing, so you always know what changed.

What each action does

ActionResult
Remove blank linesDeletes empty and whitespace-only lines — the standard fix for PDF pastes.
Remove duplicate linesKeeps the first occurrence of each unique line. Useful for merging two lists.
Trim line endsStrips spaces and tabs from the start and end of every line.
Collapse extra spacesReduces runs of spaces inside a line down to one.
Convert tabs to spacesReplaces each tab with four spaces, so columns line up in plain-text editors.
Strip leading numbersRemoves "1.", "2)" style prefixes from list items.

A typical workflow

  1. Paste the text.
  2. Run Trim line ends first — trailing spaces are invisible and stop other cleaning from working properly.
  3. Run Remove blank lines to collapse PDF fragments.
  4. Run Remove duplicate lines if the source contained repeated entries.
  5. Copy the result back out.
Privacy: the text you paste is processed by JavaScript inside this page. It is never sent anywhere, and it disappears when you close the tab.

Frequently asked questions

Is the text cleaner free and private?
Both. It is free and there is no sign-up, and your text is never uploaded. Everything runs locally, which is why it is safe for unpublished drafts, contracts and internal documents.
In what order should I run the actions?
Trim line ends first, then remove blank lines, then remove duplicates. The order matters: an invisible trailing space makes two otherwise identical lines look different, which defeats duplicate detection and sorting.
Can I undo a change I did not want?
Yes. Undo last step reverses your most recent action, so you can experiment freely without keeping a backup copy of the original text.
Does it count lines, words and characters?
Yes, and the counts update as you type. That is useful when a form or publishing platform imposes a maximum length and you need to trim to fit.
Will it repair text copied out of a PDF?
It fixes the mechanical damage: the line break PDFs insert at the end of every visual line, the tab characters a spreadsheet adds between columns, and the stray non-breaking or zero-width spaces a web page leaves behind. It deliberately does not try to reflow sentences or repair hyphenation, because that requires judgement and would silently change your wording.
Can I save the cleaned text as a file?
Yes. Download the result as a plain .txt file, or copy it straight to the clipboard if you are pasting into another application.