Skip to content

Markdown to HTML Converter

Converts Markdown to HTML with the markdown-js library, which follows John Gruber's original syntax. Raw HTML in the source is escaped as text, and GitHub extensions such as tables and fenced code blocks are not recognized.

Pasting a README section or release note into a CMS field that only accepts HTML.

Markdown

When to use it

  • Pasting a README section or release note into a CMS field that only accepts HTML.
  • Checking which HTML tags a piece of basic Markdown produces.

How to use

  1. Paste Markdown into the left editor or load a .md file.
  2. Read the generated HTML on the right and check the rendered preview below it for each heading, list and link.
  3. Copy the HTML; it contains only body markup, so add your own CSS where you paste it.

Markdown

## Install

Run the **CLI** once:

    npm install -g douni

1. Open the [docs](https://douni.one)
2. Paste your file

| a | b |

HTML

<h2>Install</h2>

<p>Run the <strong>CLI</strong> once:</p>

<pre><code>npm install -g douni</code></pre>

<ol>
  <li>Open the <a href="https://douni.one">docs</a></li>
  <li>Paste your file</li>
</ol>

<p>| a | b |</p>

Details and limitations

Conversion runs in the browser. The output is an HTML fragment with no <html>, <head> or stylesheet; the preview renders it in a sandboxed frame with scripts disabled.

Only original Markdown is supported. Pipe tables, task lists, ~~strikethrough~~ and ``` fenced code are left as text; use 4-space indentation for code blocks.

Inline HTML such as <div> is escaped to &lt;div&gt;, not passed through.

Images become <img> tags pointing at the original URL; files are not embedded.

FAQ

Why are my ``` code fences not turned into <pre> blocks?

The library predates fenced code. A fence is treated as inline code inside a paragraph. Indent the code by four spaces to get <pre><code>.

Does it support GitHub Flavored Markdown tables?

No. A line like | a | b | is output as a plain paragraph.

Can I keep raw HTML in my Markdown?

No. HTML tags are escaped and shown as text in the result, so an embedded <div> will not render as an element.

Specifications and references