Cleaning Text

How to remove hidden characters from AI text on Mac

You can do this with Note My — here is how to strip the characters an AI paste brings across that you cannot see, while every word, dash and emoji you can see stays exactly as you wrote it.

You paste an answer out of an AI chat into a file. It looks right. Then the diff shows a change on a line you did not edit, a search for a word you can plainly see finds nothing, or a build fails on an identifier that reads correctly on screen. The text is carrying characters with no visible width, and they came along with the copy.

This guide covers what travels with that text, how Note My strips it in one command, and how everything you can actually see — your wording, your punctuation, your emoji — comes through the pass exactly as it was.

Note

All of this happens on your Mac. Nothing is uploaded, there is no account to create, and the text you paste in never leaves the machine.

What actually travels with text copied out of an AI chat

Nothing mysterious, and nothing that identifies where the text came from. It is ordinary web-page debris, because a chat answer is rendered HTML before it is anything else:

Zero-width characters — U+200B, U+200C, U+200D, U+FEFF, U+2060 — used by layout code to permit or suppress a line break; non-breaking spaces (U+00A0) and narrow no-break spaces (U+202F); the wider Unicode space family (U+2000–U+200A, U+205F); soft hyphens (U+00AD); bidirectional control characters (U+200E, U+200F, U+202A–U+202E); and stray variation selectors.

Alongside those sit the visible substitutions: curly quotes instead of straight ones, en and em dashes instead of hyphens, a single-character ellipsis instead of three full stops. Those you can see, and they are treated differently.

Note My gives you all of this as 21 named categories, each carrying a grade for how safe it is to touch — the same list you can read for yourself in the review sheet. Some are wrong wherever they appear, and our hidden-character scanner clears those for you. Others depend on context: inside your own writing they are reported, not removed. The rest are only ever reported, so the decision stays yours.

Clean AI Copy/Paste Markers: one command, no dialog

  1. Paste the text into a tab

    Paste is always plain text. Styled text from a browser arrives as characters, not formatting, so the fonts and colours of the chat window are not carried across. The invisible characters are.

  2. Open the Clean menu

    Click Clean in the toolbar — the wand icon. It is a pull-down, so it opens a menu rather than acting immediately. Unlike Show Invisibles, which only changes what you see on screen, the cleaning commands in this menu change the document itself.

  3. Choose Clean AI Copy/Paste Markers

    One click and it is done, straight from the menu. Our hidden-character scanner takes out the markers that cannot change how anything renders, then tells you what it did. Your cursor, your selection and your place in the document all stay where you left them.

  4. Read the toast

    A small panel appears at the bottom of the window for a few seconds. There are four possible messages, covered below.

Tip

Straight after a paste, right-click inside the editor: the same command sits in the editor's own menu, already where your cursor is. The toolbar's Clean pull-down carries it too, whenever your hands are on the mouse.

What it removes, and what it leaves exactly as you wrote it

The promise is precise and worth stating exactly: it strips only artefacts that cannot change visible rendering, wording, tone, punctuation, indentation or emoji structure. Anything that needs judgement is counted, reported, and left alone for you to decide. Eleven of the 21 categories are cleared for you; eight more are counted and never touched.

Which character categories the AI-marker command removes and which it only counts
CategoryWhat happens
Zero-width charactersRemoved
Bidi control charactersRemoved
Non-breaking space, narrow no-break space, unusual Unicode spaces, ideographic spaceReplaced with an ordinary space
Soft hyphensRemoved
Line separator, paragraph separator, lone carriage returnReplaced with a newline
Control charactersRemoved
Smart quotes, smart dashes, ellipsisCounted, left unchanged
Homoglyph letters, combining marks, non-NFC clustersCounted, left unchanged
Trailing whitespace, mixed tab and space indentCounted, left unchanged

That second half of the table is the point of the command. Em dashes stay em dashes and curly quotes stay curly. Flattening those is a separate, deliberate act — see the review sheet below.

Why your emoji come through intact

