TextWash

This page finds why copied code won’t run: zero-width spaces, smart quotes, em dashes and non-breaking spaces are flagged character-by-character and fixed. The sample below contains three classic failures. Everything runs in your browser — nothing is uploaded.

Input

X-ray hover a highlight for details

Cleaned output copied ✓

Cleaning rules

The error says line 3. Line 3 looks fine.

When code copied from a blog post, tutorial, PDF, Stack Overflow comment or chat message refuses to run, the cause is almost always a character that renders exactly like the one you expected: a zero-width space inside an identifier, curly quotes where the language wants straight ones, an em dash where a CLI flag wants --, or a non-breaking space that the shell refuses to treat as a separator.

The errors, by language

Python: SyntaxError: invalid non-printable character U+200B or invalid character '“' (U+201C). JavaScript/Node: SyntaxError: Invalid or unexpected token. Go: invalid character U+200B. Bash: command not found (the command is fine — the space before it isn't a space). npm/curl/git: unknown option for a flag that is spelled correctly but starts with an em dash instead of two hyphens.

Fix it

Paste the failing snippet above. The x-ray marks every suspicious character with its Unicode name — you'll usually spot the culprit in seconds — and the cleaned output has quotes straightened, dashes converted to hyphens, exotic spaces regularized and invisibles removed, ready to paste back. One caveat: an em dash becomes one hyphen; long CLI flags want two, so check flags after cleaning. To catch these in your editor instead, VS Code highlights invisible Unicode by default (editor.unicodeHighlight).