Text copied from a web page, a PDF or a colleague's document almost never arrives clean. Lines are padded with spaces, blank lines stack up in towers, quotes come through curly, and invisible characters ride along that later break searches and imports. The mess is invisible right up to the moment it causes a confusing failure somewhere else.

This guide shows how to clean copied text with the free Text Cleaner on Ovatly. It covers the six cleanups the tool offers, what each one actually changes, and the honest boundary of the whole exercise: cleaning fixes spacing, blank lines, tags, quote style and invisible characters. It never rewords your text, and it cannot fix text that is badly written, only text that is badly formatted.

Contents

  • Quick answer
  • The six cleanups, one by one
  • What cleaning cannot do
  • How to clean copied text, step by step
  • Worked example: one paste, three fixes
  • Limitations and alternatives
  • Common mistakes
  • FAQs
  • Conclusion

Quick answer

Open the Text Cleaner, paste the messy text, and tick only the cleanups you want: line trimming, space collapsing, blank line removal, HTML stripping, quote normalization and zero-width removal. Compare the character counts before and after, then copy or download the cleaned text. Cleaning happens in your browser, so your text is not uploaded anywhere, and no cleanup rewords anything.

The six cleanups, one by one

Line trimming removes the padding at the start and end of each line: the stray spaces and tabs that copy and paste adds, and that later make lines compare as different when they look identical.

Space collapsing squeezes runs of spaces and tabs inside a line down to single spaces. It affects spaces and tabs inside lines, never the line breaks themselves, so your paragraph structure survives intact.

Blank line removal clears the stacks of empty lines that pasted text accumulates, leaving single paragraph breaks where the towers stood.

HTML stripping removes pasted HTML tags. Only the tags go; the text between tags stays. One limit matters here: HTML entities are not decoded, so an entity in the source stays as it is rather than turning into the character it represents.

Quote normalization converts curly quotes into straight quotes, the kind plain-text systems and code expect. The same cleanup also turns en dashes and em dashes into simple hyphens, which suits plain-text targets.

Zero-width removal deletes invisible zero-width characters copied from web pages and documents. They are the sneakiest item on this list: two words can look identical on screen yet compare as different in a search because one of them carries an invisible passenger. Removing them makes text behave the way it looks.

What cleaning cannot do

Every cleanup on the list is mechanical. None of them reads your text, understands it or rewrites it. A rambling sentence stays rambling; a typo stays a typo. That restraint is deliberate: because only the cleanups you tick are applied, and each one changes exactly one kind of formatting, you can predict the result before you copy it. If the text itself needs editing, that is a separate job with a separate tool, and cleaning first is still the right order, because editing messy text means fighting the mess at the same time.

How to clean copied text, step by step

  1. Open the Text Cleaner and paste the messy text in the box.
  2. Tick the cleanups to apply: line trimming, space collapsing, blank line removal, HTML stripping, quote normalization, zero-width removal.
  3. Compare the character counts before and after; the drop tells you how much invisible material the paste was carrying.
  4. Copy the cleaned text, or download it, and use it where it was headed.

A practical habit: tick conservatively. If you only suspect spacing problems, tick trimming and collapsing and leave the rest off. You can always run the text through again with more cleanups ticked, and a smaller change is easier to verify.

Worked example: one paste, three fixes

Take this input, written out the way a bad paste actually looks: two spaces, the word Hello, three spaces, the word world, two more spaces, then four line breaks, then the word Next, two spaces, and the word line.

With trim, collapse spaces and remove duplicate blank lines ticked, the result is:

Hello world

Next line

Three small changes did all of it. Trimming removed the padding at the edges of each line. Collapsing turned the three spaces between Hello and world into one, and the two spaces in the second line into one. Blank line removal took the four line breaks down to a single paragraph break. The words themselves never changed, because no cleanup in the tool touches wording. The character count falls by exactly the number of stray characters removed, which is why comparing the counts before and after is such a useful check.

Limitations and alternatives

The cleaner works on pasted text, one paste at a time. It can take a whole web page if you paste the page source and tick Strip HTML tags, which leaves the readable text; but scripts and style blocks in the source will leave their text behind, so pasted article HTML works best and raw page source needs a skim afterwards.

It also stops at formatting. It does not remove line breaks that wrap mid-sentence, does not deduplicate repeated lines, and does not sort anything; those are separate jobs covered by the other tools in the Text and Writing Tools category. And like every tool here, it runs on your device, so a truly enormous paste is bounded by your browser rather than by a server.

Common mistakes

  • Ticking everything by default. Each cleanup changes something real. Tick what the paste actually needs, and check the result.
  • Expecting HTML stripping to decode entities. It removes tags only; entities are left as they are.
  • Expecting cleaner text to mean better text. Cleaning fixes formatting, not wording, structure or accuracy.
  • Skipping the character count check. A count that barely moves when you expected a big cleanup usually means the wrong cleanup was ticked, or the mess is of a kind the tool does not handle.
  • Cleaning after importing. Clean before the text goes into the spreadsheet, CMS or codebase, not after the invisible characters have already broken a search or a match.

FAQs

What are zero-width characters and why remove them? They are invisible characters copied from web pages and documents. They make two identical-looking words compare as different in searches and code. Removing them makes text behave as it looks.

Will it change my wording? No cleanup here rewords anything. Only spacing, blank lines, tags, quote style and invisible characters are touched, and only the ones you tick.

Can it clean a whole web page? Paste the page source and tick Strip HTML tags to get the readable text. Scripts and style blocks in the source will leave their text behind, so pasted article HTML works best.

Does stripping HTML decode entities like &? No. Stripping removes the tags only; the text between tags stays, and HTML entities are not decoded.

Is my text uploaded? No. Cleaning happens in your browser on your device.

Conclusion

Clean text is boring in the best way: lines with no padding, single spaces, one blank line between paragraphs, straight quotes, and no invisible passengers. The Text Cleaner gets a messy paste to that state with six predictable cleanups, all of them optional, none of them touching your words. Once the text is clean, order is often the next job, and How to Sort a List Alphabetically Online covers it. More guides for the neighbouring jobs live in the Text and Writing Tools archive.