How to use the Smart Quotes to Straight Quotes
Convert quotes in three steps:
1
Paste your text
Paste text containing smart/curly quotes or straight ASCII quotes into the input area.
2
Set direction
Select 'Smart → Straight' to convert typographic quotes to ASCII (for code), or 'Straight → Smart' to convert ASCII quotes to typographic (for publishing).
3
Convert and copy
Click 'Convert Quotes' and copy or download the output. The stats pill shows how many quote characters were found.
When to use this tool
Use when quote characters cause issues in code, JSON, or systems:
- →Fixing text pasted from Microsoft Word or Google Docs that contains smart quotes into code, causing syntax errors
- →Repairing JSON that fails to parse because typographic quote characters (U+201C, U+201D) replace ASCII quotes
- →Preparing text for command-line tools, shell scripts, or terminal arguments that require straight ASCII quotes
- →Normalising quote characters in configuration files that were edited in a word processor before deployment
- →Converting straight quotes to smart quotes in Markdown documents or blog posts for typographically correct publishing
- →Fixing smart quotes in SQL queries or database values that cause parse errors in query editors
Frequently asked questions
Q:Why do smart quotes cause problems in code?
Smart quotes are Unicode characters — left double quote (U+201C), right double quote (U+201D), left single quote (U+2018), and right single quote (U+2019) — that visually resemble ASCII quote characters (' and ") but have different code points. Compilers, parsers, JSON validators, YAML parsers, and shell interpreters all expect the ASCII quote characters and produce syntax errors when they encounter the Unicode equivalents.
Q:Which smart quote characters are converted?
The tool converts all six Unicode smart quote types: left double quotation mark (“, U+201C), right double quotation mark (”, U+201D), left single quotation mark (‘, U+2018), right single quotation mark (’, U+2019), double low-9 quotation mark („, U+201E), and single low-9 quotation mark (‚, U+201A). All are mapped to their ASCII equivalents: " for double quotes and ' for single quotes.
Q:How does straight-to-smart quote conversion work?
The tool uses a heuristic approach: a straight quote preceded by whitespace, an opening bracket, or the start of a line is converted to an opening (left) smart quote; all other straight quotes are converted to closing (right) smart quotes. This correctly handles most prose but may occasionally misclassify quotes in complex or unconventional sentence structures. Review the output for edge cases.
Q:Why would I convert straight quotes to smart quotes?
Typographic smart quotes are considered correct punctuation in professional publishing, books, magazines, and formal documents. They make text look more polished than straight quotes (which are technically apostrophe and prime characters, not quotation marks). If you are writing for a blog, ebook, or print publication, converting to smart quotes improves typographic quality.
Q:Are apostrophes also converted?
Yes — the right single quotation mark (U+2019) is used as a typographic apostrophe by word processors. In 'Smart → Straight' mode, this character is converted to a straight apostrophe ('). In 'Straight → Smart' mode, straight apostrophes in contractions (don't, it's) are typically converted to right single quotes (U+2019) by the heuristic, which is the correct typographic treatment.
Q:Does converting to straight quotes affect non-quote characters?
No — only the six Unicode smart quote characters are affected. All other characters in the text — letters, numbers, punctuation, spaces, line breaks, emoji — are passed through unchanged.