LaTeX Equation Editor
Write a LaTeX equation, watch it typeset as you type, and export it as a PNG or SVG with the background and color you need.
Type LaTeX maths. The preview updates as you type.
Rendered in your browser. Nothing is uploaded.
Examples
Algebra
Calculus
Matrices and cases
Physics
Famous identities
Export settings
Enter an equation to see the export size.
Recent equations
LaTeX for Students
A practical guide to beautiful documents and mathematical typesetting
One equation is easy here. When it turns into a lab report or your first proper paper, my book LaTeX for Students takes you from zero to a finished document, and every example puts the code beside its output so you see exactly what to type and what you get.
- Overleaf in the browser or a local install, both set up step by step
- Fractions, matrices, multi-line equations and theorem environments
- Fonts, margins and page layout with XeLaTeX, plus your own TikZ diagrams
- KaTeX, MathJax and clean math in WordPress, Notion, Obsidian and Jupyter
- A complete symbol and notation reference at the back
What This LaTeX Equation Editor Does
You need one equation on a slide or in a Google Doc, and the usual LaTeX advice is to install a full TeX distribution or start an Overleaf project. That is a complete document system for a single fraction, and the setup takes longer than the math itself.
This LaTeX equation editor does that one job properly. You type the expression or click the symbols, the preview typesets it as you type, and you export a PNG or SVG with the background and size you picked. The preview uses the same background and equation color as the export, so the file you download looks like what you saw.
Rendering happens in your browser with KaTeX, the open-source math typesetting library that also draws the equations in Notion. Nothing you type is uploaded, and there is no account to create.
| Detail | Answer |
|---|---|
| Best for | Single equations and short mathematical expressions |
| Rendering engine | KaTeX, in your browser |
| Export formats | PNG and SVG |
| Backgrounds | White, black, transparent or any custom color |
| Preview | Matches the export background and equation color |
| Copy options | Image to clipboard, or the LaTeX source |
| Account required | No |
| Full document compilation | No |
| PDF export | No |
| Bibliographies, figures, cross-references | No |
| Recent equations | Saved in this browser after each export |
| Price | Free |
If your work sits on the wrong side of that table, this is the wrong page. The roundup of online LaTeX editors that run in a browser covers the document environments, and the guide to desktop LaTeX editors for Windows and Mac covers local installs.
How to Write LaTeX Equations
Almost everything in school and undergraduate math comes down to 4 constructions. Learn these and the symbol palette above handles the rest.
x^2raises to a power.x_idrops to a subscript.\frac{a}{b}stacks a fraction, numerator first and denominator second.\sqrt{x}takes a square root, and\sqrt[3]{x}takes a cube root.
The symbol palette writes these for you. Clicking a template such as the fraction or the square root drops the cursor inside the first pair of braces. If you select part of an expression first, the selection goes inside: select a+b, click the fraction, and you get \frac{a+b}{} with the cursor waiting in the denominator.
The rule that trips up almost everyone is grouping. A superscript or subscript applies to exactly 1 character unless you wrap the rest in braces.
x^10renders as x to the power 1, followed by a stray 0.
x^{10}renders as x to the power 10.
That single pair of braces is the difference between a correct formula and a formula that looks right to you and wrong to whoever is marking it.
Greek letters follow their names, so \alpha gives you α and \beta gives you β. Capitalize the command for the capital letter: \pi is π and \Pi is Π. The product sign ∏ looks similar, but it is a separate command, \prod, which draws a larger symbol and takes limits.
Function names take a backslash too, because \sin x sets sin upright the way mathematical typography expects, while sin x sets it in italics, as though s, i and n were 3 variables being multiplied. It is a small difference, and anyone who reads a lot of mathematics notices it immediately.
The chapter on math modes, fractions and symbols goes deeper on spacing and delimiters, and the symbol quick reference is the page to keep open during an exam week.
Equations Worth Copying
I have kept these 4 plain on purpose, because the structure is what you will reuse. Each one renders in the editor above with no setup, so paste it in and change the letters to match your problem. The Examples panel under the editor has 18 more, grouped by subject, and each tile shows the rendered equation before you load it.
Quadratic Formula
x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}
This one is worth reading closely because it nests. The \sqrt sits inside the numerator argument of \frac, and \pm produces the plus-or-minus sign that would otherwise take 2 separate equations to express.
Definite Integral
\int_{0}^{1} x^2\,dx = \frac{1}{3}
The limits attach to \int as a subscript and a superscript, exactly like they do on any other symbol. The \, is a thin space, and it is the difference between x²dx crammed together and the spacing a journal would print.
Matrix
\begin{pmatrix}
a & b \\
c & d
\end{pmatrix}
Ampersands separate columns and a double backslash ends a row. Swap pmatrix for bmatrix to get square brackets, or vmatrix to get the vertical bars of a determinant. The structure stays identical, which is why multi-line equations and matrices are easier than they look.
Piecewise Function
f(x) =
\begin{cases}
x^2, & x \geq 0 \\
-x, & x < 0
\end{cases}
The cases environment draws the large brace and aligns both the expressions and the conditions. Writing this by hand in a word processor usually means a text box, a manually drawn bracket and a lifetime of nudging.
Export Formats and Output Sizes
Output size multiplies the pixel dimensions of the image. It has nothing to do with DPI, and mixing the two up is how equations end up soft on a projector.
- 1x exports the equation at roughly the size it appears on screen.
- 2x doubles the width and the height, so the file holds 4 times as many pixels.
- 3x and 4x scale the same way, 9 times and 16 times the pixel count.
Open Export settings and the editor shows the exact pixel size for the equation you have typed before you download anything, then repeats it after every export. E = mc^2 with the default 20px of padding comes out about 150 by 70 pixels at 1x and about 600 by 270 pixels at 4x.
DPI is a property of the destination. That same 600 pixel wide export is about 8 inches across in a 72 DPI layout and about 2 inches across in a 300 DPI print job, so you should pick the multiplier by how large the equation will physically appear.
A 2x PNG works almost everywhere. An SVG is the better file wherever the destination accepts one. It stores every letterform as an outline instead of a grid of pixels, so it stays crisp when a slide gets projected onto a wall or a page goes to a 600 DPI printer, and it opens as editable vector art in tools such as Illustrator and Inkscape. PNG is the safer choice when you do not control the software on the other end.
The 3 buttons above the preview set the export background as well as the preview, so the background you see is the background you get:
- Light exports a white background.
- Dark exports a black background and switches a default black equation to white.
- Clear exports a transparent background, shown as a checkerboard, so a colored slide shows through around every letter.
A custom background color and the equation color live under Export settings. If you set your own equation color, the editor keeps it when you switch backgrounds.
What KaTeX Renders, and What It Doesn’t
KaTeX implements a defined list of TeX math commands and environments. It typesets expressions and has no idea what a document is, so nothing on this page loads a LaTeX package, and anything that depends on one will not render.
It renders:
- fractions, roots, superscripts and subscripts
- sums, products, integrals, contour integrals and limits
- matrices through
pmatrix,bmatrix,vmatrixand friends - piecewise definitions through
cases - multi-line alignment through
alignandaligned - Greek letters, accents, arrows, set notation and logic notation
- font switches such as
\mathbb,\mathcaland\mathfrak
It does not render:
- TikZ or pgfplots diagrams
\usepackageand arbitrary package macros- document classes, sections, floats or captions
- bibliographies and citations
\includegraphicsand external files
The official KaTeX support table is the authority when you are unsure about a specific command, and the chapter comparing KaTeX and MathJax explains why a site would choose one over the other.
Common Errors and What They Mean
When the LaTeX has a mistake, the editor keeps your last correct version on screen, dims it and shows the error under the preview, along with the spot where it stopped reading. The messages are precise once you know what they are pointing at.
- Unexpected end of input in a macro argument means a brace never closed. Count your
{against your}. - Undefined control sequence means the command does not exist in KaTeX. Usually a typo, sometimes a package command that was never going to work here.
- Too many expansions means a macro is defining itself in a loop. The renderer stops rather than freezing the tab.
- Expected ‘EOF’, got ‘&’ means an alignment character is sitting outside a matrix, cases or aligned environment.
- Double superscript means two
^marks apply to the same base. Group the exponent:x^{2^n}, notx^2^n.
The reference on the most common LaTeX errors covers the ones that only show up in full documents, which is where the confusing ones live.
Getting Equations Into Word, Docs and Notion
Before exporting an image, check whether the destination reads LaTeX itself. Several do, and a native equation beats a picture of one every time: it stays editable, it is searchable, it reflows with the text and a screen reader can read it aloud.
Microsoft Word has accepted LaTeX input for years.
- Click Copy LaTeX in the editor above.
- Press
Altand=together to open an equation field. - On the Equation tab, set the input format to LaTeX.
- Paste the expression.
- Choose Professional to typeset it.
Notion is the other easy one, because its equation blocks are rendered by KaTeX. Whatever renders in the preview above will render there, so paste the source rather than the image. Google Docs converts a subset of LaTeX-style commands inside its own equation field, which covers fractions and Greek letters but stops well short of matrices.
The image export earns its place where the destination cannot do better: Google Slides and PowerPoint, video editors, forum posts, learning platforms that strip markup, and anywhere the equation is a picture and nothing more. Copy image puts the PNG straight on your clipboard, with the same background and size settings as the download. The chapter on writing math in everyday tools works through each of those destinations properly.
The Limits
I would rather you know these before building a workflow on top of the editor.
- It renders one expression at a time. There is no document, no equation numbering and no cross-referencing.
- Rendering happens after the page and its assets have loaded. An open tab keeps working if your connection drops, but the page will not reopen offline, because nothing is cached for that.
- Recent equations live in this browser’s local storage. A different browser, a different device or a private window all start with an empty list, and clearing site data deletes them.
- Exports are drawn by a separate rendering engine so the file carries real vector outlines. That engine downloads the first time you export or open Export settings, which makes the first PNG or SVG take a moment longer than every one after it.
- A few commands that KaTeX draws in the preview are unknown to the export engine. When that happens, the editor shows the export engine’s error and stops instead of saving a broken image.
- Copy image depends on your browser allowing images on the clipboard. When a browser blocks it, the editor says so, and Download PNG gives you the same file.
- Very large sizing commands are capped, so a deliberately enormous
\rulewill not render at its requested size.
For anything with chapters, a bibliography or a supervisor’s template, a full TeX installation is still the answer. LaTeX for Students covers that route from zero, and LaTeX for Theses and Dissertations picks up at thesis scale, with bibliographies and university formatting rules.
What Quietly Ruins an Exported Equation
None of these throw an error. They just make the result look amateurish in a way that is hard to diagnose after the fact.
Exporting at 1x because the preview looked fine. The preview is sized for your screen, and a 1x PNG blown up to fill a projected slide turns into a soft grey smudge. 2x is a sensible floor for anything that will be enlarged.
Leaving the background white on a dark slide. The equation arrives inside a bright rectangle that announces itself as a pasted image from the back of the room. Click Clear above the preview and set the equation color to white, and the slide shows through around every letter.
Cropping the padding off the exported file afterwards. That padding is protecting the parts of the expression that reach outside the main line: the tail of an integral sign, the descender on a subscript, the top of a square root. Crop tight and you clip them.
Screenshotting the preview instead of exporting. A screenshot captures at your display’s resolution, includes whatever sits around the equation and cannot be scaled up later. The export exists precisely to avoid that.
Using an image where the destination reads LaTeX. Word, Notion and most static site generators will typeset the expression themselves, and every one of those versions is more accessible and easier to correct than a picture.
FAQs on the LaTeX Equation Editor
The questions that come up most often about writing and exporting equations here.
What is the LaTeX Equation Editor?
It is a free browser-based tool for writing one mathematical expression in LaTeX syntax, previewing it as you type, and exporting it as a PNG or SVG image. Nothing is uploaded to render the equation, and no account is required.
Do I need to know LaTeX to use this?
No. The symbol palette inserts the command for you with the cursor already inside the first pair of braces, so clicking the fraction gives you \frac{}{} ready to fill in. Select part of an expression first and the palette wraps it, and the Examples panel loads complete equations you can edit. That is how most people learn the syntax in the first place.
What export formats are available?
PNG and SVG as downloads, plus copying the image to your clipboard or copying the LaTeX source. Both formats take a white, black, transparent or custom background, any equation color and adjustable padding.
What does the output size setting do?
It multiplies the pixel dimensions. A 2x export is twice as wide and twice as tall as a 1x export, which is 4 times the pixels. It has nothing to do with DPI, and Export settings shows the exact dimensions before you export, so you can match the size to where the equation is going.
Does it work offline?
An open tab keeps rendering if your connection drops, because KaTeX runs locally once it has loaded. Reopening the page without a connection will not work, and the first image export needs a connection to fetch the export engine.
Can I paste exported equations into Google Docs or Slides?
Yes. Use Copy image for a PNG on your clipboard, then paste. For Word and Notion, copy the LaTeX source instead and let those apps typeset it, because a native equation stays editable and readable by a screen reader.
Is there a limit on equation complexity?
The editor supports the LaTeX math commands and environments implemented by KaTeX: fractions, roots, matrices, integrals, sums, cases, accents, alignment and Greek letters. It does not compile LaTeX packages, TikZ diagrams, document classes, bibliographies or full documents.
Does the preview match the exported image?
The background and equation color match exactly, because the Light, Dark and Clear buttons set both. The export is drawn by a second engine that outputs real vector outlines, so spacing can differ very slightly from the on-screen preview, and the mathematics itself is identical.
Download a clean article project with sections, math, a table, references, image placeholders, and build notes.
Final Remarks
For a single equation, the quickest route is the editor at the top of this page. Write the expression, check it against the background it will sit on, export a 2x PNG or an SVG, and get back to the actual work.
Once the work grows past one equation into a full report or a thesis chapter, a proper LaTeX setup starts paying for itself, and LaTeX for Students walks you through it from the first document.