Skip to content

LaTeX math formula to image converter

Turn LaTeX equations into sharp transparent PNGs, JPG cards or standalone SVGs for slides and docs.

Insert math structure Outer $...$ or $$...$$ wrappers unwrap automatically
Live preview

How to use LaTeX to image

  1. Enter or load a LaTeX equation. Type math into LaTeX expression, click quick symbol pills like Fraction or Integral, or drop a .tex or .md file.
  2. Choose typesetting mode and colors. Pick Display mode or Inline, select Black, White, or Custom under Ink color, and pick Transparent, White, Dark, or Custom under Background.
  3. Set output format, scale, and padding. Choose PNG, SVG, JPG, or WebP, pick 2x, 4x, or 6x under Scale, and adjust Padding (px) between 0 and 160.
  4. Export your formula or batch archive. Select Copy PNG for instant clipboard pasting, Save formula for a single file, or Export all as ZIP for multi-equation documents.

Everything runs in this browser tab. Nothing you paste or open is uploaded or logged, so it's safe for keys, tokens and private data.

Typesetting LaTeX equations locally with self-hosted KaTeX

Academic authors, educators, and engineers often rely on remote TeX APIs that log unpublished equations or return blurry low-resolution bitmaps. This browser converter preloads self-hosted KaTeX assets on mount so every formula renders locally inside your tab with zero network requests.

Quick symbol pills, Display mode vs Inline, and typo hints

Seven quick-insert pills (Fraction, Sum, Integral, Root, Matrix, Cases, and Greek) insert common templates at your cursor inside the LaTeX expression box. Under Typesetting mode, Display mode sets tall limits above and below integrals and sums, while Inline keeps expressions compact.

Built-in validation runs with throwOnError: true and trust: false against the KaTeX Supported Functions Documentation, catching misspelled macros like \frca or \srqt with closest-match suggestions. If you want to turn full Markdown documentation rather than isolated math into graphics, turn Markdown & READMEs into crisp PNG or JPG cards.

Batch extracting equations from .tex and .md files

Dropping a .tex, .latex, .md, or .markdown file scans for equation, align, gather, multline, and $$...$$ math blocks automatically. When two or more formulas are detected, numbered tabs (Formula 1, Formula 2, and so on) let you review each expression before clicking Export all as ZIP to download <stem>-formulas.zip.

Even plain .tex documents without a \documentclass preamble split cleanly across blank-line boundaries while stripping % comments, so lecture notes and homework sets convert in one batch.

When should you export a math formula as SVG vs PNG or WebP?

Export as SVG when you need infinite vector zoom in web docs or vector editors, and choose 4x or 6x PNG when pasting into slides, Notion, or Word documents that do not accept SVG <foreignObject> markup. Under the W3C PNG Third Edition Specification, lossless 8-bit alpha preserves sharp subscripts and fraction bars on any backdrop.

Raster exports scale from the 28 px base font size at 2x, 4x, or 6x resolution, while JPG and WebP encode at 0.94 quality by default to keep edges crisp.

Format Scaling behavior Alpha transparency Best equation workflow
PNG 2x, 4x, or 6x raster Full 8-bit alpha Keynote, PowerPoint, Google Slides, Word, Notion
SVG Infinite vector zoom Full alpha Web documentation, modern browsers, scalable embeds
WebP 2x, 4x, or 6x raster Full 8-bit alpha (0.94 quality) Lightweight web articles and documentation pages
JPG 2x, 4x, or 6x raster Opaque solid fill (0.94 quality) Flat white or dark cards where alpha is not needed

When you want to build composite educational cards combining HTML callouts and custom CSS grids around an equation, pair your workflow with the HTML to PNG converter.

How standalone SVGs use WOFF2 font embedding

Most browser SVG exporters fail on another computer because they link to external CSS files or assume local TeX fonts are installed. This tool detects which Computer Modern fonts your formula actually uses and embeds only those subsets inside the SVG.

