consolelog.tools

Markdown to HTML

Render GitHub-flavored Markdown to HTML live — tables, code blocks, line breaks, optional basic sanitisation, plus a sandboxed live preview.

About this ToolHow it works, benefits & use cases

Paste Markdown and watch it render to HTML the moment you type. The Markdown to HTML converter is powered by the marked parser and supports GitHub-flavored Markdown — pipe tables, fenced code blocks, task lists, autolinks, and strikethrough — alongside the standard headings, lists, emphasis, links, and blockquotes. Three toggles let you tune the output: GitHub flavored mode, treating single newlines as <br> line breaks, and an optional basic sanitiser that strips <script> and <style> tags, on* event attributes, and javascript: URLs from the result. Switch between the raw HTML code view and a sandboxed live preview rendered in an isolated iframe, and a stats line counts words, headings, links, and code blocks as you go. Everything runs in your browser with no upload, so private notes and drafts never leave your machine.

How to Use

  1. 1Toggle the options you want: GitHub flavored, Line breaks (newlines become <br>), and Sanitize to strip scripts, styles, and inline event handlers.
  2. 2Paste your Markdown into the input box, or click Load example to drop in a sample with tables, lists, and a code block.
  3. 3The HTML regenerates live as you type — the stats line below shows word, heading, link, and code-block counts.
  4. 4Press Convert to HTML to confirm the conversion succeeded and surface any parsing error.
  5. 5Switch between the HTML code view and the sandboxed Preview to check the rendered output.
  6. 6Copy the HTML, download it as output.html, or share the URL — the input and option toggles are encoded in the link.

Key Benefits

  • Renders GitHub-flavored Markdown including pipe tables, fenced code blocks, and strikethrough
  • Live conversion updates the HTML as you type — no manual run needed
  • Optional sanitiser removes <script>, <style>, on* attributes, and javascript: URLs
  • Line-break mode converts single newlines to <br> for chat-style or comment-style text
  • Sandboxed iframe preview shows the rendered result without affecting the page
  • Shareable URL captures both your Markdown and the chosen options
  • Runs entirely in-browser via the marked parser — nothing is uploaded

Common Use Cases

  • Converting README or documentation Markdown into HTML for a CMS or static site
  • Generating email or newsletter HTML from a Markdown draft
  • Turning GFM tables and task lists into clean HTML markup
  • Previewing how Markdown notes will render before publishing
  • Producing sanitised HTML from untrusted Markdown for safer embedding

Options

Treat newlines as <br>

Strip <script>/<style>/on* attrs

0 characters · live

Paste Markdown above to see the HTML live.

Was this tool helpful?

Share Your Experience

Help others discover this tool!

Related tools