aitextcleaner.top

Clean AI Text — Remove Hidden Characters and Messy Formatting

Not just invisible characters. Also the doubled spacing, stray blank lines and mixed whitespace that come with copy-paste.

Hidden character report

Paste text to scan

What clean means on this page

Two separate jobs, done in one pass. The first is invisible characters — the zero-width and directional code points that leave no visible trace. The second is visible-but-wrong formatting: three blank lines where you wanted one, a paragraph indented with a mixture of tabs and spaces, line endings from two different operating systems in the same document.

Both come from the same root cause. Copying rendered text through several applications means carrying several applications' idea of what whitespace is. Cleaning is the process of settling on one.

Formatting problems that survive copy-paste

Non-breaking spaces are the worst offenders, because they look exactly like spaces and behave nothing like them. A line that will not wrap, a table column that refuses to align, a search that misses a phrase you can see — all three are commonly a single non-breaking space.

Then there are the line endings. Windows uses two characters per break, most other systems use one. Paste one into the other and the leftover renders as an extra blank line, which is why text copied from a document often arrives double-spaced.

A repeatable cleanup routine

Paste into the left box and press Clean. Read the report before you copy — it tells you which category of problem you had. Zero-width characters in bulk mean the text came straight from a rendered answer. A handful of non-breaking spaces mean it went through a word processor.

Then copy the result and paste it into its destination. If the destination is a web form that strips formatting anyway, you lose nothing. If it is an editor, you have removed the layer that editors handle worst.

Before you hit publish

Run the headline and any subheadings through separately. Invisible characters in a title cause layout problems that are hard to attribute, and a title is short enough to check in seconds.

For long pieces, clean the whole draft in one pass and use the report as a signal about your own workflow. If every draft reports the same character types in the same proportions, the fix belongs upstream — in how you copy, or in what you copy through.

What AI text actually contains — and why your eyes miss it

When a language model produces text, the output is a sequence of tokens rendered into Unicode. That rendering process introduces several categories of character that look correct on screen but behave badly everywhere else. Knowing which characters appear and why makes cleaning less of a guessing game.

Smart quotes — the curly variants ‘’ and “” — are the most visible. Many models produce them because their training data contained them. The problem is not appearance but matching. A search for the word don't using a straight apostrophe will not find a paragraph containing don’t with a right single quotation mark. Regex that looks for quoted strings with " will miss passages surrounded by “ and ”. If you pipe AI output into any system that does pattern matching — a linter, a template engine, a find-and-replace script — straight quotes are what you need.

Non-breaking spaces (U+00A0) are invisible by design. They were invented to prevent a line from breaking between two words — for example, between a number and its unit. Models pick them up from training corpora that used them correctly, and they arrive in your text without any signal that they are present. A CMS search index treats U+00A0 as a different character from U+0020, so the phrase appears twice and matches neither query. A WordPress editor will sometimes convert a U+00A0 into its HTML entity   on save, producing output like cost per click mid-sentence in the raw HTML.

Zero-width characters — primarily U+200B (zero-width space) and U+200C (zero-width non-joiner) — have no width and cast no shadow. They exist in rendered text for ligature control and bidirectional text handling. In plain prose they do nothing useful and break many downstream systems: CSV parsers that count field delimiters, tokenizers that split on Unicode word boundaries, and content-moderation filters that score n-grams. The only reliable way to find them is to examine the raw byte sequence, which is what this tool does.

Markdown remnants appear when a model is asked to produce plain text but defaults to Markdown syntax. The most common are double asterisks around bold phrases (**like this**), underscore italics, and pipe-delimited table rows. These pass through to the reader as literal punctuation if the destination does not render Markdown. A headline like **Key Findings** published to a plain-text email list reaches readers as literal asterisks. Tables with pipe characters and dashes end up as visual noise in any system that expects prose.

