How to Stop Microsoft Word from Automatically Converting Straight Quotes to Smart Quotes

When you type a quotation mark (“) or an apostrophe (‘) in Microsoft Word, the application’s AutoFormat engine automatically intercepts your keystroke and replaces the standard, straight, vertical quote mark with a curved “Smart Quote” (often referred to as a curly quote or a typographer’s quote).

While curly quotes look much more professional in printed documents and books, they are an absolute disaster if you are typing raw code snippets (HTML, CSS, Python) or specific command-line strings directly into a Word document. Compilers and terminal interpreters do not understand curly quotes; if you copy and paste a curly quote into a code editor, the code will instantly break and throw a syntax error.

If you use Word for technical documentation, you must force it to leave your straight quotes alone.

How to Disable Smart Quotes in Word

This setting is buried deep within the AutoCorrect Options menu.

  1. Open a document in Microsoft Word.
  2. Click on File in the top-left corner of the ribbon.
  3. Click on Options at the bottom of the left sidebar.
  4. In the Word Options window, select Proofing from the left-hand navigation pane.
  5. Click the AutoCorrect Options… button in the main pane.
  6. A new dialog box will open. Click on the tab labeled AutoFormat As You Type.
  7. Look under the “Replace as you type” section at the top of the tab.
  8. Uncheck the box labeled “Straight quotes” with “smart quotes”.
  9. (Optional) For total safety, also click on the AutoFormat tab (next to AutoFormat As You Type) and uncheck the identical box there as well.
  10. Click OK twice to close both windows and save your changes.

Microsoft Word will immediately stop converting your punctuation. Every quotation mark and apostrophe you type will remain strictly vertical, ensuring your code snippets are perfectly safe to copy and paste directly into an IDE.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.