Have a screenshot? Convert it to LaTeX

LaTeX to MathML Converter

Paste LaTeX math and copy the MathML for a web page, Word or a screen reader. The preview shows the formula as you type.

  • Free, no sign-up
  • Block or inline MathML
  • Copy for Word
Templates

What MathML is for

MathML is the standard way to put real, editable math into software that is not LaTeX.

  • Web pages

    Chrome, Edge, Firefox and Safari display MathML without any script. Paste the markup into your HTML and the formula renders as text you can select and zoom.

  • Microsoft Word

    Word turns pasted MathML into its own editable equation. Copy for Word does this in one step.

  • Screen readers

    Screen readers can read MathML formulas aloud and let people step through them, which an image cannot offer. The LaTeX is also kept as alttext.

LaTeX and MathML side by side

The same formula in both notations. The MathML below is the converter’s real output.

LaTeX\frac{a}{b} = \sqrt{x^2 + 1}
a b = x 2 + 1
MathML
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mfrac>
    <mi>a</mi>
    <mi>b</mi>
  </mfrac>
  <mo>=</mo>
  <msqrt>
    <msup>
      <mi>x</mi>
      <mn>2</mn>
    </msup>
    <mo>+</mo>
    <mn>1</mn>
  </msqrt>
</math>

How to convert LaTeX to MathML

  1. Step 1: Paste the LaTeX

    Type or paste your formula. Surrounding $ … $ or \[ … \] are removed for you.

  2. Step 2: Pick block or inline

    Block for a formula on its own line, inline for one inside a sentence.

  3. Step 3: Copy or download

    Copy MathML, download a .mml file, or use Copy for Word to paste an editable equation into Word.

Try these formulas

Each preview here is MathML rendered by your browser. Press Try it to load the LaTeX into the converter.

  • Fraction and root

    Try it
    1 2
    \frac{1}{\sqrt{2}}
  • Summation

    Try it
    ∑ k = 0 n ( n k ) = 2 n
    \sum_{k=0}^{n} \binom{n}{k} = 2^n
  • Matrix

    Try it
    [ a b c d ]
    \begin{bmatrix} a & b \\ c & d \end{bmatrix}

LaTeX to MathML questions

How do I convert LaTeX to MathML?
Paste the LaTeX into the box above. The MathML tab shows the markup straight away; choose block or inline, then copy it or download it as a .mml file.
Is MathML still used?
Yes. MathML Core is supported by all major browsers (Chrome and Edge since version 109, Firefox and Safari for longer), Word reads it on paste, and it is the format screen readers understand for math. It is also what EPUB 3 uses for equations.
What is the difference between LaTeX and MathML?
LaTeX is a short markup people type, such as \frac{a}{b}. MathML is an XML format that describes the same formula as elements like <mfrac> and <mi>, which browsers, Word and assistive tools can read directly. LaTeX is easier to write; MathML is easier for software to display.
Block or inline: which do I need?
Block adds display="block", which centers the formula on its own line with full-size limits, as in a displayed equation. Inline sits inside a sentence and keeps the formula compact.
Can I paste the MathML into Word?
Yes. Copy for Word puts the MathML on the clipboard in the form Word expects; paste and you get an editable Word equation. You can also download a .docx after signing in with a free account.
Which converter produces the MathML?
MathJax, running in your browser. It covers standard LaTeX math with amsmath and amssymb. Your LaTeX is not sent to a server for this.
Can I convert a whole LaTeX document to HTML with MathML?
Not here: this tool converts formulas. For full documents, tools such as Pandoc (with its --mathml option) or LaTeXML convert a .tex file into HTML with MathML.

Have a formula to convert?

Convert LaTeX to MathML