How to disable smart quotes on Mac
macOS swaps your straight quotes (" and ') for typographic curly ones (" " and ' ') as you type. It looks polished in a Word document. It breaks everything in code, JSON, shell scripts, and Markdown. Here's how to turn it off.
Why smart quotes break things
The substitution happens silently at the character level. You type a standard ASCII quote and macOS delivers a Unicode curly quote in its place. That's a completely different character — and most software that parses text literally does not accept it:
- JSON. The JSON spec requires straight double quotes around keys and string values. A curly quote produces a parse error immediately. If you draft a JSON snippet in Notes or Mail and paste it into your editor, it arrives broken.
- Shell scripts and Terminal. A command like
echo "hello"typed into a Notes document becomesecho "hello". The shell can't parse the curly quotes and throws a syntax error — often a confusing one. - Markdown. Fenced code blocks, inline code, link URLs, and attribute values in HTML all rely on straight quotes. Curly quotes in those positions produce malformed output.
- Python, JavaScript, Swift, and most other languages. String literals need ASCII quotes. Pasting code from any smart-quote-enabled app into your editor means hunting down invisible substitutions before the code compiles.
The smart dash substitution is the same problem: -- becomes an em dash (—) and - between words can become an en dash (–). In code, a double-hyphen flag like --help silently turns into —help, which means nothing to any CLI tool.
Turn it off in System Settings (macOS 13 Ventura and later)
Both smart quotes and smart dashes share one checkbox:
- Open System Settings (Apple menu → System Settings).
- Click Keyboard in the sidebar.
- Next to "Text Input", click Edit…
- Uncheck "Use smart quotes and dashes".
- Click Done.
The change is immediate in most apps. On macOS 12 Monterey and earlier, the path is System Preferences → Keyboard → Text, and the same checkbox appears directly in the list.
Turn it off with Terminal commands
Smart quotes and smart dashes are controlled by two separate preference keys. Run both to disable them together:
# disable curly quote substitution
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
# disable em-dash and en-dash substitution
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
Quit and reopen any apps where you want the change to take effect. Most apps read these preferences at launch.
To re-enable both:
# restore smart quotes
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool true
# restore smart dashes
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool true
Mainspring turns this exact setting — and 90+ others macOS buries in Terminal — into a single labelled toggle. Flip Disable smart quotes and dashes on, and flip it back just as fast. No commands to memorize, nothing permanent.
Try Mainspring free →Signed & notarized by Apple · 1-day free trial · $29 once
How to re-enable smart quotes
In System Settings, go back to Keyboard → Text Input → Edit and check "Use smart quotes and dashes" again. If you used Terminal, run the -bool true commands above and relaunch the relevant app.
Per-app behavior in code editors
Most dedicated code editors handle quotes themselves and never pass the raw keypress through macOS's substitution layer:
- Xcode. Manages its own text input. Smart quote substitution from macOS does not affect code files in Xcode. You may still see it in Xcode's plain text fields (like commit messages in the built-in Source Control view).
- VS Code. Electron-based, so it bypasses macOS text substitution entirely. Smart quotes are not an issue in VS Code regardless of your system setting.
- Nova, BBEdit, Sublime Text. All native macOS apps that give you per-app control in their Preferences. Check each app's Preferences → Text or Preferences → Editing section.
- Notes, Mail, Pages, TextEdit. Fully respect the macOS system setting — turn it off once and these all use straight quotes.
If your team shares code snippets via Slack, Notion, or any web-based tool, those apps run in a browser and are not affected by the macOS setting. Browser text fields do their own thing; smart quotes generally don't appear there.
What about smart quote styles?
When smart quotes are on, you can also change which style macOS uses — the default is double curly (" ") but you can switch to French guillemets (« ») or other styles in the same Keyboard → Text Input → Edit panel. Once you turn the feature off entirely, the style choice becomes irrelevant.