You copy a paragraph from a web page, paste it into your document, and something is off. The font changes halfway through a sentence. Extra blank lines appear from nowhere. A search later swears a word is not in the file even though you are looking straight at it. The paste itself brought the mess with it.
This guide explains why copied text arrives dirty, using the free Text Cleaner on Ovatly as the fixing tool. It separates the mess into the parts you can see, like padded lines and stacks of blank lines, and the parts you cannot, like markup, curly quotes and invisible characters. The honest boundary throughout: a cleaner fixes formatting, never wording.
Contents
- Quick answer
- Two kinds of copy: rich text and plain text
- The visible mess: spacing and blank lines
- The hidden mess: markup, quotes and invisible characters
- What the cleaner does about each part
- How to clean pasted text, step by step
- Worked example: one paste, three fixes
- Limitations and alternatives
- Common mistakes
- FAQs
- Conclusion
Quick answer
Pasted text brings weird formatting because most copying is rich text copying: alongside the words, the clipboard quietly carries the source's markup and styling instructions. Paste into an app that honours them and the text arrives wearing the web page's fonts, spacing and structure. Paste somewhere plain and the styling falls away, but the text-level mess stays: padded lines, runs of spaces, stacks of blank lines, leftover tags, curly quotes and invisible zero-width characters. The Text Cleaner removes exactly that layer with six tick-box cleanups, and shows the character counts before and after.
Two kinds of copy: rich text and plain text
Plain text is just characters: letters, digits, punctuation, spaces and line breaks. It carries no fonts, no colours and no instructions, and it pastes identically everywhere.
Rich text is words plus a hidden layer of description. Behind a paragraph on a web page sits markup that says where the paragraph starts and ends, which parts are headings or links, and how it should look. When you copy from a browser, a word processor or a PDF, that layer travels with the words. The receiving app then decides what to do with it. A word processor may keep the fonts and spacing, which is why a pasted paragraph can look like it belongs to a different document. An import tool may keep the characters but choke on the structure, which is why the same paste can look fine on screen and still fail downstream.
The weirdness is not random. Every strange artefact in a paste came from something specific in that hidden layer or in the raw characters themselves. Name the artefact and you know which cleanup removes it.
The visible mess: spacing and blank lines
The most common paste damage is spacing. Lines arrive padded with spaces at the start or end, because the source layout used spaces to position text. Words arrive separated by runs of spaces or tabs instead of one clean space, because the original was aligned in columns. Paragraphs arrive separated by three or four blank lines, because the source stacked empty lines for visual gaps.
None of this changes a single word, which is why it is easy to ignore. But it matters the moment the text is used by a machine: a padded line will not match the same line unpadded, and a name with two spaces inside it imports as a different value. Spacing mess is cosmetic for a human reader and structural for everything else.
The hidden mess: markup, quotes and invisible characters
The second layer is invisible. If the copied text passed through HTML at any point, tags can come with it: fragments like <p> or <div> sitting in the text itself. Even when no tags are visible, the characters can be non-standard. Word processors and web pages use curly quotes where plain text systems expect straight ones, and longer dash characters where plain text expects a simple hyphen.
Strangest of all are zero-width characters: characters that occupy a position in the text but print as nothing. They slip in from web pages and documents without anyone typing them. Their damage is subtle: two words that look identical compare as different in a search or in code, because one has an invisible passenger. If a find command has ever failed on a word you could see, a zero-width character is a prime suspect.
What the cleaner does about each part
The Text Cleaner offers six cleanups, and you tick only the ones you want. Line trimming removes padding spaces at the start and end of each line. Space collapsing squeezes runs of spaces and tabs inside a line down to single spaces; it works inside lines only and never touches the line breaks themselves. Blank line removal clears the stacked empty lines. HTML stripping removes tags while keeping the text between them; it does not decode HTML entities, so an encoded character stays encoded. Quote normalization turns curly quotes straight, and also turns the longer dash characters, the en dash and the em dash, into simple hyphens, which suits plain text targets. Zero-width removal deletes the invisible characters so the text behaves the way it looks.
Two guarantees hold across all six. The cleaner never rewords anything: your sentences come out word for word as they went in. And it shows the character count before and after, so the size of the mess is a number, not a guess.
How to clean pasted text, step by step
- Open the Text Cleaner and paste the messy text in the box.
- Tick the cleanups to apply: line trimming, space collapsing, blank line removal, HTML stripping, quote normalization, zero-width removal. For a typical web paste, the first three cover the visible mess; add zero-width removal if the text is headed for search, code or an import.
- Compare the character counts before and after. A large drop means the paste carried a lot of hidden weight.
- Copy or download the cleaned text, and paste it into its destination.
Worked example: one paste, three fixes
The tool's own documented example shows how ordinary the mess is. The input is a short paste: 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". On screen it reads as two harmless lines. Underneath, it carries padding, tripled spaces and a stack of blank lines.
With line trimming, space collapsing and blank line removal ticked, the result is:
Hello world
Next line
Same words, same order, nothing reworded. What left was pure formatting: the padding, the extra spaces and the spare blank lines. The pasted text was never badly written; it was badly packaged, and the packaging is what the cleaner strips.
Limitations and alternatives
The cleaner works at the level of characters and lines; some paste problems live above that level. Stripping HTML from a full page source leaves the text of any script and style blocks behind, so pasted article HTML gives the cleanest result. Encoded entities stay encoded, because decoding is a different job from stripping tags. And no cleanup can repair meaning: if the source text itself is garbled or badly written, cleaning preserves the problem in tidier spacing.
The main alternative is paste discipline: many apps offer a paste-as-plain-text option, which drops the styling layer before it lands. That prevents the visible surprises, but does nothing about padded lines, blank line stacks or zero-width characters already inside the text, which is why a cleaning pass still earns its place.
Common mistakes
- Cleaning everything by default. Tick only what the paste needs. Normalizing quotes in text destined for print, for example, changes characters a designer may have wanted.
- Blaming the words. When a search or import fails on pasted text, suspect the invisible layer first, not the wording.
- Expecting decoded entities. HTML stripping removes tags only. An encoded ampersand in the source stays encoded in the output.
- Skipping the count check. The before and after counts are the receipt. If the count barely moved, the paste was already clean.
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 cleaning 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 the cleaner strip the tags out of pasted HTML? Yes. Stripping removes the tags only; the text between the tags stays, and HTML entities are not decoded.
Does space collapsing remove my line breaks? No. Space collapsing affects spaces and tabs inside lines, never the line breaks themselves.
Is my text uploaded? No. Cleaning happens in your browser on your device.
Conclusion
Weird pasted formatting is not a mystery and not your fault. Rich text carries a hidden layer, and that layer sheds spacing, blank lines, tags, curly quotes and invisible characters into everything you paste. Clean the layer off with the Text Cleaner, tick only the fixes the paste needs, and check the character counts to confirm what left. More guides live in the Text and Writing Tools guides.
Related guide: How to Clean Up a Transcript Before Editing It.