Markdown converter

Load sample preview is Welcome to Markdown as h1. PDF keeps list dashes and fences. Not HTML-to-PDF.

Docify's Markdown converter turns Markdown into sanitized HTML in your browser using marked (v11, gfm true) and DOMPurify. The preview is as-you-type. Load sample fills # Welcome to Markdown, a bold/italic paragraph, a Features list, a javascript fence, [Docify](https://example.com), and a blockquote. The pane then writes <h1>Welcome to Markdown</h1>, <strong>bold text</strong>, <em>italic text</em>, a three-item Features list, <pre><code class="language-javascript"> with function hello(), <a href="https://example.com">Docify</a>, and a blockquote. Copy HTML uses that fragment. Download PDF is a separate jsPDF dump: heading hashes, ** / *, and the example.com URL are stripped; list dashes, fences, and > stay. Nothing is uploaded.

Markdown
Preview

How it works

  1. Type or paste Markdown on the left. The preview is as-you-type, not a Convert button. Load sample fills # Welcome to Markdown plus the bold/italic paragraph, Features list, javascript fence, [Docify](https://example.com) link, and blockquote. That updates the HTML pane. Load sample does not run Download PDF.
  2. Each update runs marked() then DOMPurify.sanitize() so the right-hand preview, Copy HTML, and Download HTML use the cleaned HTML. Load sample leftovers include <h1>Welcome to Markdown</h1>, <strong>bold text</strong>, <em>italic text</em>, a three-item <ul>, <code class="language-javascript"> with function hello(), <a href="https://example.com">Docify</a>, and a <blockquote>. marked writes &quot; inside that fence; the sanitized Copy HTML fragment uses ". Headings stay bare — marked v11 defaults do not add header ids.
  3. Download PDF splits the Markdown on newlines, strips a leading /^#+\s/ heading marker, **, *, and link URLs, then draws the leftover text with jsPDF. Load sample PDF leftovers: Welcome to Markdown; This is a bold text and this is italic text.; the three - list lines stay; ```javascript and the hello() lines stay; Visit Docify for more tools. (https://example.com dropped); > This is a blockquote. stays. It does not render the HTML preview.

FAQ

Does this converter upload my Markdown?
No. Preview, HTML copy/download, and PDF export run in your browser. The page does not send the text to a server.
How is Markdown turned into HTML?
The preview is as-you-type, not a Convert button. Each textarea change passes the string to marked (v11, gfm true), then DOMPurify.sanitize. Copy HTML and Download HTML use that cleaned fragment. Load sample fills # Welcome to Markdown, a bold/italic paragraph, a Features list, a javascript fence, [Docify](https://example.com), and a blockquote. The pane then writes <h1>Welcome to Markdown</h1>, <strong>bold text</strong>, <em>italic text</em>, a three-item <ul>, <pre><code class="language-javascript"> with function hello(), <a href="https://example.com">Docify</a>, and a <blockquote>. marked writes &quot; inside that fence; the sanitized Copy HTML fragment uses ". Headings stay bare — marked v11 defaults do not add header ids. Unsafe tags and attributes are stripped.
What Markdown dialect does this tool accept?
It uses marked v11 with that library's default parser (GitHub-flavored Markdown options on). Load sample headings, the Features list, the javascript fence, the example.com link, and the blockquote all render through marked. The language-javascript class is not colored — there is no Prism or highlight.js. Exact edge cases follow marked, not a custom spec.
Is the PDF a formatted HTML-to-PDF export?
No. Download PDF walks the Markdown line by line, strips a leading /^#+\s/ heading marker, **bold**, *italic*, and [label](url) (the label is kept, the URL is dropped), then draws leftover text with jsPDF. Load sample PDF leftovers: Welcome to Markdown; This is a bold text and this is italic text.; Features; the three - list lines stay; ```javascript and the hello() lines stay; Visit Docify for more tools. (https://example.com dropped); > This is a blockquote. stays. Load sample updates the HTML preview and does not run Download PDF. It is a plain-text dump, not a styled render of the HTML preview.

Related