Home / Science / Research toolkit / Writing and publishing / Equation converter (LaTeX and MathML)Tool #803

LaTeX to MathML converter for Word and LibreOffice, and MathML back to LaTeX (with live preview)

Type or paste LaTeX maths and get MathML you can paste into Word, LibreOffice or a web page, with a live preview drawn from that MathML. Or paste MathML and get LaTeX back. Fractions, roots, sums, integrals, matrices, accents and Greek letters. Errors say what is wrong and where.

Keep it one tap away for everyday use.

Bookmark Equation converter (LaTeX and MathML)?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. LaTeX
  2. MathML
  3. Preview
  4. Paste
Nothing is uploadedWorks offline once open
Examples:

Display maths puts limits above and below sums. Keeping the LaTeX adds it as an annotation, so some programs can show the source again. Indenting only makes the MathML easier to read.

Preview

Drawn by your browser from the MathML below, so what you see is what Word or LibreOffice will get. Fonts differ a little between programs.

MathML

How to paste it into Word or LibreOffice

Word (Windows and Mac, 2016 or newer): click Copy MathML, then in Word paste with Ctrl+V (⌘+V). Word turns it into an equation you can edit. If it arrives as text, paste with Keep Text Only into an empty equation box (Insert, Equation) instead.

LibreOffice Writer: Insert, Object, Formula Object, then in the formula editor use Tools, Import MathML from Clipboard. LibreOffice Math can also open the downloaded .mml file.

Web pages: the MathML works as it is inside HTML in every current browser.

What LaTeX it understands

What it does

Word and LibreOffice do not read LaTeX, but both read MathML, the maths language of the web. This page turns LaTeX maths into MathML as you type, draws the equation from that MathML so you can check it, and gives you a Copy button. It also works the other way: paste MathML from Word, a web page or another program and get LaTeX you can drop into a paper.

It understands the LaTeX most papers use:

  • Fractions and roots: \frac, \dfrac, \tfrac, \binom, \sqrt, \sqrt[n].
  • Scripts: x^2, a_{ij}, primes such as f'(x), and {}^{14}C.
  • Large operators with limits: \sum, \prod, \int, \oint, \lim, \max and more, with \limits and \nolimits.
  • Brackets: \left( ... \right), \middle|, \big to \Bigg, and \left. for no bracket.
  • Matrices and layouts: matrix, pmatrix, bmatrix, Bmatrix, vmatrix, Vmatrix, cases, aligned, gathered and array.
  • Accents and fonts: \hat, \bar, \vec, \dot, \tilde, \overline, \underbrace; \mathbf, \mathbb, \mathcal, \mathrm, \boldsymbol; and \text{...}.
  • Greek letters, operators, relations and arrows, with the full list on the page.

How to use it

  1. LaTeX. Type your equation in the box, or pick an example. Dollar signs, \[ ... \] and \begin{equation} around it are fine; they are taken off.
  2. MathML. The MathML appears below as you type. Choose On its own line for a displayed equation (limits go above and below a sum) or In a line of text.
  3. Preview. Your browser draws the equation from the MathML itself, so a mistake in the preview is a mistake in the MathML.
  4. Paste. Press Copy MathML and paste into Word with Ctrl+V (⌘+V on a Mac): Word turns it into an equation you can edit. In LibreOffice, open a formula object and use Tools, Import MathML from Clipboard. Or download the .mml file.

To go the other way, press MathML to LaTeX and paste MathML. Switching direction carries the current result across, so you can check a round trip.

Options

  • Show the equation: display (its own line) or inline. Only changes the display setting of the MathML.
  • Keep the LaTeX inside the MathML: adds your LaTeX as an annotation, so programs that understand it can show the source again.
  • Indent the MathML: puts each element on its own line, easier to read; the maths is the same.

Worked example

The quadratic formula x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} becomes

<math display="block"><mrow><mi>x</mi><mo>=</mo><mfrac><mrow><mo>−</mo><mi>b</mi><mo>±</mo><msqrt>...</msqrt></mrow><mrow><mn>2</mn><mi>a</mi></mrow></mfrac></mrow></math>

Letters become <mi>, numbers <mn>, operators <mo> (the hyphen becomes a true minus sign, −), and the fraction an <mfrac> with the numerator and denominator inside. Switch to MathML to LaTeX and the same MathML comes back as x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.

When something is wrong

Errors name the problem and its place, with a caret under the spot. For example \frac{a} says “the denominator is missing here”, x^2^3 says “Double superscript”, and \left( without \right points at the \left. Unknown commands, such as your own \newcommand macros, are named so you can write them out.

FAQ

Does Word really accept pasted MathML? Yes, Word 2016 and newer, on Windows and Mac, convert MathML text on paste. If your copy arrives as plain text, paste it into an empty equation box.

Why do bold and blackboard letters look like special characters? \mathbf{F} becomes the Unicode letter 𝐅 and \mathbb{R} becomes ℝ, as MathML Core recommends, so they look right in every program.

Is anything sent anywhere? No. The conversion runs on this page and works offline.

What is not supported? Your own macros, colours, lines inside arrays, chemistry (\ce) and commutative diagrams.

Where the numbers come from

  • The LaTeX reader, the MathML writer and the MathML reader are written by fibub. Command meanings follow the LaTeX and amsmath manuals; characters follow the Unicode and MathML standards (W3C MathML Core).
  • Checked in the tests against latex2mathml 3.81.1 (Python, MIT licence) on 87 expressions, and by converting every expression to MathML, back to LaTeX and to MathML again.
  • The examples are textbook formulas (quadratic formula, Gaussian integral, Maxwell's equations).

Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

Last updated 2026-11-09.

Related tools

Graph digitiser #26 Open a picture or screenshot of a graph, mark the axes, then click the points or let it trace a curve by colour. Get the numbers as a table to copy or download. The image never leaves your device. Uncertainty propagation calculator #25 Type your formula and your measurements with their uncertainties, or paste repeated readings. Get the result with its uncertainty, which input matters most, and a Monte Carlo check. Publication plot maker #27 Paste columns or open a CSV or Excel file and get a clean scientific figure with error bars, sized for a journal column. Download vector SVG or PDF, or PNG at 300 or 600 dpi. Your data stays in your browser. Table converter (LaTeX, Markdown, HTML) #804 Paste cells from Excel, Google Sheets or LibreOffice, or open a CSV or Excel file, and get a LaTeX table (booktabs rules, caption and label, siunitx decimal alignment), a Markdown table or an HTML table. Special characters are escaped and numbers can be rounded the way you would on paper. Scientific notation formatter #810 Turn numbers into scientific, engineering or SI-prefix notation with the significant figures you want, and round a value with its uncertainty the standard way (1 or 2 figures on the uncertainty). Copy as Unicode, plain text, LaTeX or siunitx, for one number or a whole column. Author list and affiliation formatter #801 Type your authors and affiliations once, in a simple line format, and get the author block for AASTeX, MNRAS, A&A, REVTeX or elsarticle, a numbered superscript list for Word, plain text or JATS-style XML. Repeated affiliations are merged and numbered in order, ORCID iDs are checked, and the corresponding author is marked.