How to Turn Off Spell Checking for Code in OneNote
Question details
The user wants to disable spell checking specifically for the Code style or selected code snippets without turning it off for the rest of their notes.

- Product
- Microsoft OneNote
- Device & OS
- not provided
- Scenario
- Pasting or writing programming code snippets inside standard note pages for documentation purposes.
- Observed behavior
- OneNote flags programming syntax as misspelled words with red squiggly lines and does not provide an option to disable spell check for only a specific style or selection.
Before proceeding, note that OneNote does not currently support disabling spell check for specific paragraph styles or text selections. You will need to apply a global setting or utilize a workaround.
Disable Spell Checking Globally in OneNote
Turn off the spell check feature for the entire application to remove red squiggly lines from all notes, including code blocks.
Since OneNote does not allow partial spell check disabling, the most direct way to remove red lines from your code is to turn off 'Check spelling as you type' globally.
Launch Microsoft OneNote, click on the 'File' tab in the top-left corner, and select 'Options' from the bottom of the menu.
In the OneNote Options dialog box, click on 'Proofing' in the left-hand sidebar.
Under the 'When correcting spelling in OneNote' section, uncheck the box next to 'Check spelling as you type'.
Click 'OK' to apply the settings. The red squiggly lines will immediately disappear from your code snippets and regular notes.

Add Programming Terms to Your Custom Dictionary
Keep spell check enabled for regular text but prevent it from flagging your frequently used code syntax.
Embed or Attach Code Files Instead
Use a dedicated code editor for your scripts and attach the file to OneNote to avoid spell-check issues and maintain proper syntax highlighting.
Upgrade Your Note-Taking and Document Workflow with WPS Office
If you are frustrated by the limitations of Microsoft Office applications like OneNote, consider switching to WPS Office. It provides a lightweight, highly compatible, and versatile suite for all your document needs, offering robust text formatting and easy-to-use proofing controls.
- 1. Download and Install: Visit the official WPS website, download the free installer, and complete the lightweight setup process.
- 2. Open Your Documents: Launch WPS Office and instantly open your existing Word, Excel, or PowerPoint files without losing formatting.
- 3. Customize Proofing Settings: Navigate to the Review tab to easily toggle spell check on or off according to your current drafting needs.

Frequently Asked Questions
Can I turn off spell check for a single text box in OneNote?
No, OneNote does not support disabling spell check for a specific text box or text selection. You can only disable it globally or add specific words to your custom dictionary.
Does OneNote have a dedicated code block feature that ignores spelling?
OneNote does not have a native code block feature that automatically disables spell checking. While some third-party add-ins provide code formatting, the spell check behavior remains tied to your global application settings.
How do I remove a wrongly added word from the OneNote custom dictionary?
To remove a word, go to File > Options > Proofing. Click on 'Custom Dictionaries', select your dictionary, and click 'Edit Word List'. From there, locate the mistakenly added word and delete it.
Will turning off spell check in OneNote affect Microsoft Word?
No, unchecking the 'Check spelling as you type' setting in OneNote Options only applies to OneNote. Word and Excel manage their own 'check as you type' settings independently.




