Guide
Converting Markdown to HTML and back
Markdown is the easiest way to write formatted text, and HTML is what the web displays. You need to go from one to the other when a README becomes a web page, notes go into an email or CMS, or an old blog moves to a static site generator that expects Markdown. This converter works both ways, with a live preview.
Markdown to HTML
Paste or open a .md file and the HTML appears beside it. The converter follows GitHub Flavored Markdown, so tables, task lists (- [x] done), strikethrough with tildes and bare links all work as they do on GitHub. Code blocks keep their language class, such as language-js, for syntax highlighters.
Heading anchors
With heading ids on, every heading gets an id using GitHub’s rules: lower case, punctuation removed, spaces turned into hyphens, and -1, -2 added when a heading repeats. A heading “Release notes” becomes id="release-notes", so links such as page.html#release-notes jump straight to it, and a table of contents made for GitHub works on your page too.
Safe output
Markdown may contain raw HTML, and HTML may contain scripts. With “Remove scripts and unsafe HTML” on, the output passes through DOMPurify, which removes script tags, event handlers such as onclick and javascript: links while keeping ordinary formatting. Keep it on whenever the Markdown came from someone else; if you turn it off and the output contains scripts or handlers, a warning appears. The preview below is always sanitised.
Snippet or full page
By default you get an HTML fragment to paste into a CMS, template or email editor. Choose “Full HTML page” to wrap it in a complete document with a doctype, a viewport tag for phones, a title taken from the first heading and simple readable styles, ready to open in a browser or upload.
HTML to Markdown
Switch direction and paste HTML. Headings become # lines, lists use hyphens, code blocks become fenced blocks with their language, struck-through text becomes text, checkboxes become task-list items and tables become pipe tables. The HTML is sanitised before conversion, so pasting a full page does not run anything.
What does not survive
Markdown is deliberately simple. Coloured or resized text, merged table cells, forms, embedded video and layout columns have no Markdown form: their text is kept and their styling dropped. Converting Markdown to HTML and back usually returns what you started with, apart from spacing and list markers.
A quick test
The Markdown sample — release notes with a table, a task list, struck-through text and a JavaScript code block — produces <h1 id="release-notes">, a <table> and a <del> element. Switching to HTML to Markdown and loading its sample returns # Release notes, a | Platform | Status | table, ~~Legacy sync~~ and a fenced js block.
Privacy note
Conversion runs in your browser. Images linked by web address are fetched from their host only to show them in the preview.
Using the output in email
Email programs ignore most stylesheets, so paste the snippet rather than the full page into an HTML email editor, and keep formatting simple: headings, paragraphs, bold, links and lists survive almost everywhere, while tables and code blocks may look different in each mail client.
Related tools
Write and preview Markdown in the Markdown Editor, add a contents list with the Markdown TOC Generator, strip markup from HTML with Strip HTML Tags, or make a PDF with Markdown to PDF.
Checked against the current version of the Markdown ⇄ HTML Converter on .

