DevToolsmith

Markdown to HTML Converter

Convert Markdown tables, task lists, code blocks and LaTeX equations to HTML. Math exports as native MathML. Preview the result, edit selected formulas in the LaTeX editor, or download a complete HTML page.

Runs 100% in your browser — nothing is uploaded

Markdown · 125 words
Tip: drop a file here759 chars · 763 bytes · 35 lines
HTML
0 chars · 0 bytes · 0 lines

Math: $…$ inline, $$…$$ or \[…\] on separate lines, and fenced math blocks. Select a complete formula to edit it in LaTeX and return here. HTML exports use native MathML, supported by modern browsers.

Example

Markdown
## Install

Run `npm install`, then:

- [x] Configure
- [ ] Deploy

| Env | URL |
|-----|-----|
| prod | https://example.com |
HTML
<h2>Install</h2>
<p>Run <code>npm install</code>, then:</p>
<ul>
<li><input checked="" disabled="" type="checkbox"> Configure</li>
<li><input disabled="" type="checkbox"> Deploy</li>
</ul>
<table>
<thead>
<tr>
<th>Env</th>
<th>URL</th>
</tr>
</thead>
<tbody><tr>
<td>prod</td>
<td><a href="https://example.com">https://example.com</a></td>
</tr>
</tbody></table>

Converting on the command line

Shell
# marked (Node.js)
npx marked --gfm -i README.md -o README.html

# pandoc: also converts to PDF, DOCX and more
pandoc README.md -f gfm -t html -s -o README.html

# Python
python -m pip install markdown
python -m markdown README.md > README.html

Tidy the generated markup with the HTML formatter, or turn existing HTML back into Markdown with HTML to Markdown.

Frequently asked questions

Which Markdown flavor is used?

CommonMark, the standard Markdown specification, plus the GitHub Flavored Markdown extensions when GFM is on: tables, task lists, strikethrough, autolinks for bare URLs, and fenced code blocks. The converter is marked, one of the most widely used Markdown libraries for JavaScript.

Does the HTML include styles?

The output uses semantic HTML and inherits the destination styles. With Math formulas on, equations are exported as native MathML, which modern browsers can display without external CSS, fonts or scripts. Download .html wraps the output in a complete page. Fenced code blocks retain language classes for syntax highlighters.

Is raw HTML in Markdown kept?

Yes. Markdown allows inline HTML, and it is passed through to the output unchanged, as the CommonMark spec requires. If the Markdown comes from users, sanitize the HTML before publishing it, for example with DOMPurify in the browser or bleach and nh3 in Python. The live preview here is always sanitized.

How are headings given ids for anchor links?

marked doesn’t add ids by default, so the HTML stays minimal. GitHub generates them from the heading text (lowercased, spaces to hyphens). In your own pipeline, the marked-gfm-heading-id extension or rehype-slug add the same ids.

Can I convert Markdown equations and edit them visually?

Enable Math formulas to convert inline $…$, display $$…$$, parenthesis or bracket math delimiters, and fenced math blocks. Ordinary code stays literal. Select a complete formula and choose Edit selected math to use the LaTeX editor with a symbol panel, source highlighting and live preview. Return to Markdown restores this document with the updated formula. This is source editing with a preview, rather than a visual document editor.

Can I convert many files at once?

This page converts one document at a time. For a folder of files, use a command-line tool: npx marked -i input.md -o output.html, or pandoc input.md -o output.html, which also produces PDF and Word documents.