A zero-width joiner between two emoji is doing structural work: it turns two glyphs into one family or one flag. Our hidden-character scanner leaves emoji structure intact, so a joiner, word joiner, non-joiner or variation selector inside an emoji is reported at most, never removed. The same character between two ordinary letters is junk and goes; inside ❤️ it stays.

One more deliberate exception: a byte-order mark at the very start of a file is left alone and not reported. In that one position it is a legitimate part of how the file is saved, and our encoding handling keeps it, so a file you clean still opens the way it did before. Anywhere else in the document it is zero-width debris and goes.

Cleaning just the paragraph you selected

The command works on your selection if there is one, and on the whole document if there is not. Select the block you pasted, right-click inside the editor, and the menu item's title changes to read …in Selection, so you can see the scope before committing to it. That is the right approach when you drop an AI-written paragraph into a document you have been writing for a while: everything outside the selection is left untouched, and the count you get back describes the pasted block only.

Reading the result

The toast tells you which of four things happened.

The four result messages and what each one means
MessageWhat it means
No hidden copy/paste markers found.The text was already clean; nothing was modified.
Cleaned N hidden marker(s). Your text was not rewritten.N characters removed or replaced, and nothing needing judgement was present.
Cleaned N safe marker(s). R risky marker(s) left unchanged.N removed; R findings counted but deliberately not acted on.
Some advanced Unicode markers were found but left unchanged for safety.Everything present needed judgement, so nothing was modified.

To see what those risky findings actually are, scan the document in the review sheet, described below. The status-bar pill is a separate, quieter indicator: it reports only the characters that are wrong wherever they appear, and it reads Clean in green, "N hidden" in orange, or "N hidden · D risky" in red. Its popover offers Show in Text, Remove Invisible Character(s), Review All… and Go to Next. Use the pill for a glance while you work, the review sheet for the full picture.

Line endings and carriage returns

Where a document is mainly LF but has picked up a few stray carriage returns, the command tidies those away so the file reads consistently again. The conversion runs one way only: it never turns LF into CRLF, and it leaves a consistently-CRLF document alone. For the other direction, or a forced conversion, use File ▸ Line Endings.

When to open the full review sheet instead

Choose Clean ▸ Clean Invisible / Special Characters… when you want to see every finding before anything is removed, or when you do want the smart punctuation flattened.

It gives you a scope control (Selection or Whole Document), a preset pop-up carrying the four presets — Safe (7 categories), Code-safe (16, the default), Prose (6) and Aggressive (all 21) — plus Custom, and a Scan button. The left table lists the 21 categories with a checkbox, a severity chip and a count. The right table lists each finding as Line:Col · Code Point · Category · Action · Risk; double-click one to reveal it in the editor. The footer has Show in Editor, Apply (N) and Close.

Important

The review sheet applies exactly the preset you pick, and the scan shows you the full list before you commit. With Aggressive selected, Apply flattens smart quotes inside string literals and dashes inside comments as well, which is why Code-safe is the default and why the preview is there to read first.

The sheet works on a document of any size, deliberately: our large-file engine makes it the tool of choice for your very largest files, with the same scan, the same counts and the same list of findings you get on a single pasted paragraph.

Undoing the whole pass

One press of ⌘Z reverses the entire clean at once, however many characters it touched. The Edit menu names the action, so you can read what you are about to reverse before you press it. The review sheet's Apply undoes as its own separate step, and so does the status pill's one-click removal.

Troubleshooting

The command beeps instead of running

The beep means the focus is somewhere other than the text — a window with no document open, or a click that landed outside the editor. Click once inside the document so the cursor is sitting in the text, then choose the command again from the Clean menu or the editor's right-click menu. Your document is untouched in the meantime, so you can run it as many times as you like until it lands.

Keeping the status pill live on a very large document

The pill watches documents up to the size you set in the Scan documents up to control under Settings ▸ Text Cleanup. Raise that figure and the pill keeps its running count on files of that size too. Whatever you set it to, Clean AI Copy/Paste Markers and the full review sheet work on a document of any size, so either one is always available with a click.

