Markdown Math Preview
Write Markdown with LaTeX math ($inline$ and $$block$$ syntax) and see it rendered live in your browser using KaTeX. Free, no signup, nothing uploaded.
Markdown Math Preview
Standard Markdown has no built-in support for mathematical notation. The common convention — supported natively by GitHub, GitLab, and several other platforms — is to write formulas in LaTeX syntax wrapped in dollar signs, then have a rendering engine turn that into typeset math. This tool renders that math live in your browser as you type, using the open-source KaTeX engine, so you can check your formulas actually look right before pasting them into a README, wiki, or note-taking app.
Syntax
Inline math uses single dollar signs, with no space right after the opening $ or right before the closing $:
The formula $E = mc^2$ represents mass-energy equivalence.
Block (display) math uses double dollar signs, usually on their own lines:
$$
\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
$$ This tool follows the same "no adjacent whitespace" rule GitHub uses for inline math, so prices like $5, $10 are correctly left alone and not mistaken for a math expression — a real gotcha with naive dollar-sign detection.
What renders well
KaTeX covers the large majority of everyday LaTeX math: fractions (\frac), exponents and subscripts (x^2, H_2O), roots (\sqrt), Greek letters (\alpha, \beta), sums and integrals (\sum, \int), matrices, and most standard operators and symbols. Formulas that fail to parse show a red inline error instead of silently breaking your whole document, and the specific error is listed below the preview so you can see exactly what to fix.
Known limitations — read before relying on this for another platform
| Limitation | Detail |
|---|---|
| Rendering engine differences | This preview uses KaTeX. GitHub's own math rendering and MathJax (used by many Jekyll/Hugo setups) can differ slightly in spacing, glyph shapes, and support for a handful of obscure LaTeX commands — this preview is a very close approximation, not a pixel-perfect guarantee of how GitHub or MathJax will render the same source. |
| Not every platform supports math at all | GitHub, GitLab, and Obsidian render $...$/$$...$$ math natively. Plain CommonMark, most static-site generators (Jekyll/kramdown, Hugo, Docusaurus), and Confluence/Notion/Slack do not render math out of the box — they need an explicit MathJax or KaTeX plugin/script added to the page, or they'll show the literal dollar-sign text. Always confirm math support on your specific target platform before relying on it. |
| Advanced LaTeX packages | Some LaTeX packages and commands used in academic papers (custom macros, certain chemistry or physics packages beyond the basics) aren't part of KaTeX's supported command set and will show as a red parse error here even if a full LaTeX/MathJax installation would render them. |
| Copied HTML needs KaTeX's CSS | The "Copy HTML" button copies the rendered markup, but that markup relies on KaTeX's own stylesheet and font files to display correctly. Pasting it into a page that doesn't already load KaTeX's CSS will show unstyled, misaligned math — this is meant for platforms that already have KaTeX available, not as a fully self-contained snippet. |
Common use cases
- Technical documentation — check a formula renders correctly before committing it to a README
- Academic notes — draft equations for a paper or thesis written in Markdown
- Data science READMEs — document model formulas, loss functions, and statistics
- Wiki and note-taking apps — verify math syntax before pasting into Obsidian, GitHub wikis, or GitLab
For platform-by-platform setup details (including how to enable MathJax on Jekyll and Hugo), see our companion guide: Math Expressions in Markdown: Complete LaTeX and MathJax Guide.
Related tools
- Markdown Live Editor — write and preview your full document alongside your math
- Markdown Linter — check the rest of your document for style issues
- Table of Contents Generator — generate a TOC for a long math-heavy document