Smart Quotes U+201C

Smart quotes are the curly “ ” ‘ ’ marks AI tools love. Copy them, see why they break code and Markdown, and convert them to straight quotes.

Codepoint
U+201C
Decimal
8220
HTML
“
CSS
\201C
JS
\u201C
URL
%E2%80%9C
UTF-8
E2 80 9C
Category
Punctuation, Initial Quote (Pi)
Block
General Punctuation

Smart quotes, also called curly quotes, typographic quotes or fancy quotes, are quotation marks shaped to open and close: “ ” for double and ‘ ’ for single. The straight quotes on your keyboard (" and ') are a typewriter-era compromise, where one key had to both open and close.

Edited text (books, newspapers, academic papers) uses smart quotes; code, config files and terminals use straight ones. AI models trained on edited text often produce smart quotes, including where they break things.

The Four Smart Quote Characters

CharacterSymbolCodepointHTML entityName
Left double quote“U+201C“Left Double Quotation Mark
Right double quote”U+201D”Right Double Quotation Mark
Left single quote‘U+2018‘Left Single Quotation Mark
Right single quote’U+2019’Right Single Quotation Mark

The right single quote (U+2019) also serves as the typographic apostrophe: don’t instead of don't, it’s instead of it's.

Why Smart Quotes Break Code

A code snippet pasted from ChatGPT, a blog post or an email that does not run usually has smart quotes in it. JavaScript, Python, Bash, SQL, JSON and HTML parsers accept only straight quotes as string delimiters. To them, a smart quote is ordinary text.

js
// This works (straight quotes):const name = "Alice";
// This fails (smart quotes):const name = “Alice”;// Error: Invalid or unexpected token
bash
# This works:echo "hello"
# This fails silently or weirdly:echo “hello”
json
// This is valid JSON:{"key": "value"}
// This is invalid:{“key”: “value”}

Why AI Models Produce Smart Quotes

ChatGPT, Claude and Gemini learn style from training data dominated by edited text: books, journalism, academic writing, legal text and publisher documentation. All of it uses smart quotes, so the model learns that quotes curl, even when its output is code that will run. The same pattern produces other AI writing tells:

  • Em dashes instead of hyphens for sentence breaks
  • En dashes instead of hyphens for ranges
  • Horizontal ellipsis (…, U+2026) instead of three periods
  • Smart quotes instead of straight quotes

How to Type Smart Quotes

Most writing tools insert smart quotes automatically. To type them by hand:

PlatformMethod
Windows (U+201C “)Alt+0147 on numeric keypad
Windows (U+201D ”)Alt+0148
Windows (U+2018 ‘)Alt+0145
Windows (U+2019 ’)Alt+0146
macOS (left double “)Option+[
macOS (right double ”)Option+Shift+[
macOS (left single ‘)Option+]
macOS (right single ’)Option+Shift+]
HTML“ ” ‘ ’
JavaScript\u201C \u201D \u2018 \u2019
Most writing appsType a straight quote; autocorrect converts it

How to Turn Off Smart Quotes

  • Microsoft Word: File > Options > Proofing > AutoCorrect Options > AutoFormat As You Type. Uncheck "Straight quotes" with "smart quotes".
  • Google Docs: Tools > Preferences. Uncheck Use smart quotes.
  • Apple Pages, Notes, TextEdit: System Settings > Keyboard > Text Input > Edit. Turn off Use smart quotes and dashes. This affects all macOS apps that respect the system setting.
  • iPhone / iPad: Settings > General > Keyboard. Turn off Smart Punctuation.
  • Outlook: File > Options > Mail > Editor Options > Proofing > AutoCorrect Options > AutoFormat As You Type. Uncheck smart quotes.

Converting Smart Quotes to Straight Quotes

In JavaScript

js
function stripSmartQuotes(text) {  return text    .replace(/[\u201C\u201D]/g, '"')  // double quotes    .replace(/[\u2018\u2019]/g, "'"); // single quotes}

In Python

python
SMART_QUOTE_MAP = {    '\u201C': '"', '\u201D': '"',    '\u2018': "'", '\u2019': "'",}
def strip_smart_quotes(text):    for smart, straight in SMART_QUOTE_MAP.items():        text = text.replace(smart, straight)    return text

On the Command Line

bash
# Strip all smart quotes from a file in place (macOS/BSD sed)sed -i '' -e 's/[“”]/"/g' -e "s/[‘’]/'/g" filename
# Same on Linux (GNU sed)sed -i -e 's/[“”]/"/g' -e "s/[‘’]/'/g" filename

In Our Tool

Paste any text into the Invisible Character Viewer on the homepage. It highlights smart quotes alongside other special characters, and the "Replace Dashes & Smart Quotes" button swaps them for straight quotes in one click (you can undo it).

Smart Quotes vs Prime Marks

Prime marks, used for feet, inches, minutes and seconds, are often confused with smart quotes.

CharacterSymbolCodepointUse
Prime′U+2032Feet, minutes of arc, minutes of time
Double Prime″U+2033Inches, seconds of arc, seconds of time
Straight quote"U+0022ASCII, used as shorthand for inches/seconds
Straight apostrophe'U+0027ASCII, used as shorthand for feet/minutes

The correct form of a height like 5'10" is 5′10″, with prime marks. AI models sometimes confuse primes with smart quotes.

Smart Quotes in URLs and File Names

Smart quotes in URLs get percent-encoded:

  • “ becomes %E2%80%9C
  • ” becomes %E2%80%9D
  • ‘ becomes %E2%80%98
  • ’ becomes %E2%80%99

That is valid but almost always a mistake from copying a URL out of a Word document or rich-text email. The URL no longer matches the original, and servers may return a 404 or redirect. Use straight quotes, or none, in URLs.

A file name with smart quotes, like "Report".pdf, behaves differently on macOS, Windows and Linux and breaks scripts that expect ASCII-only names.

Detecting Smart Quotes in Your Text

js
// JavaScript: detect any smart quote/[\u201C\u201D\u2018\u2019]/.test(text)
// Count them(text.match(/[\u201C\u201D\u2018\u2019]/g) || []).length
python
# Python: detect smart quotesimport rehas_smart_quotes = bool(re.search(r'[\u201C\u201D\u2018\u2019]', text))

Or paste your text into the Invisible Character Viewer on the homepage to see every smart quote highlighted with its codepoint and name.

Frequently Asked Questions

What are smart quotes?

Smart quotes are the curly, typographically correct versions of quotation marks. The family has four characters: the left double quote (“ U+201C), the right double quote (” U+201D), the left single quote (‘ U+2018), and the right single quote (’ U+2019). Regular straight quotes (" and ') are the ASCII keyboard versions.

Why does ChatGPT use smart quotes?

AI models like ChatGPT, Claude and Gemini train on professionally edited text, such as books, magazines and news articles, where smart quotes are standard. People usually type straight quotes because those are on the keyboard. Curly quotes in code snippets, terminal commands or casual emails often come from AI output.

Why do smart quotes break code?

Programming languages, terminals and config files recognize only straight quotes (") as string delimiters. Smart quotes (“ ” ‘ ’) are different Unicode characters the parser does not treat as quote marks. Pasted AI code can look right and still fail because every string literal is wrapped in curly quotes.

How do I replace smart quotes with straight quotes?

In JavaScript: text.replace(/[\u201C\u201D]/g, '"').replace(/[\u2018\u2019]/g, "'"). In Python: text.replace('\u201C', '"').replace('\u201D', '"').replace('\u2018', "'").replace('\u2019', "'"). In macOS: open the text in an editor and use Find & Replace with all four characters. Or paste your text into our viewer to find them first.

How do I turn off smart quotes?

In Microsoft Word: File > Options > Proofing > AutoCorrect Options > AutoFormat As You Type, uncheck 'Straight quotes with smart quotes.' In Google Docs: Tools > Preferences, uncheck 'Use smart quotes.' On macOS system-wide: System Settings > Keyboard > Text Input > Edit, turn off 'Use smart quotes and dashes.'

Related Characters

Need to find every hidden character in your text, not just the Smart Quotes?

Open the viewer