Skip to main content

Fix Formatting

Fix Weird Spacing When Pasting Text

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

Why does my text paste with weird gaps and irregular spacing?

"Weird spacing" is usually caused by three hidden factors: non-breaking spaces (NBSP), irregular newline characters, and trailing whitespace. When you copy text from a website, the browser's layout engine often includes these special characters to maintain the "look" of the page — but they fall apart when pasted into a standard editor.

The NBSP gap

Websites use U+00A0 (NBSP) to prevent line breaks. These don't behave like normal spaces in Notion or Docs, often causing huge, un-deletable gaps at the ends of lines.

Newline chaos

Windows (CRLF), classic Mac (CR), and Linux (LF) all encode "Enter" differently. Mixing them produces double or triple spacing you didn't ask for.

Trailing bloat

Invisible spaces at the end of a line can push text over the margin, causing "ghost" line breaks that make paragraphs look jagged.

How to fix text that won't wrap correctly

Our spacing fixer doesn't just find-and-replace — it normalizes. It converts every common non-standard space to the standard ASCII space (U+0020) — U+00A0, U+202F, the U+2000 to U+200A range, U+205F, and U+3000, each enumerated in the character reference — collapses excessive blank lines while preserving paragraph structure, and trims every line to its last visible character. If non-breaking spaces are your main problem, the dedicated NBSP remover explains that character in depth.

This ensures your text wraps naturally according to the margins of the destination editor — whether that's a Notion block, a Slack message, or a Google Doc. For every other kind of paste damage (invisible characters, typography, encoding), the universal text cleaner handles the full sweep in one pass.

Does AI-generated text have spacing problems too?

Yes — AI output is now one of the most common sources of weird spacing, mainly because the chat window is HTML: copied answers carry non-breaking spaces (U+00A0) that look identical to regular spaces yet wrap and search differently. Narrow no-break spaces (U+202F) showed up in o3 and o4-mini output for a few days in April 2025 — OpenAI's explanation was a training quirk, not a watermark — and the cleaner converts both to ordinary spaces regardless of where they came from. If you're moving AI drafts into documents, the AI text cleaner handles spacing and typography in one pass — or see the guide to pasting AI text into Word and Google Docs, or read why text pastes weird for the complete technical explanation.

Common questions

Frequently asked questions

Why does my text have weird spacing when I paste it?

Copied text carries hidden characters the source used for layout: non-breaking spaces (U+00A0) that forbid line wrapping, narrow no-break spaces (U+202F), mixed newline conventions from Windows and Unix, and trailing whitespace at line ends. Your destination editor interprets them differently than the source did, producing gaps, jagged paragraphs, and lines that refuse to wrap.

How do I remove weird spaces from text?

Paste the text into a whitespace normalizer like CleanPastedText. It converts every common non-standard space — non-breaking (U+00A0), narrow no-break (U+202F), the U+2000 to U+200A range, medium mathematical (U+205F), and ideographic (U+3000) — into the standard U+0020 space, trims trailing whitespace, and collapses excessive blank lines while preserving paragraph structure. The 'What changed' report shows exactly how many were fixed.

Why can't I delete a gap in my document?

The 'un-deletable' gap is usually a non-breaking space or a cluster of them. Because an NBSP glues the words around it into one unbreakable unit, the layout engine pushes the whole block around, and deleting one visible space doesn't remove its invisible neighbors. Converting all NBSPs to normal spaces removes the gap at the source.

Why does pasted text get double line breaks?

Windows encodes 'Enter' as CRLF (U+000D followed by U+000A) while Mac and Linux use LF alone. When conventions mix — or when an editor converts HTML paragraphs into blank-line-separated text — you get doubled or tripled spacing you never typed. Normalizing every line ending to a single LF fixes it.

Does AI-generated text cause weird spacing?

Yes, frequently — mostly because chat interfaces are HTML, so copied answers carry non-breaking spaces (U+00A0) and occasional zero-width characters that look identical to normal spaces but wrap differently. Narrow no-break spaces (U+202F) turned up in OpenAI's o3 and o4-mini output in April 2025 before OpenAI removed them within days, calling them a quirk of large-scale reinforcement learning. Cleaning AI text before pasting it into Word, Docs, or Notion prevents the spacing glitches entirely.

Continue reading

Related guides & tools