Skip to content
MoneyDeck

Markdown to HTML Converter

Convert Markdown to clean, semantic HTML you can paste anywhere

Updated · Free, no signup

HTML output

<h1 id="monthly-budget-notes">Monthly Budget Notes</h1>
<p>Track <strong>income</strong>, <em>expenses</em> and <code>savings</code> in one place. Read the <a href="https://moneydeck.io/budget" title="Guide">budget guide</a>.</p>
<h2 id="checklist">Checklist</h2>
<ul>
<li><input type="checkbox" checked disabled> Pay rent</li>
<li><input type="checkbox" disabled> Review subscriptions</li>
<li>Build an emergency fund
<ul>
<li>Target: 3–6 months of costs</li>
</ul>
</li>
</ul>
<ol>
<li>Open a high-yield account</li>
<li>Automate transfers</li>
</ol>
<blockquote>
<p>Tip: pay yourself first.</p>
</blockquote>
<pre><code class="language-js">const saved = income - expenses;
</code></pre>
<table>
<thead>
<tr>
<th style="text-align:left">Category</th>
<th style="text-align:right">Amount</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">Rent</td>
<td style="text-align:right">$1,500</td>
</tr>
<tr>
<td style="text-align:left">Food</td>
<td style="text-align:right">$450</td>
</tr>
</tbody>
</table>

Headings

2

Links

1

Images

0

Code blocks

1

Tables

1

Words (rendered text)

49

  • About 1 min read (49 words at 238 wpm).

About the Markdown to HTML Converter

This Markdown to HTML converter turns Markdown text into clean, semantic HTML as you type. It supports the syntax people actually use: headings, bold, italic and strikethrough, inline code and fenced code blocks with a language class, links and images with titles, nested bullet and numbered lists, GitHub-style task lists, blockquotes, horizontal rules and pipe tables with column alignment.

It is useful for bloggers and technical writers moving content into a CMS or email template, developers generating HTML for documentation or README previews, and anyone who drafts in Markdown but needs HTML to publish. Headings can get automatic id anchors for tables of contents, and you can wrap the result in a complete HTML5 document ready to save as a .html file.

For safety, raw HTML inside the Markdown is escaped rather than passed through, and javascript: links are neutralised, so pasted content cannot inject scripts. The output follows CommonMark and GitHub Flavored Markdown conventions for the common cases; unusual edge cases (reference-style links, footnotes) are not converted.

How to use the markdown to html converter

  1. 1Paste or type your Markdown into the input box.
  2. 2Choose whether headings get id anchors and whether to wrap the output in a full HTML page.
  3. 3Review the HTML output and the counts of headings, links, images and tables.
  4. 4Copy the HTML into your CMS, email template or .html file.

Formula and method

Conversion runs in two passes, as in CommonMark. The block pass reads the text line by line and recognises fenced code (``` or ~~~), ATX headings (# to ######) and setext headings (a line underlined with === or ---), horizontal rules, blockquotes (>), bullet and numbered lists (nesting by indentation), GFM pipe tables (a header row followed by a |---| separator, with :--- / ---: / :---: alignment) and paragraphs separated by blank lines.

The inline pass then protects code spans, backslash escapes, autolinks, images and links, escapes &, < and >, and applies **bold**, *italic*, _italic_ and ~~strikethrough~~. A line ending in two spaces or a backslash becomes <br>. Heading ids are the heading text lowercased with non-alphanumeric runs replaced by hyphens, with -1, -2 suffixes for duplicates.

Worked examples

Budget notes with lists, quote, code and table

The sample produces an h1 and h2, one link with a title attribute, a task list with a nested bullet, a numbered list, a blockquote, a JavaScript code block with class="language-js" and a two-column table whose Amount column is right-aligned.

Heading, autolink, image and hard line break

The heading gets the anchor id "hello-world" and its *World* becomes <em>. The angle-bracket URL becomes a link, the image keeps its alt and title, and the two trailing spaces after "Line two" produce a <br>.

Escaping HTML in code

Angle brackets and the ampersand are escaped so they display as text, ~~old~~ becomes <del> and **new** becomes <strong>. The fenced block has no language, so the <code> element has no class.

Frequently asked questions

How do I convert Markdown to HTML?+

Paste your Markdown into the input and the HTML appears instantly in the output box. Copy it into your website, CMS or email editor, or turn on "Wrap in a full HTML document" to get a complete page you can save as index.html.

Does it support GitHub Flavored Markdown?+

Yes for the common GFM extensions: pipe tables with alignment, task lists ([ ] and [x]), strikethrough with ~~ and fenced code blocks with a language name. Footnotes and reference-style links are not converted.

Is raw HTML in Markdown allowed?+

Standard Markdown passes raw HTML through, but this converter escapes it so the output is always safe to embed. If you need raw HTML, add it to the output after conversion.

How do I make a line break in Markdown?+

End the line with two spaces or a backslash before pressing Enter; it becomes a <br>. A single newline without them is treated as a space inside the same paragraph, and a blank line starts a new paragraph.

What are heading id anchors for?+

An id on each heading (for example id="checklist") lets you link straight to that section with example.com/page#checklist and is what tables of contents and "jump to" links use.

Related tools