TextWash

This page converts curly quotes ‘ ’ “ ” (and a dozen rarer variants) to straight ASCII quotes. The sample below is what Word autocorrect does to code. Everything runs in your browser — nothing is uploaded.

Input

X-ray hover a highlight for details

Cleaned output copied ✓

Cleaning rules

What are smart quotes?

Typographic quotation marks — ‘single’ U+2018/U+2019 and “double” U+201C/U+201D — that word processors substitute for the straight ASCII quotes ' and " as you type. Beautiful in prose; poison in anything a machine parses.

Where they come from

Autocorrect in Word, Google Docs, Outlook, iOS and macOS ("smart punctuation"), plus most publishing systems. Any code snippet that passes through a document or an email is at risk; documentation written in Word is the classic source of broken copy-paste commands.

What they break

Almost every parser: JSON requires straight double quotes ({“key”: 1} fails with Unexpected token '“'), JavaScript throws SyntaxError: Invalid or unexpected token, Python 3 says SyntaxError: invalid character '“' (U+201C), shells treat “Hello” as a literal string including the quote characters, and YAML/TOML/SQL all misparse. The error line looks correct because the quotes look like quotes.

Fix it

Paste the text above — every quote variant (including low-9 quotes, primes and guillemets) is highlighted and converted to plain ' and " in the output. To prevent it at the source: disable "smart quotes/smart punctuation" in your editor's autocorrect settings.