Others

How to Turn Off Spell Checking for Code in OneNote

Chanuka GeekiyanageChanuka Geekiyanage Nov 2, 2026 869 views

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.

How to Turn Off Spell Checking for Code in OneNote
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 you start

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.

Solution 1Recommended

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.

1
Open OneNote Options

Launch Microsoft OneNote, click on the 'File' tab in the top-left corner, and select 'Options' from the bottom of the menu.

2
Navigate to Proofing

In the OneNote Options dialog box, click on 'Proofing' in the left-hand sidebar.

3
Disable Automatic Spell Check

Under the 'When correcting spelling in OneNote' section, uncheck the box next to 'Check spelling as you type'.

4
Save Changes

Click 'OK' to apply the settings. The red squiggly lines will immediately disappear from your code snippets and regular notes.

Disable Spell Checking Globally in OneNote
Global Effect: Keep in mind that this will also prevent OneNote from checking spelling in your regular note text.
Free Microsoft Office alternative

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. 1. Download and Install: Visit the official WPS website, download the free installer, and complete the lightweight setup process.
  2. 2. Open Your Documents: Launch WPS Office and instantly open your existing Word, Excel, or PowerPoint files without losing formatting.
  3. 3. Customize Proofing Settings: Navigate to the Review tab to easily toggle spell check on or off according to your current drafting needs.
Fully compatible with Microsoft Office formats (.docx, .xlsx, .pptx).Advanced rich text formatting capabilities for better document styling and structure.Lightweight installation and completely free to use for everyday document editing.Familiar user interface with no learning curve required for Office users.
microsoft office alternative - wps office

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.