Knowing the category tells you what to clean. Smart quotes and Markdown are visible and easy to audit. Non-breaking spaces and zero-width characters require a tool that operates on code points, not glyphs — which is exactly what this page does.

Where to put the cleaning step in your workflow

The right moment to clean is the moment before text crosses a boundary — before it moves from one system to another. Every boundary is a potential mismatch between what the sending system considers normal whitespace and what the receiving system expects.

Before pasting into a CMS: Paste raw AI output into the tool, clean it, then paste the result into your CMS. Do not paste raw output directly and then clean inside the CMS editor, because some editors silently re-encode characters on every keystroke and you may end up cleaning a different character set than the one the model produced.

Before importing into a spreadsheet: Excel and Google Sheets both handle Unicode reasonably well, but non-breaking spaces inside cell values will cause TRIM() to leave trailing gaps that look like empty space. A cell containing a product name with a trailing U+00A0 will not match a VLOOKUP for that name with a trailing space, even though both look identical. Clean before import to avoid ghost mismatches that take hours to diagnose.

Before feeding into a second API call: If you are chaining calls — using the output of one model as the input of another, or passing AI text to an embedding API for semantic search — residual invisible characters widen the token count and add noise to the embedding. More practically, prompts that include smart quotes may behave differently from prompts with straight quotes because the model tokenizes them differently. Cleaning the intermediate text keeps the chain predictable.

What not to clean: If the destination renders Markdown, keep Markdown. If the destination expects HTML entities, do not strip them. The minimum necessary cleaning principle says: identify what the destination cannot handle and remove only that. This tool reports what it found so you can decide which categories to act on. A document going into a Markdown renderer needs zero-width characters removed but not asterisks. A document going into plain email needs both removed.

For high-volume production use, the same logic applies at scale. When you are processing hundreds of pieces, run the cleaning step as a transformation stage in your pipeline — after generation and before storage. That way your database never accumulates hidden characters and you do not have to re-clean at retrieval time.

What cleaning fixes and what it does not — the human editor's share

A character-level cleaner operates on code points. It finds and replaces or removes specific Unicode values. That scope is both its strength and its limit. Being precise about what the tool does and does not fix prevents the mistake of cleaning text and then assuming it is ready to publish.

Cleaning reliably fixes: straight-quote normalisation, non-breaking space replacement, zero-width character removal, duplicate blank line reduction, mixed line-ending normalisation, and Markdown syntax stripping. These are deterministic operations with no ambiguity. Every U+200B in the input is gone from the output. Every sequence of three or more blank lines becomes one. The report confirms each change with a count.

Cleaning does not fix factual errors. A sentence that states the wrong year, attributes a quote to the wrong person, or inverts a cause-and-effect relationship passes through unchanged. The tool has no model of the world and no way to evaluate claims. Fact-checking remains entirely the editor's responsibility.

Cleaning does not fix repeated ideas. Many AI outputs contain the same point restated in different words across three or four paragraphs. These are distinct sentences with distinct characters; a character-level tool sees no repetition. Cutting redundant passages is an editing task.

Cleaning does not fix tone or register. Phrasing that is too formal, too casual, too hedged, or too assertive for the audience is a matter of word choice. Normalising whitespace does not change any word.

For batch processing — say, 500 pieces generated overnight — the practical approach is one cleaning pass over all 500 (scriptable with the same regular expressions this tool applies: strip zero-width characters, replace U+00A0, normalise line endings, remove Markdown syntax markers), followed by manual spot-checks on a random sample of 10 to 15 pieces to verify that the cleaning step did not introduce new problems. Common introduction errors are over-aggressive regex that strips valid hyphens or removes apostrophes inside contractions. The spot-check sample should include pieces from different topic areas and different prompt templates, since different prompts tend to produce different character distributions. If the sample is clean and the character report shows consistent categories across the batch, the rest can be accepted without individual review.

Characters this tool looks for

25 invisible characters and formatting controls, with the action taken on each one.

