Smart Quotes U+201C

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 the properly-shaped versions of quotation marks that open and close in the correct direction. The double-quote pair is “ and ”. The single-quote pair is ‘ and ’. The straight quotes on your keyboard (" and ') are a compromise from the typewriter era, where each key had to serve both opening and closing duty.

In professionally edited text — books, newspapers, magazines, academic papers — smart quotes are standard. In casual text, code, config files, and terminals, straight quotes are standard. This division is normally fine, except that AI language models trained on professional text produce smart quotes by default — including in places where they cause real problems.

The Four Smart Quote Characters

Smart quotes are a family of four Unicode characters:

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

The single right quote (U+2019) is also commonly used as a typographic apostrophe: don’t instead of don't, it’s instead of it's. This is technically a different use from quoting, but the character is the same.

Why Smart Quotes Break Code

This is the most common complaint about smart quotes: you paste a code snippet from ChatGPT, a blog post, or an email, and it does not work. The cause is almost always smart quotes.

Code parsers — JavaScript, Python, Bash, SQL, JSON, HTML, and so on — recognize only straight quotes as string delimiters. Smart quotes are a completely different character that the parser sees as ordinary text, not syntax.

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”}

If you are a developer and a pasted snippet from anywhere does not work for no visible reason, checking for smart quotes is the first thing you should do.

Why AI Models Produce Smart Quotes

Large language models like ChatGPT, Claude, and Gemini learn writing style from their training data. That training data is dominated by professionally edited text: books, journalism, academic writing, legal text, technical documentation from large publishers. In all of these, smart quotes are standard.

The model learns, implicitly, that quotation marks should curl inward. It has no concept of "but this time I am producing code that will be executed." It just produces the quotation marks it learned are correct.

This is the same pattern that produces other AI writing tells:

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

Together, these four patterns account for the majority of visible "AI style" in generated text.

How to Type Smart Quotes

You rarely need to type smart quotes manually, because most writing tools insert them automatically. But when you do:

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

If you are a developer or technical writer, automatic smart-quote conversion is usually more trouble than it is worth. Here is how to disable it everywhere:

  • 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.
  • Slack: Preferences > Advanced. Turn off Format messages with markup if it is inserting smart quotes.
  • Notion: Settings > Preferences > General. Turn off Convert typed text into emoji and related autoreplace settings.
  • Outlook: File > Options > Mail > Editor Options > Proofing > AutoCorrect Options > AutoFormat As You Type. Uncheck smart quotes.

Converting Smart Quotes to Straight Quotes

When you already have text full of smart quotes and need straight ones, bulk conversion is the answer.

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. Smart quotes are highlighted alongside other special characters. You can also use the "Strip Invisible Characters" button to clean most typographic noise in one click, then convert the quotes separately if needed.

Smart Quotes vs Prime Marks

There is a third family of quote-like characters that is often confused with smart quotes: the prime marks, used for feet, inches, minutes, and seconds.

CharacterSymbolCodepointUse
PrimeU+2032Feet, minutes of arc, minutes of time
Double PrimeU+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

If you are writing 5'10" for a height measurement, the typographically correct version is 5′10″ using prime marks, not smart quotes and not straight quotes. AI models sometimes get this right and 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

This is technically valid but almost always a mistake. URLs with smart quotes happen when someone copies a URL from a Word document or rich-text email. The URL will not match the original, and servers may return 404 or redirect unexpectedly. Always use straight quotes (or no quotes) in URLs.

Similarly, file names with smart quotes cause cross-platform headaches — a file named "Report".pdf with smart quotes behaves differently on macOS, Windows, and Linux, and breaks scripts that expect ASCII-only file 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 — books, magazines, news articles — where smart quotes are standard. Human writers usually type straight quotes because those are on the keyboard. When you see curly quotes appear in unexpected places like code snippets, terminal commands, or casual emails, AI output is a common source.
Why do smart quotes break code?
Programming languages, terminals, and config files recognize straight quotes (") as string delimiters. Smart quotes (“ ” ‘ ’) are different Unicode characters that the parser does not recognize as quote marks. Pasting AI-generated code into an editor often fails silently or loudly for this exact reason — the code looks right but every string literal is wrapped in unrecognized 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 detect or remove Smart Quotes characters in your text?

Open Invisible Character Viewer