macOS features several aggressive, iOS-style typing corrections designed to make casual typing easier. One of these features is the automatic conversion of “Smart Quotes” and “Smart Dashes.” If you type standard, straight quotation marks (" "), macOS quietly replaces them with slanted, curly quotation marks (“ ”). If you type two hyphens (--), it merges them into a single, long em-dash (—).
While curly quotes look elegant in a word processor, they are a complete disaster for software developers, system administrators, and web designers. Code editors, terminal prompts, and HTML tags strictly require standard, straight ASCII quotation marks. If you paste curly quotes into a script, the script will immediately break. You must disable this typographic auto-formatting.
How to Turn Off Smart Quotes on Your Mac
You can disable these typography replacements directly from the Keyboard settings menu.
- Click the Apple Logo in the top-left corner of your Mac’s screen.
- Select System Settings (or System Preferences on older macOS versions).
- Scroll down the left-hand navigation sidebar and click on Keyboard.
- In the main window on the right, look for the “Text Input” section.
- Next to “Input Sources,” click the Edit… button.
- A new dialogue box will appear containing various grammar toggles.
- Locate the toggle switch labelled Use smart quotes and dashes.
- Click the toggle switch to turn it Off.
- Click the Done button at the bottom of the dialogue box.
Your Mac will immediately stop beautifying your punctuation. When you press the quote key on your keyboard, macOS will output the exact, standard ASCII character you typed, ensuring your terminal commands and programming scripts function correctly without invisible syntax errors.