How to Stop Google Docs from Automatically Stripping Punctuation

The Formatting Frustration

When drafting complex documents, specifically those involving coding syntax, mathematical equations, or precise data formatting, standard punctuation marks like hyphens (`-`), straight quotes (`”`), and periods (`.`) carry specific technical meanings. By default, Google Docs attempts to make documents look more professional by automatically applying “Smart” formatting. This includes converting straight quotes to curly “smart quotes,” combining double hyphens into long em-dashes, and automatically stripping or replacing specific punctuation patterns it deems as typos. While useful for writing a novel, this automatic stripping and replacing of raw punctuation completely breaks the syntax of technical writing, causing compile errors if the text is copied into an IDE.

Disabling Smart Punctuation Substitutions

To stop Google Docs from automatically stripping, replacing, or formatting your precise punctuation marks, you must disable the Smart Quotes and automatic substitution features.

Open your Google Docs document. Navigate to the top menu bar and click on Tools. From the drop-down menu, select Preferences. This opens a new dialog box with two tabs. First, stay on the General tab. Locate the option labeled Use smart quotes and uncheck the box next to it. (You may also want to uncheck “Automatically detect lists” if it is interfering with hyphenation). Next, click over to the Substitutions tab. This tab contains a massive list of automatic character replacements. Look at the top of the tab for a master checkbox labeled Automatic substitution. Uncheck this master box to completely disable all auto-replacements (such as changing `–` to an em-dash). Click OK to save your changes. Google Docs will now respect your raw keystrokes, leaving your technical punctuation exactly as you type it.

Get the best tech tips delivered straight to your inbox.

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