Esta página ainda não foi traduzida para o português, por isso aparece em 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.

Atualizado em
Cleaned

Seus dados nunca saem do seu computador. Todo o processamento acontece localmente no navegador.

Como 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.

Também pesquisado como: curly quotes, smart quotes, straight quotes, fix json quotes, typographic quotes, non-breaking space, em dash.

Ferramentas que combinam com: 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.
  • Verificador de Diferenças — Cole uma versão original e uma versão alterada para ver lado a lado as linhas adicionadas, removidas e modificadas — com as palavras exatas que mudaram destacadas dentro de cada linha.
  • Remove Duplicate Lines — Paste a list to remove duplicate lines instantly.

Perguntas frequentes

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.
Posso instalar o Smart Quotes to Straight Quotes como um aplicativo da web e usá-lo offline?
Sim. O Smart Quotes to Straight Quotes é um aplicativo da web instalável (PWA) — instalado a partir do seu navegador, não baixado de uma loja de aplicativos. Clique em “Instalar aplicativo” na parte superior desta página no Chrome ou no Edge (Windows, macOS, Linux, ChromeOS) ou, no Android, use “Compartilhar” → “Adicionar à tela inicial” no iPhone e no iPad, ou “Arquivo” → “Adicionar ao Dock” no Safari 17+ em um Mac. Em seguida, ela se abre em uma janela própria com seu próprio ícone e, como é executada inteiramente no seu navegador, continua funcionando offline. O Firefox no desktop não permite a instalação de aplicativos da web. Como funciona a instalação.

Ferramentas relacionadas