DevTools Logo

LaTeX Equation Editor

LaTeX Equation Editor

Write math source, check its syntax and copy portable snippets — entirely in your browser.

Runs in your browser
Try an example

LaTeX source

Macros

0 defined

Preview & snippets

0 commands · 1 line

No equation to preview

Type LaTeX above or load an example.

Examples

Quadratic formula

Input
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
Output
x = (-b ± √(b² - 4ac))/(2a)

The readable preview keeps structure visible even without a typesetting engine.

Macro use

Input
\R -> \mathbb{R}; x \in \R
Output
x ∈ ℝ

Macros expand before validation and preview.

Missing argument

Input
\frac{1}
Output
Error: frac expects 2 braced arguments; found 1

The position is reported so you can repair the source directly.

About this tool

LaTeX Equation Editor is a fast scratchpad for mathematical notation. Type an expression and the preview immediately turns common commands into readable text: fractions become (a)/(b), roots become √(x), and Greek letters and set symbols appear in Unicode. It is designed for checking notation before pasting it somewhere that renders math, not as a full document typesetter.

The syntax checker watches brace, bracket and parenthesis balance and verifies that commands which take braced arguments receive them. Unknown commands are reported as warnings with their position, so a typo like \fraq is visible before you paste the expression into a README. The intentionally broken example demonstrates the error state and keeps your source available for editing.

Define recurring notation in the macros pane using `\R -> \mathbb{R}`, `\N = ...` or `\def\Z{...}` syntax. Macros expand before validation, and a macro that expands to itself is flagged as recursive instead of looping. The symbol palette covers fractions, integrals, matrices, Greek letters and set operators; clicking one inserts it at the cursor.

The output pane always shows a Markdown snippet using `$…$` for inline math or `$$…$$` for display math. Copy it or download equation.md for a README, wiki page or issue comment. The editor is entirely client-side — nothing is transmitted and no account is required.

What this tool does not do

  • The preview is a readable plain-text rendering of common constructs, not KaTeX or MathJax typesetting.
  • There is no SVG or PNG export and no full document, bibliography or chemistry support.
  • Unknown-command detection uses a curated command list; obscure package commands may be flagged as warnings.
  • Macro expansion is single-pass per defined macro and intentionally bounded to avoid recursive loops.
  • No equation data is saved; reloading the page starts with an empty source pane.

How to use this tool

  1. Type or load an equation

    Enter LaTeX in the source pane or choose one of the example chips, including the broken example that demonstrates error reporting.

  2. Check the syntax

    Unbalanced delimiters and missing command arguments appear as errors with positions; unknown commands appear as warnings. The preview stays hidden until errors are fixed.

  3. Define macros

    Add one macro per line in the macros pane, e.g. \R -> \mathbb{R}. Recursive definitions are detected automatically.

  4. Insert symbols

    Filter the palette with the search box and click a symbol to insert it at the cursor position in the source.

  5. Copy a snippet

    Switch between inline and display mode, then copy or download the Markdown snippet for your documentation.

Use cases

README math

Draft equations and copy a Markdown snippet that renders on platforms with math support.

Homework checks

Quickly verify bracket structure and command spelling before submitting a document.

Technical blogging

Iterate on notation, then paste the wrapped snippet into a post or issue.

Notation drills

Use the symbol palette to learn command names alongside their visual meaning.

Macro definition syntax

Input lineMeaning
\R -> \mathbb{R}Expand \R to \mathbb{R} throughout the source
\N = \mathbb{N}Equals form of the same definition
\def\Z{\mathbb{Z}}TeX-style definition
% commentIgnored line
\R -> \R xRejected: recursive expansion

Macro names are single alphabetic command names without a leading backslash in the definition line.

Common mistakes

Mistake:Expecting full KaTeX/MathJax typesetting and PDF export.

Fix:This tool validates syntax, previews common constructs as readable text and exports Markdown; it is not a document typesetter.

Mistake:Using an advanced package command such as \ce{...}.

Fix:Unsupported commands are reported as warnings; use the supported command set or an appropriate dedicated editor.

Mistake:Defining a macro that refers to itself.

Fix:The checker flags recursion and leaves the source intact; make the expansion independent of the macro name.

Mistake:Forgetting the dollar-sign wrapper when pasting into Markdown.

Fix:Copy the Markdown snippet from the output pane: inline uses $…$, display uses $$…$$.

Mistake:Treating a warning as a failed render.

Fix:Warnings do not block the preview; only structural errors do.

Frequently asked questions

Which LaTeX commands are supported?

The checker knows the common math command family: fractions, roots, Greek letters, operators, relations, delimiters, matrices and font switches. Commands outside that curated list are reported as warnings, not errors. The preview recognises the most common subset and renders it as readable Unicode text.

Does this produce a typeset image?

No. This is a dependency-free syntax checker and readable preview, not a KaTeX or MathJax renderer. Use the copied Markdown snippet on a platform that renders math, or a dedicated typesetting tool when you need SVG or PNG output.

How do I write inline versus display math in Markdown?

Wrap a short expression in single dollar signs, like $x^2$, for inline math. Use double dollar signs, $$…$$, for a centred display block. The mode buttons in the tool build the correct wrapper automatically in the snippet field.

Can I define custom macros?

Yes. Add one definition per line in the macros pane, for example \R -> \mathbb{R}, \N = \mathbb{N} or \def\Z{\mathbb{Z}}. Macros expand before validation. A macro whose expansion refers to itself is flagged instead of expanding forever.

Why does \frac{1} show an error?

The frac command takes two braced arguments: a numerator and a denominator. With only one group the checker reports 'expects 2 braced arguments; found 1' and marks the command position. Write \frac{1}{2} instead.

Is my equation uploaded anywhere?

No. Source, macros and previews are computed in your browser tab. Nothing is sent to a server, and clearing or reloading the page discards the draft.

References & standards