CharacterCode pointActionWhat it does
Zero-width characters
Zero Width SpaceU+200BRemovedInvisible separator with no width. Commonly left behind when text is copied out of a chat window.
Zero Width Non-JoinerU+200CRemovedInvisible character that blocks two letters from joining in scripts such as Arabic or Devanagari.
Zero Width JoinerU+200DRemovedInvisible character used to glue emoji sequences together. Stray copies can break word wrapping.
Zero Width No-Break Space (BOM)U+FEFFRemovedByte order mark. Harmless at the start of a file, invisible noise anywhere else.
Word JoinerU+2060RemovedTells a text engine not to break a line here. Invisible, and easy to carry along by accident.
Mongolian Vowel SeparatorU+180ERemovedA legacy invisible separator from Mongolian script that now renders as nothing at all.
Bidirectional controls
Left-to-Right MarkU+200ERemovedDirectional hint for mixed-script lines. Invisible on screen but present in the character stream.
Right-to-Left MarkU+200FRemovedMirror of the left-to-right mark, used to steer the order of mixed-direction text.
Arabic Letter MarkU+061CRemovedInvisible directional marker for Arabic text. Rarely intentional outside its original document.
Left-to-Right EmbeddingU+202ARemovedOpens an embedded left-to-right run. Unpaired copies can scramble the order of a sentence.
Right-to-Left EmbeddingU+202BRemovedOpens an embedded right-to-left run. Left behind after copy-paste, it can flip nearby punctuation.
Pop Directional FormattingU+202CRemovedCloses an embedded directional run. Without its partner it is pure invisible noise.
Left-to-Right OverrideU+202DRemovedForces following characters to display left-to-right regardless of their own direction.
Right-to-Left OverrideU+202ERemovedForces following characters to display right-to-left. A common cause of text that looks reversed.
Left-to-Right IsolateU+2066RemovedModern replacement for the embedding controls. Still invisible, still travels with copied text.
Right-to-Left IsolateU+2067RemovedIsolates a right-to-left run from the surrounding paragraph direction.
First Strong IsolateU+2068RemovedIsolates a run whose direction is decided by its first strong character.
Pop Directional IsolateU+2069RemovedCloses an isolate opened by one of the isolate controls above.
Formatting controls
Soft HyphenU+00ADRemovedA hyphen the reader only sees if the word happens to break at the end of a line.
Carriage Return (CR)U+000DRemovedHalf of a Windows line ending. Kept on its own it produces doubled spacing in most editors.
Markdown Asterisk MarkerU+002ARemovedBold or italic marker such as ** left behind when text is copied in its raw form. Turn this group off to keep Markdown styling marks.
Markdown Backtick MarkerU+0060RemovedInline-code backtick left behind after copying raw assistant output. Turn this group off to keep inline code marks.
Invisible spaces
No-Break SpaceU+00A0→ spaceLooks exactly like a space but stops a line from breaking there. A frequent copy-paste leftover.
Figure SpaceU+2007→ spaceA space as wide as a digit, used to align numbers in tables. Replaced with a normal space.
Narrow No-Break SpaceU+202F→ spaceA thin, non-breaking space from French typography. Replaced with a normal space.

Frequently Asked Questions

▸Does cleaning remove bold, italics or links?

Formatting is not part of what you paste. When you copy from a rendered page, the browser puts plain characters on the clipboard, so there is no bold or italic state left to remove. Links are lost at the copy step, not here.

▸Will it fix double blank lines?

Yes. Runs of three or more consecutive line breaks are reduced to two, and stray carriage returns are removed first so that Windows line endings stop producing a phantom extra break. The report counts each of those changes separately.

▸Can I clean text I wrote myself?

Of course. Nothing about the tool is specific to generated text — it matches characters, not authors. Text pasted from a PDF, a slide deck, a spreadsheet or an email client tends to carry exactly the same kind of residue.