Skip to main content

Guides

Why Does My Text Paste Weird?

CleanPastedText editorial · Updated

Text workbench

Try it on your text

Cleaning mode

Removes hidden characters and standardizes AI-style punctuation.

Try a real example

Each sample contains a problem you cannot see.

Original

Pasted text

0 chars · 0 words

Cleaned

Ready to copy

0 changes

Text stays in this browser

Same words · No AI rewriting · No content logging

The hidden baggage of copy-and-paste

Copying and pasting seems simple, but under the hood it's a complex exchange of data. When you highlight text on a website and press Ctrl+C, you aren't just copying the letters. You are copying a data payload that often includes HTML, CSS styling, and hidden Unicode metadata.

When you paste that into a modern "rich" editor like Notion or Google Docs, the editor tries to "helpfully" interpret that metadata. This is where the trouble begins — and it's why the fix is to strip the payload down to clean characters before it ever reaches the editor.

1. Unicode: more than just letters

Unicode has over 140,000 characters, and many are "non-printing". There are more than a dozen different space characters alone — from the zero-width space (U+200B) to the em space (U+2003) to the narrow no-break space (U+202F). Browsers use them for layout; editors treat them as formatting triggers. The invisible character remover exists precisely for this layer.

2. PDF extraction issues

PDFs are "fixed layout" documents. To make text look like a paragraph, PDF generators insert soft hyphens (U+00AD) and forced line breaks that aren't visible until you paste the text into a "reflowable" editor like a Word document — where they reappear as broken words and chopped-up lines.

3. AI chatbot output

Answers copied from ChatGPT, Claude, or Gemini add their own baggage: the chat UI's HTML contributes non-breaking spaces (U+00A0), and the model contributes smart typography and markdown symbols that rich editors render literally. Narrow no-break spaces (U+202F) turned up in o3 and o4-mini output briefly in April 2025 — a model quirk, per OpenAI, not a watermark. The AI text cleaner handles that layer in one pass. If your workflow is AI-to-document, the guide to pasting AI text into Word and Google Docs covers the specifics.

4. Editor "help"

Rich editors auto-convert straight quotes to curly ones, hyphens to dashes, and HTML paragraphs to their own block structures — each conversion another chance for spacing and punctuation to drift from what you copied. Undoing that layer is a job for the quotes and dashes normalizer.

The solution: deterministic sanitization

To fix "weird pasting," you need to strip the text down to its bare essentials. Our tool does this by:

  • Removing stray C0 and C1 control codes — tabs and newlines are preserved, and the line, paragraph, and NEL separators (U+2028, U+2029, U+0085) become ordinary newlines rather than vanishing.
  • Normalizing mixed line endings (CRLF, CR, LF) to a single standard.
  • Replacing non-breaking spaces (U+00A0) and other exotic spaces with standard ones — the main cause of weird spacing and gaps.
  • Identifying and deleting zero-width and directional markers.

By running your text through the universal pasted-text cleaner first, you "launder" the data — removing the invisible baggage and leaving only the content you intended to copy.

Common questions

Frequently asked questions

Why does my text paste with weird formatting?

Because copy-paste transfers a data payload, not just letters. Alongside the visible text ride HTML markup, CSS styling, and hidden Unicode characters — non-breaking spaces, zero-width characters, soft hyphens, directional marks. The destination editor interprets that payload with its own rules, so the result looks different from both the source and what you expected.

Why does text copied from a PDF paste so badly?

PDFs are fixed-layout documents: the text is positioned glyph by glyph, not stored as flowing paragraphs. To reconstruct lines, PDF generators embed soft hyphens (U+00AD) and hard line breaks at the original margins. When you paste into a reflowable editor, those artifacts surface as words broken mid-line, hyphens in odd places, and single-line paragraphs.

Doesn't 'Paste without formatting' fix everything?

No. Ctrl+Shift+V (paste as plain text) drops the rich-formatting layer — fonts, colors, sizes — but keeps every character exactly as copied. Non-breaking spaces, zero-width characters, curly quotes, and directional marks are characters, not formatting, so they survive. That's why text can still search wrong, wrap wrong, or break code after a plain-text paste.

Why does AI-generated text paste weird?

Because AI answers reach your clipboard through a chat interface built in HTML, so they carry non-breaking spaces (U+00A0), occasional zero-width characters, smart quotes, and em dashes — and rich editors then mangle the markdown symbols the model used for structure. Models themselves have added characters once: in April 2025 OpenAI's o3 and o4-mini briefly inserted narrow no-break spaces (U+202F) into longer outputs, which OpenAI called a quirk of large-scale reinforcement learning rather than a watermark, and which stopped within days. Cleaning at the character level before pasting avoids the whole layer.

How do I stop text from pasting weird?

Run it through a deterministic cleaner between copy and paste. CleanPastedText removes control codes, zero-width and directional characters, converts exotic spaces to normal ones, and unifies line endings — entirely in your browser. The visible wording is untouched, and the cleaned text behaves like something you typed directly into the destination.

Continue reading

Related guides & tools