# Typst to HTML

Convert Typst markup into standalone HTML with MathML equations, without creating a project.

Typst to HTML turns pasted Typst into one HTML file that opens in any browser. Equations are written as MathML, so readers can select them and assistive technology can read them.

## Use it for

- a web copy of a short Typst document or a set of notes;
- content that has to reflow on phones and narrow screens;
- a quick HTML version of a section you are working on.

It doesn't copy the PDF's page design. Export the PDF when exact layout matters.

## Convert the source

1. Open **Typst to HTML**, or run `/typst-to-html`.
2. Paste a Typst fragment or a complete document, or choose **Load example**.
3. Choose **Convert**.
4. Copy the HTML or save `converted.html`, then open it in a browser.
5. Check headings, links, equations, tables, and images.

For example:

```typst
= Result
For $x > 0$, the loss decreases.
```

becomes an HTML heading and a paragraph, with the inline equation as MathML.

## What the output includes

The bundled Pandoc reads the Typst and writes a standalone HTML document on your device, with MathML equations and the resources it can embed.

Pandoc reads Typst markup, not Typst's scripting. `#let` functions, `show` rules, packages, and computed content may be dropped or simplified. For a whole Typst project, use the project's **Export** menu instead: it builds HTML from Typst's own output, which keeps more of your equations and references. [Export and convert a project](/docs/export/) explains the choices.

:::caution[Accessible HTML still needs review]
MathML and real headings are a good start, not a certificate. Test keyboard order, link text, image descriptions, table headers, and color contrast before calling the page accessible.
:::

For a LaTeX source, use [LaTeX to HTML](/docs/tools/latex-to-html/).
