Markdown to HTML converter

Paste Markdown or open a .md file and get clean HTML as you type, with GitHub-flavored tables, task lists, fenced code and heading IDs. Copy the HTML fragment, or download a complete .html page with a GitHub or document style. Runs in your browser, nothing is uploaded.

Open a file: (or drop it on this box) ·

 

Need a PDF? Copy your Markdown into Markdown to PDF.

HTML

Preview

Fragment or full page?

Body only gives just the converted elements (<h1>, <p>, <table>…), ready to paste into a CMS, a template or an email builder that brings its own styles. Full page wraps them in a complete document with <!doctype>, a viewport tag, the first # heading as the <title> and, unless you pick "No CSS", a small stylesheet, so the file looks right when opened on its own. Download .html always saves the full page.

Heading IDs and line breaks

With Heading IDs on, every heading gets an id the way GitHub makes them (## Getting started becomes id="getting-started", a repeated heading gets -1, -2), so links like #getting-started written for GitHub keep working. Standard Markdown joins lines that have no blank line between them into one paragraph; tick Line breaks to turn each single newline into a <br> instead, as GitHub does in issues and comments.

What is supported

GitHub Flavored Markdown: headings, emphasis, links and bare URLs, nested lists, task lists, tables with column alignment, block quotes, fenced code blocks, strikethrough, horizontal rules and images. Raw HTML in the Markdown passes through unchanged. Code blocks get a language-js style class from the fence, ready for highlight.js or Prism, but are not colored here. Not part of GFM and left as text: footnotes, math ($…$), Mermaid diagrams and [[wiki links]].

Convert Markdown to HTML from code

The parser used here is marked. In Node: npm i marked, then import { marked } from 'marked'; const html = marked.parse(markdownText);. From the command line, npx marked -i README.md -o README.html writes the HTML fragment. To turn that HTML into a PDF or a PNG on a server without installing Chromium, send it to the Shotmint API: POST https://shotmint.creasework.com/v1/pdf with {"html": "…"} returns a PDF with selectable text (1 credit; €5 buys 2,000, credits never expire). The Markdown to PDF page has a complete script.

Get 25 free renders a month API docs

FAQ

Is my text uploaded? No. Parsing and the preview both happen in your browser; this page sends nothing to a server.

Is the HTML output sanitized? No: raw HTML in your Markdown is copied into the output as written, like most Markdown tools do. If you render Markdown written by other people on your own site, run the HTML through a sanitizer such as DOMPurify first.

Why do my images not show? An image needs a public http(s) URL. A relative path like ./img/logo.png only exists next to the file on your computer.

Related: Markdown viewer, Markdown editor, Markdown to Word, Markdown to PDF, HTML to Markdown, Website to Markdown, Word to Markdown, Google Docs to Markdown, HTML viewer, HTML editor.

Related tools

HTML to Markdown · Markdown to Word · Website to Markdown · CSV to Markdown table · Markdown table generator · Google Docs to Markdown · Markdown to PDF · PDF to Markdown · DOCX to Markdown · Excel to Markdown Table · Markdown Table to CSV Converter · Markdown to DOCX · Markdown Viewer · Online Markdown Editor with Live Preview · URL to Markdown · Word to Markdown Converter · Online HTML editor · HTML to Word · all free tools