Subset font detection from the 20-file KaTeX catalog

The self-hosted font catalog contains 20 .woff2 files covering KaTeX_Main, KaTeX_Math, KaTeX_AMS, KaTeX_Caligraphic, KaTeX_Fraktur, KaTeX_SansSerif, KaTeX_Script, KaTeX_Typewriter, and KaTeX_Size1 through KaTeX_Size4.

Before building the SVG, the exporter inspects the rendered KaTeX classes and embeds only the referenced @font-face rules as Base64 data URIs. Following the W3C WOFF File Format 2.0 Specification keeps standalone SVG files compact and portable across devices.

Bounding-box measurement inside SVG foreignObject

Tall radicals, stacked fractions, and matrix brackets often clip if an exporter measures only the outer container box. To prevent cutoffs, the live DOM probe unions the bounding boxes of every visible non-spacer <span> inside .katex-html and adds 0 to 160 px of configurable padding.

Once exported, you can trim redundant metadata from standalone vector assets with the SVG optimizer.

Styling white equations for dark slides and troubleshooting

Dark presentation decks and technical blogs require high-contrast white or custom-colored ink on transparent backdrops. Selecting White under Ink color automatically switches Background from White to Dark if needed, or lets you pick Transparent with a dark checkerboard preview.

Ink color, transparent backdrops, and JPG fallback rules

You can choose Black, White, or Custom hex ink alongside Transparent, White, Dark (#111111), or Custom backgrounds. Because JPEG does not support alpha transparency, Transparent is hidden when Format is JPG and falls back to #FFFFFF.

Under the W3C SVG 2 Embedded Content Specification, each formula is wrapped inside an SVG <foreignObject> container with BASE_FONT_PX (28 px) and centered flex alignment before rasterizing to PNG, JPG, or WebP.

Fixing unknown macro errors and delimiter wrappers

If KaTeX reports an undefined control sequence, unclosed braces, or mismatched delimiters, the live preview displays the exact syntax error instead of exporting a broken image. Outer $...$ and $$...$$ delimiters strip automatically on paste.

Check that every \begin{...} environment has a matching \end{...} tag and that \frac{a}{b} includes both numerator and denominator brace groups before exporting.

Tip: Use Copy PNG with Transparent background and 4x scale to paste sharp equations straight into Keynote or Google Slides without saving temporary files.

When preparing full academic manuscripts alongside your equation figures, you can also generate editable Word drafts from Markdown notes locally in your browser.

Questions

Do exported SVG equations render without LaTeX fonts installed?

Yes. Standalone SVG exports embed only the Computer Modern WOFF2 font subsets referenced by your equation directly inside the file as Base64 data URIs. Fractions, integrals, and matrices look identical on any computer or browser.

Can I export white equations on a transparent background?

Yes. Set Ink color to White and Background to Transparent, then export as PNG, WebP, or SVG. The preview automatically switches to a dark checkerboard so you can verify legibility before pasting onto dark Keynote or PowerPoint slides.

Which KaTeX environments and delimiters are supported?

Display math, inline math, matrices, cases, aligned equations, and standard Greek or calculus operators render natively. Outer $...$ and $$...$$ wrappers unwrap automatically when pasted into the editor.

How does batch export work for .tex and .md files?

Dropping a .tex or .md file extracts equation, align, gather, multline, and $$...$$ blocks into numbered Formula tabs. Selecting Export all as ZIP renders every formula with your active style settings into a single formulas.zip archive.

What scale should I choose for slides and academic papers?

The default 4x scale produces crisp equations for Keynote, PowerPoint, Notion, and Google Docs without huge file sizes. Switch to 6x for high-resolution print figures, or pick SVG for infinite vector zoom.

Are my LaTeX formulas uploaded to a server during rendering?

No. The KaTeX parser, stylesheet, and all 20 Computer Modern WOFF2 font files are preloaded locally on your device, so unpublished research equations never leave your browser tab.

Updated