LaTeX Equation Editor

Free LaTeX equation editor with live KaTeX preview, a symbol palette and PNG or SVG export. Copy the markdown math snippet for any document.

LaTeX
Symbol palette
Preview

Loading KaTeX…

Copy as
$$
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
$$

PNG and SVG exports capture the preview box with html-to-image. Fonts are embedded when the browser can read them; if a glyph looks off in the SVG, use the PNG.

What Is a LaTeX Equation Editor?

A latex equation editor is a tool that turns LaTeX math notation, such as \frac{a}{b} or \sum_{i=1}^{n} x_i, into a typeset formula you can see while you type. LaTeX is the standard way to write mathematics in papers, textbooks, Jupyter notebooks and markdown documents, but the syntax is unforgiving and hard to check without a preview.

This equation editor renders with KaTeX, the fast math typesetting library used by this site's markdown editor and by Notion, Obsidian and GitLab. A palette inserts symbols at the caret so you do not have to remember every command, the strict parser reports errors with the position, and the result can be exported as PNG or SVG or copied as a markdown snippet, MathML or HTML.

How to Write an Equation in LaTeX

  1. Load a template or type LaTeX in the left pane. Leave out the $ delimiters; the editor adds them when you copy.
  2. Choose Display for a centred block equation or Inline for math inside a sentence.
  3. Click a symbol in the palette to insert it at the caret. Snippets with braces, such as \frac{}{}, leave the caret inside the first group; select text first to wrap it.
  4. Read the error box if the preview shows red text, fix the reported position and the equation re-renders.
  5. Copy the $…$ or $$…$$ markdown, the MathML, or the HTML, or download a PNG at 2x for slides and documents.

Common LaTeX Math Commands

What you wantLaTeXNotes
Fraction\frac{a}{b}\dfrac forces display size inline
Square root\sqrt{x}, \sqrt[3]{x}Optional argument for the index
Powers and indicesx^{2}, a_{ij}Braces needed for more than one character
Sum, product, integral\sum_{i=1}^{n}, \prod, \int_a^bLimits render above and below in display mode
Greek letters\alpha, \beta, \OmegaCapitalise the command for uppercase
Matrix\begin{pmatrix} a & b \\ c & d \end{pmatrix}bmatrix for square brackets, vmatrix for determinants
Cases\begin{cases} … \end{cases}Separate rows with \\ and columns with &
Text inside math\text{if } x > 0Keeps spaces and upright letters
Sets and logic\in, \subseteq, \forall, \mathbb{R}Blackboard bold for number sets

LaTeX to PNG, SVG, MathML and HTML

Different destinations need different formats. Markdown files, Jupyter and Obsidian take the raw $…$ snippet. Word, PowerPoint and Google Docs cannot read LaTeX directly, so use latex to png at 2x or 3x for a crisp picture, or paste the MathML into Word's equation editor to keep it editable. Web pages can embed the copied HTML together with the KaTeX stylesheet, or the SVG for a single self-contained image.

The image exports are produced by rendering the preview box with html-to-image. Fonts are embedded when the browser can read them, which is the case for KaTeX's own fonts on this site; if a glyph looks wrong in the SVG in another application, use the PNG instead.

Why Use an Online LaTeX Editor for Equations

Installing a full TeX distribution just to check one formula is slow, and a MathJax editor embedded in a CMS rarely shows parse errors. A browser-based latex equation editor gives you the immediate feedback of a live preview, a palette for the commands you forget, and export in the format the next tool needs. Your recent equations are kept in the browser so you can reuse a matrix or integral without retyping it, and the same syntax renders identically in the markdown editor on this site.

Frequently Asked Questions

What is the difference between inline and display math?

Inline math sits inside a sentence and is wrapped in single dollar signs, like $E = mc^2$. Display math is centred on its own line, wrapped in double dollar signs, and renders large operators such as sums and integrals with their limits above and below. The Mode selector switches between the two and the markdown snippet changes with it.

Does this latex equation editor work with MathJax and Markdown?

Yes. The editor renders with KaTeX, which supports the same core LaTeX math commands as MathJax, so an equation that renders here works in a MathJax editor, Jupyter, Obsidian, Typora, Pandoc and any markdown processor with math enabled. Copy the $...$ or $$...$$ snippet and paste it into your document.

How do I convert LaTeX to PNG?

Set the font size and text colour, then click Download PNG. The rendered equation is captured from the preview at 1x, 2x or 3x resolution in your browser. Choose White text to get a version for dark slides; the export background switches to dark automatically.

Can I get MathML for Word or Google Docs?

Yes. Copy MathML produces a <math> element generated by KaTeX. Word's equation editor accepts pasted MathML, and it is also the accessible format screen readers use, so it is worth including in HTML pages alongside the visual rendering.

Why does part of my equation render in red?

KaTeX shows the part it could not parse in red and the error box below the preview explains why, for example an unbalanced brace or an unknown command. Fix the reported position and the whole equation renders normally.

Is anything uploaded when I use the online latex editor?

No. Rendering, validation, image export and the equation history all happen in your browser. History is stored in localStorage on your device and can be cleared with one click.

Related Tools