Fix code copied from websites & AI chats

Blogs and word processors “prettify” code: quotes turn curly, --flags become –flags, and spaces become non-breaking. The result looks right but won’t run. Paste the snippet to get code your terminal and compiler will accept.

For snippets copied from blogs, docs or AI: curly quotes, broken dashes, non-breaking spaces and fences fixed. Indentation untouched.
Paste

Paste anything.

Press Ctrl V anywhere on this page, drop a text file, or try an example:

Clean
1 Paste text on the left
2 See what’s hiding in the X-ray
3 Copy it back, clean
Fixes16 rules on · 0 changes made

Hidden characters

AI & markdown

Typography

Layout & spacing

Keyboard: Ctrl+Enter copies the clean text, Ctrl+Shift+Enter copies rich text, keys 1 to 6 switch presets, X toggles the X-ray.

Common errors this fixes

ErrorCauseFix
SyntaxError: Invalid character / illegal character '\u201c'Curly quotes “ ” ‘ ’Straight quotes " '
error: unknown option '–save'WordPress turned -- into an en dash--save
IndentationError / unexpected tokenNon-breaking spaces (U+00A0) in indentationNormal spaces
Mysterious failures on a line that looks fineZero-width space or BOMRemoved
A stray ```bash line at the top | Code fences copied from an AI chat | Removed

What it leaves alone

  • Indentation: tabs and leading spaces are preserved exactly (non-breaking spaces become normal spaces of the same width).
  • Comments: # and // lines are kept. Unlike some cleaners, ClepBoard never deletes comments, shebangs or #include lines.
  • Blank lines and spacing inside your code.

FAQ

Why do curly quotes break my code?

Programming languages only accept straight quotes (" and '). Curly quotes are different Unicode characters, so compilers and shells reject them or treat them as part of the text.

Will it change strings that are supposed to contain curly quotes?

Yes, the Code preset straightens all quotes. If your code intentionally contains typographic quotes, untick "Smart quotes" under Fixes.

Related tools