The command is taking a moment on a very large file

Your document can be as large as you like. On a normal paste the result is instantaneous. On a multi-megabyte document, expect a short pause while our large-file engine works through it — wait for the toast, and it will tell you exactly how many characters were touched. Your cursor and your scroll position come back where you left them.

I can see the characters are still there

Check which kind. If they are smart quotes, dashes, ellipses, look-alike letters, combining marks or trailing whitespace, the command counted them and left them exactly as they are, by design — those are yours to decide about. Open the review sheet with a preset that covers them, read the list, and apply it when you are happy.

I want to see them before I remove anything

The Show Invisibles toolbar toggle changes only what is drawn on screen — · for a space, → for a tab, a ring for a non-breaking space — and never edits the document. Separately, our hidden-character scanner marks each finding where it sits in the text, and Clean ▸ Find Next Hidden Character walks you through them one at a time, wrapping round to the top at the end.

I want this to happen automatically on every paste

Turn on Clean pasted text under Settings ▸ Text Cleanup and every paste lands already tidied. It uses your default preset rather than the AI-marker set, so choose the preset that matches how you work: at the Code-safe default each paste arrives with the invisible debris gone and your punctuation untouched, while Aggressive flattens the smart punctuation too, which suits a file destined for plain ASCII.

What you can do with the text once it is clean

The pass is the start of the job rather than the end of it. Everything below works on the same document, in the same tab, the moment the toast has gone.

  • Find the word you could see all along. A zero-width character sitting inside a word is what made your search come back empty. With the markers gone, our find and replace matches the term you type, and a replace across the file behaves the way you expected it to the first time.
  • Walk the findings one at a time. Clean ▸ Find Next Hidden Character steps you from one marker to the next and wraps round at the end, so you can look at each in context before you decide anything. The status pill's popover offers Go to Next and Show in Text for the same trip when your hand is already on the mouse.
  • See the invisible while you edit. The Show Invisibles toggle draws a dot for a space, an arrow for a tab and a ring for a non-breaking space, so you can watch a document stay clean as you keep writing in it.
  • Flatten the punctuation on purpose. When something downstream wants plain ASCII, the review sheet's Aggressive preset turns curly quotes straight, dashes into hyphens and the ellipsis into three full stops — after showing you the complete list, with a count on the Apply button.
  • Settle the line endings. File ▸ Line Endings sets a document to LF or CRLF outright, which is the companion move when a pasted block arrived from somewhere with different habits to the rest of your file.
  • Keep the emoji you meant. Family emoji, flags and skin-tone variants survive the pass whole, so a message or a commit body reads on the other side exactly as it read in front of you.

Because the whole pass is a single undoable step, none of this is a commitment. Run it, look at the result, and if it was not what you wanted, one keystroke puts the document back the way it was.

Frequently asked questions

Will this change my em dashes to hyphens?

Your em dashes come through exactly as you wrote them. This command counts smart dashes and reports them, then leaves them where they are, because punctuation is a decision that belongs to you. When you do want them flattened, open Clean ▸ Clean Invisible / Special Characters…, choose the Aggressive preset, scan and apply — with a visible list of every change in front of you first.

What is the quickest way to reach Clean AI Copy/Paste Markers?

Whichever is nearer to your hands. The toolbar's Clean pull-down keeps it one click away, and the editor's own right-click menu carries it too, already at the point where your cursor is — reading "…in Selection" whenever you have text selected, so you can see the scope before you commit.

Can I clean only part of the document?

Yes. Make a selection and the command acts on it alone; with nothing selected it acts on the whole document. The review sheet has an explicit Selection / Whole Document control.

Is my text sent anywhere to be checked?

Everything happens on your Mac. Nothing is uploaded, there is no account, and the text you paste never leaves the machine — the pass runs exactly the same with the network switched off.

How do I get back the characters it removed?

⌘Z. A single undo restores every character the pass touched, however many there were.