Spell Check for Markdown: Tools That Skip Your Code and Links
You run spell check on a README and it underlines every variable name, file path and command flag. The tools that work for Markdown parse the syntax first, then check only the prose that is left.
Quick answer
For spelling and grammar, use a checker that understands Markdown nodes. LTeX+ (a LanguageTool language server) works in editors that speak the Language Server Protocol, and some note apps can send prose to a LanguageTool server. Add Vale only if you want house style rules, because it targets style more than grammar.
Why ordinary spell check struggles with Markdown
A Markdown file mixes prose with things that are not words: inline code, fenced blocks, URLs, file paths and escape sequences. A general spell checker sees all of it as text.
The problem is old. A CommonMark forum thread from 2019 asks for a checker that ignores "things within backticks, code blocks, URLs". The poster calls the alternative too noisy: you end up adding every variable name, part of a file path and language keyword to a dictionary.
That is also why the fix cannot be a regular expression. To know that a backtick span is code and not a stray apostrophe, the checker has to parse the document the way a Markdown parser does. If you want a refresher on which characters change meaning, see escaping special characters in Markdown.
The replies in that thread are a fair map of the options. One suggests a pandoc Lua filter, another says BBEdit does it, and a third recommends the VS Code extension SpellRight, with the caveat that it is "a bit limited regarding user-provided dictionary additions".
LanguageTool-based checkers
LanguageTool is an open-source spelling, grammar and style engine. Several Markdown tools wrap it.
LTeX and LTeX+
LTeX is a VS Code extension that provides offline grammar checking of markup languages using LanguageTool. It rates Markdown support as "Advanced" and says it does not upload anything to the internet.
It gives you the controls that matter for noisy files:
ltex.dictionaryholds extra words per language, with support for external word files.ltex.hiddenFalsePositiveshides one rule inside one sentence.ltex.disabledRulesturns off LanguageTool rules by ID.ltex.markdown.nodeslets you decide per Markdown node whether to check it, ignore it, or swap it for a placeholder word. The documented example ignoresCodeBlockandFencedCodeBlockand replacesCode(inline code) andAutoLinkwith a dummy.
Two practical details. First, set a specific language such as en-US, because the generic en gives grammar checks but no spelling errors. Second, the original repository was archived on April 12, 2026. LTeX+ LS continues the project: its README says Julian Valentin developed it as LTEX LS until version 16.0.0. It lists Markdown and MDX among its formats, works offline, and can run on files from the command line.
The README does not say which node types are skipped by default, so set ltex.markdown.nodes explicitly and test it.
Note apps with LanguageTool
QOwnNotes shows the same idea in a notes app. It can point at a local or remote LanguageTool server, and its documentation says "Empty lines, headings, and code blocks are skipped." You pick which categories to check: spelling, grammar, style, punctuation, typography. If the server is unreachable, checking stops with a warning.
A remote server means your text leaves the machine. A local server or an offline tool like LTeX+ doesn't.
Where Vale fits
Vale is a command-line prose linter. It is syntax-aware, and its documentation says block and inline code are ignored by default. But it describes itself as not a general-purpose writing aid, focused primarily on style rather than grammatical correctness. You write the rules.
Vale and LTeX+ do different jobs. LTeX+ answers "is this sentence correct?" Vale answers "does this follow our style guide?" For the second job, see setting up Vale as a prose linter, and for structural checks, linting and formatting your Markdown files.
Taming false positives
Even a Markdown-aware checker trips on product names and jargon. A short routine keeps it usable:
- Add product names and project terms to the dictionary.
- Disable rules that fight your style, one rule ID at a time, instead of switching the checker off.
- Test with a file that contains the constructs you use:
Run `npm install --save-dev` before the build.
cd ~/projects/my-app && git status
See https://example.com/docs/setup for details.If the checker underlines npm, --save-dev, my-app or the URL, its node settings are not doing what you think.
How Carets fits in
Carets is a native notes and code editor for iPhone, iPad and Mac. Markdown, plain text and code live in one editor, with syntax highlighting, organized into files, projects and tags. Because your files stay plain text, they are portable: a checker like LTeX+ or Vale can run on the same folder from your Mac, and the notes still open in Carets on your phone.
Carets is built for iOS and Mac, not wrapped from a web app, so opening a long README or a note full of fenced code stays quick. Get Carets on the App Store for iPhone, iPad and Mac.
Frequently Asked Questions
Does the built-in spell checker on iPhone and Mac skip code in Markdown?
The sources cited here do not test the system spell checker on Markdown, so check it yourself. A general spell check treats a file as text, which is why code, paths and URLs get underlined. Paste a fenced block like the one above and see what is flagged before trusting it.
What is the difference between LTeX and Vale?
LTeX sends Markdown prose to LanguageTool for spelling and grammar checks. Vale is a prose linter built around style rules you define, and it says it is not a general-purpose writing aid.
Is LTeX still maintained?
The original valentjn/vscode-ltex repository was archived on April 12, 2026. LTeX+ LS continues the project and lists Markdown and MDX among its supported formats.
Can I stop a checker from flagging project terms?
Yes. LTeX has a per-language dictionary, hidden false positives and disabled rules. QOwnNotes offers an "Ignore this rule" action in its context menu.