Text Cleaner

Paste text copied from a PDF, website, email or WhatsApp and get clean plain text back as you type. Tick the clean-up steps you want: trim every line, squeeze runs of spaces, drop or limit blank lines, remove invisible characters, remove repeated lines, straighten curly quotes, strip HTML tags or sort the lines. The same page also sorts, reverses, shuffles, numbers and counts lines. Your text stays in your browser.

What to do
Blank lines
Sort
Your text
Result
Lines in
0
Lines out
0
Blank lines in
0
Longest line
0

Everything runs in your browser. What you type never leaves this device.

Features

  • Several clean-up steps at once, result updates as you type

  • Trim spaces at the start and end of every line

  • Collapse double spaces and remove the space before commas and full stops

  • Remove all blank lines or keep at most one between paragraphs

  • Remove zero-width spaces and turn non-breaking spaces into normal ones

  • Optional: remove duplicate lines, straighten quotes, strip HTML, sort A-Z

  • Line counts before and after; copy or download as .txt

  • Runs in your browser: your text is never uploaded. Free, no signup

When a quick clean-up helps

Text copied from a PDF

PDF copies often bring broken spacing and empty lines. Clean them before pasting into Word, Google Docs or an email.

Lists for a spreadsheet or CRM

Trim and dedupe a list of names, numbers or emails so every row imports cleanly.

Content for a website or app

Remove stray HTML, invisible characters and curly quotes that break forms, code or search.

What each clean-up step does

The steps, in order

  • Strip HTML tags runs first, so tags never reach the other steps.
  • Remove invisible characters deletes zero-width spaces, byte order marks and soft hyphens, and turns non-breaking spaces into normal spaces.
  • Straight quotes turns curly quotes and apostrophes into plain ' and ".
  • Remove extra spaces squeezes runs of spaces and tabs into one space and removes a space before , . ; : ! and ?.
  • Trim each line removes spaces at the start and end of every line.
  • Blank lines: Keep leaves them, Max one keeps a single blank line between paragraphs, Remove deletes them all.
  • Remove duplicate lines keeps the first copy of each line, ignoring capitals and outer spaces. Sort orders the lines A-Z or Z-A with numbers in number order.

What it does not change

Words, spelling and capitals stay as you wrote them. Hindi and other Indian scripts are safe: the zero-width joiners they need are kept. To find out exactly which hidden characters a text contains, use the Invisible Character Detector.

Other line tools

Text Cleaner - FAQ