Esta página aún no está traducida al español, así que la mostramos en inglés.

Fix Smart Quotes — Convert Curly Quotes to Straight Quotes

Code copied from Slack, Notion, Word or a blog won’t run? Typographic “smart quotes”, dashes and non-breaking spaces are usually the culprit — clean them in one paste.

Actualizado el
Cleaned

Tus datos nunca salen de tu ordenador. Todo se procesa localmente en tu navegador.

Cómo usar: Smart Quotes to Straight Quotes

  1. Paste the code or text that fails — JSON, JavaScript, CSS, a terminal command.
  2. Keep “Smart → straight” selected. The report shows how many curly quotes, dashes and hidden characters were replaced.
  3. Copy the cleaned version. If it’s JSON, a badge confirms it now parses.
  4. Writing copy instead? Switch to “straight → smart” to get proper typographic quotes and dashes.

Why smart quotes break code

Word processors, Slack, Notion, Google Docs, macOS and many CMSs “helpfully” replace straight quotes (" and ') with curly typographic quotes (“ ” and ‘ ’). Programming languages only understand straight quotes, so code pasted from those apps fails with errors like Unexpected token “ in JSON, SyntaxError: Invalid or unexpected token or a shell command that silently does the wrong thing. Visually the difference is tiny, which makes the bug hard to spot.

What gets replaced

CharacterNameBecomes
“ ” „ « »Curly / angled double quotes"
‘ ’ ‚ ′Curly single quotes, apostrophe, prime'
– — −En dash, em dash, minus sign-
…Ellipsis...
NBSP, thin spaceNon-breaking spacesNormal space
ZWSP, ZWJ, BOM, soft hyphenInvisible charactersRemoved

The em dash in --flag is a classic: Slack turns a double hyphen into “—”, and the command-line option stops working.

Preventing it

  • Share code in code blocks (backticks in Slack, Notion, GitHub) — they keep quotes straight.
  • On macOS, turn off System Settings → Keyboard → Text Input → Use smart quotes and dashes.
  • In Word, disable “Straight quotes with smart quotes” under AutoCorrect → AutoFormat As You Type.

Once the quotes are fixed, format and validate JSON with the JSON Formatter.

También se busca como: curly quotes, smart quotes, straight quotes, fix json quotes, typographic quotes, non-breaking space, em dash.

Herramientas que combinan con: Smart Quotes to Straight Quotes

  • Soft Hyphen Generator — Stop long words like “Versicherungsleistungen” from overflowing on mobile: insert invisible soft hyphens automatically or at your own break points, then copy the result.
  • HTML Entity Encoder — Escape < > & " so text is safe to show in HTML, convert accents and symbols to named or numeric entities, or decode entity-filled HTML back to plain text.
  • Comprobador de diferencias — Pega la versión original y la modificada para ver, una al lado de la otra, las líneas añadidas, eliminadas y modificadas, con las palabras exactas que han cambiado resaltadas dentro de cada línea.
  • Remove Duplicate Lines — Paste a list to remove duplicate lines instantly.

Preguntas frecuentes

How do I fix “Unexpected token” errors in JSON?
Usually the JSON contains curly quotes from a document or chat app. Paste it here, copy the cleaned version, and validate it in the JSON Formatter.
Will it change quotes inside strings?
Yes — every curly quote becomes straight. If your strings intentionally contain typographic quotes, review those spots after cleaning.
Why does my command fail when copied from Slack?
Slack converts -- into an em dash and quotes into curly quotes. This tool turns them back into the ASCII characters your terminal expects.
Can it add smart quotes instead?
Yes. Switch to “straight → smart” to convert plain quotes into typographic quotes and hyphens between words into en or em dashes for published copy.
¿Puedo instalar Smart Quotes to Straight Quotes como aplicación web y utilizarla sin conexión?
Sí. Smart Quotes to Straight Quotes es una aplicación web instalable (PWA): se instala desde el navegador, no se descarga desde una tienda de aplicaciones. Haz clic en «Instalar aplicación» en la parte superior de esta página en Chrome o Edge (Windows, macOS, Linux, ChromeOS) o, en Android, utiliza «Compartir» → «Añadir a la pantalla de inicio» en iPhone y iPad, o «Archivo» → «Añadir al Dock» en Safari 17+ en un Mac. A continuación, se abrirá en su propia ventana con su propio icono y, como se ejecuta íntegramente en tu navegador, seguirá funcionando sin conexión. Firefox en el ordenador de sobremesa no permite instalar aplicaciones web. Cómo funciona la instalación.

Herramientas relacionadas