How to repair markdown math for consistent rendering
- Step 1Reproduce the rendering bug — Confirm the formula renders as literal source on your site. View the raw Markdown and note which delimiter style the broken equation uses versus the ones that DO render.
- Step 2Identify the renderer's expected style — KaTeX / remark-math / GitHub math →
$/$$. Classic MathJax with TeX delimiters →\(/\[. The delimiters that already render correctly tell you the target. - Step 3Paste the document — Drop the
.md/.mdxfile or paste the source into the input. The character counter tracks you against the 500,000-character Free limit. - Step 4Set Target style to the working delimiter family — Pick
$ inline / $$ block (KaTeX)or\( \) inline / \[ \] block (MathJax)so the broken equations are rewritten to match the ones that already work. - Step 5Process and re-check on the renderer — Run the pass, paste the output back into your doc, and confirm the formerly-broken equation now typesets. A delimiter swap fixes mismatch bugs, not malformed LaTeX.
- Step 6Manually fix any remaining LaTeX errors — If an equation still fails after delimiters match, the problem is the LaTeX itself (a bad command, an unbalanced brace) — this tool does not edit equation content, so repair those by hand.
Rendering symptom → likely cause → fix
Maps the visible bug to whether md-math-normalizer can fix it. Delimiter mismatches are in scope; content errors are not.
| Symptom | Likely cause | Does this tool fix it? |
|---|---|---|
Formula shows as literal \(x\) | Renderer expects $ but source uses \( | Yes — target dollar |
Formula shows as literal $x$ | Renderer expects \( but source uses $ | Yes — target tex |
| Display equation renders inline | \[...\] not on its own block | Yes — target dollar adds blank-line surrounds |
| Some equations render, others don't | Mixed delimiter styles in one doc | Yes — converge on one target |
| Equation renders but symbols wrong | Broken/missing LaTeX command | No — edit the LaTeX manually |
Backslashes doubled e.g. \\frac | Escape damage from copy-paste | No — this tool does not unescape |
What the pass rewrites for each target
The exact delimiter rewrites. Only one direction runs per pass; the target style's own delimiters are never re-touched.
| Delimiter in source | Target `dollar` | Target `tex` |
|---|---|---|
\(...\) | → $...$ | unchanged |
\[...\] | → $$...$$ + blank lines | unchanged |
$...$ | unchanged | → \(...\) |
$$...$$ | unchanged | → \[...\] |
Anything in a ``` ``` fence | skipped | skipped |
Tier limits (markdown family)
File-size and character ceilings per plan; charLimit is checked independently of byte size.
| Tier | Max file size | Max characters | Files per run |
|---|---|---|---|
| Free | 1 MB | 500,000 | 1 |
| Pro | 10 MB | 5,000,000 | 10 |
| Pro-media | 50 MB | 20,000,000 | 50 |
| Developer | 500 MB | Unlimited | Unlimited |
Cookbook
Each fix below is a real 'math won't render' bug. Note which are delimiter problems (in scope) versus content problems (out of scope).
KaTeX page shows literal `\(...\)`
The site renders $ math fine but a pasted MathJax snippet uses \(...\) and appears as raw text. Target dollar converts it so KaTeX picks it up.
BEFORE (renders as literal text on a KaTeX site):
The limit \( \lim_{x\to 0} \frac{\sin x}{x} = 1 \) is standard.
TARGET: dollar
AFTER (now typesets):
The limit $ \lim_{x\to 0} \frac{\sin x}{x} = 1 $ is standard.Display equation rendered inline
A \[...\] block sat in the middle of a sentence and rendered inline (or not at all). Target dollar lifts it onto its own $$ block with blank lines, the form block renderers need.
BEFORE:
We minimize \[ J(\theta) = \tfrac{1}{2m}\sum (h-y)^2 \] over theta.
TARGET: dollar
AFTER:
We minimize
$$ J(\theta) = \tfrac{1}{2m}\sum (h-y)^2 $$
over theta.Mixed styles in one help article
An article assembled from several sources mixes $, $$, and \(. Targeting dollar leaves the dollars and converts the strays so everything renders under one renderer.
BEFORE:
Use $p$ for probability, then \( \hat{p} \) for the estimate, with
\[ \text{Var}(\hat p) = \frac{p(1-p)}{n} \]
TARGET: dollar
AFTER:
Use $p$ for probability, then $ \hat{p} $ for the estimate, with
$$ \text{Var}(\hat p) = \frac{p(1-p)}{n} $$Out of scope: doubled backslashes
Copy-paste sometimes doubles backslashes (\\frac). The tool does NOT unescape these — it only moves delimiters. The equation still fails after a delimiter swap and must be fixed by hand.
BEFORE (escape-damaged):
The ratio \( \\frac{a}{b} \) is wrong.
TARGET: dollar
AFTER (delimiters fixed, LaTeX still broken — fix manually):
The ratio $ \\frac{a}{b} $ is wrong.Documented delimiter example stays put
A how-to article explains delimiter syntax inside a fenced block. The fence is skipped so the teaching example is preserved while the live prose is fixed.
BEFORE: Write display math as \[ ... \], for example: ```markdown \[ a^2 + b^2 = c^2 \] ``` TARGET: dollar AFTER: Write display math as $$ ... $$ , for example: ```markdown \[ a^2 + b^2 = c^2 \] ```
Edge cases and what actually happens
A delimiter swap doesn't fix broken LaTeX
Out of scopeIf an equation still fails after delimiters match the renderer, the LaTeX content is the problem — an unknown macro, an unbalanced {, or a missing argument. This tool never edits equation content; fix those by hand or in your build's KaTeX error log.
Doubled backslashes survive untouched
Out of scopeDespite what some copy-paste workflows cause, this tool does not unescape \\frac back to \frac. It only relocates delimiters. Use a find/replace step or fix the source if backslashes were doubled during copying.
Currency dollars break when targeting tex
Invalid pairingTarget tex pairs consecutive $ signs, so prose like $10 plan vs $20 plan becomes \(10 plan vs \)20 plan. On docs with pricing or shell $VAR examples in prose, prefer the dollar target, which ignores literal $.
Inline backtick code is rewritten
EditedOnly ``` fences are protected. A delimiter shown inline like $x$ ` will be converted. When documenting syntax, put it in a triple-backtick fenced block, not an inline span.
Tilde fences are not protected
Edited~~~ ... ~~~ blocks are treated as prose, so math inside them is converted. Switch teaching examples to ``` ``` fences to keep them verbatim.
Inline math across a line break is left alone
PreservedThe $...$ → \(...\) rule skips spans containing a newline. If an inline formula was accidentally split across two lines, join it first; otherwise it won't convert.
Existing `$$` blocks aren't re-spaced
By designTargeting dollar only adds blank-line surrounds to \[...\] it converts. A pre-existing cramped $$...$$ won't gain blank lines from this tool. If a tight $$ block renders inline, add the blank lines manually or run md-prettifier.
Math content padding is preserved
PreservedThe tool swaps delimiters but leaves the inner math (and its spaces) exactly as written, so \( x \) becomes $ x $. Tidy spacing yourself if your renderer is fussy.
Page exceeds the character limit
RejectedOver 500,000 characters on Free, the input is blocked. A giant API-reference page with thousands of formulas may hit this — upgrade to Pro (5,000,000) or split with md-splitter first.
Frequently asked questions
My formula shows as plain text — does this tool fix that?
Almost always, yes, when the cause is a delimiter the renderer doesn't recognize. Set Target style to the delimiter family your renderer scans for (the one that already works elsewhere on the page) and run the pass. If it still fails after delimiters match, the LaTeX content itself is broken, which this tool does not touch.
Can it fix escaped or doubled backslashes from copy-paste?
No. This tool only relocates delimiters; it does not unescape \\frac to \frac or repair LaTeX content. For escape damage, fix the source or use a separate find/replace pass — then run this tool to normalize the delimiters.
How do I know which target to choose?
Look at which equations already render on your page. If $...$ math works, target dollar to convert the broken \(/\[ ones. If \(...\) math works, target tex. The working style is your target.
Why does my display equation render inline?
Block renderers need display math on its own line. If a \[...\] is mid-sentence, targeting dollar rewrites it to $$...$$ surrounded by blank lines, which makes it a standalone block. A cramped existing $$ won't be re-spaced, though — add blank lines manually in that case.
Does it skip code blocks?
It skips triple-backtick ``` fenced blocks. It does NOT skip inline backtick spans or ~~~ tilde fences — math inside those is converted. Use ``` fences for any syntax you want preserved.
Will it break my pricing or `$VAR` examples?
Only if you target tex, which pairs consecutive $ signs and can mis-wrap prose dollars. Target dollar never scans literal $, so it is the safe choice for docs containing currency or shell variables.
Is it safe to run on an already-fixed document?
Yes. Each pass only converts the non-target delimiter family, so a fully-normalized document comes out unchanged. Re-running never doubles delimiters.
Does it edit the math inside the delimiters?
No. The equation content and its internal spacing are preserved verbatim — only the delimiter characters change.
Does anything get uploaded?
No. All processing happens in your browser, so internal or unreleased documentation stays local. No account is needed for the Free tier.
What input formats are accepted?
.md, .mdx, .markdown, .txt, or pasted text. The output is normalized Markdown ready to paste back into your docs platform.
How large a doc can I fix at once?
Free handles 1 MB / 500,000 characters per file, one at a time. Pro raises it to 10 MB / 5,000,000 characters and 10 files; the character limit is separate from the byte limit.
What pairs well after fixing the math?
Run md-lint to catch other rendering-adjacent issues, md-code-block-tagger to tag fenced examples, and md-prettifier for consistent whitespace before publishing.
Privacy first
All Markdown processing runs locally in your browser using JavaScript. No file is ever uploaded to JAD Apps servers — only metadata counters are saved for signed-in dashboard stats.