Markdown Converter (to HTML, Editor, Preview)
Great for blog posts, docs, and CMS migrations—convert entire articles without leaving the browser.
Quickly convert Markdown to clean HTML or paste HTML back into Markdown.
Convert Markdown to HTML with a live preview, or turn pasted HTML into Markdown. Copy the result for a blog, README, or CMS. Conversion runs in your browser; remote image URLs can still load from their source.
How this page is maintained
- Steps and copy are checked against the current tool behavior.
- Browser limits, file-size constraints, or compatibility gaps are documented when relevant.
- Unless a page explicitly says otherwise, files and text stay in the browser during processing.
How to Convert Markdown to HTML and Back Again
Choose a direction, paste into the input panel, and copy from the output panel. Markdown to HTML renders a live preview beside the generated markup; HTML to Markdown takes a pasted fragment and returns the equivalent Markdown source.
A Worked Example
Input in Markdown to HTML mode:
Project notes
A short paragraph with bold text and a link.
- first item
- second item
Output:
<h2>Project notes</h2>
<p>A short paragraph with <strong>bold text</strong> and a <a href="/tools/word-counter">link</a>.</p>
<ul>
<li>first item</li>
<li>second item</li>
</ul>
The preview pane shows the rendered result; the clipboard receives the markup above, so what you copy is what you paste into a CMS template.
Going from HTML Back to Markdown
Paste <h2>Release notes</h2> and a pair of <p> tags into HTML to Markdown mode and you get the heading and paragraphs as Markdown, with links, lists, and blockquotes carried across. Structure is kept; styling is not. Inline CSS, JavaScript, iframes, and interactive widgets are dropped, and complex table layouts may not survive. Treat the output as a starting point for a long document and re-read it before publishing.
Supported Syntax
The parser handles headings, paragraphs, bold and italic, links, ordered and unordered lists, blockquotes, tables, and fenced code blocks. GitHub-specific extensions such as task-list checkboxes are only partly supported, so check those by hand.
Preview Safety and Privacy
Preview HTML is sanitized before rendering, while the markup you copy stays the original conversion output. Text is processed in this browser and is not uploaded to JW Tool Box; images pointing at external URLs may still load from those sites.
Continue the Workflow
Count the finished article with the word counter, compare two revisions with the text diff checker, or tidy the generated markup using the code formatter.
Markdown to HTML and HTML Back to Markdown
This tool has no Convert button, because the conversion runs on every keystroke. Pick a direction with the two buttons at the top, paste into the left panel, and the right panel updates as you type; the Copy output button takes whatever is there. Markdown to HTML runs the markdown-it renderer with three options switched on: raw HTML inside your Markdown is passed through rather than escaped, bare URLs such as www.jwtoolbox.com become links, and typographic replacements turn straight quotes into curly ones and three hyphens into an em dash. HTML to Markdown runs Turndown.
A worked example: the default Markdown document begins with a level-one heading, a blank line, a sentence, and a bold word. Switch to Markdown to HTML and the right side shows a rendered heading and paragraph rather than source code, with the bold word in bold. Press Copy output and the clipboard receives the underlying HTML, including the h1 and strong tags, not the displayed text.
The Exact Clicks
Click Markdown to HTML. Paste your Markdown in the left panel. Read the rendered result on the right; there is no preview button to press. Click Copy output. To go the other way, click HTML to Markdown first, then paste HTML. In that direction the left panel takes HTML and the right panel becomes a read-only text box showing Markdown rather than a rendering, because Markdown has no defined visual appearance of its own. The Layout buttons switch between Split and Full-width; use Full-width for long lines, since the split view wraps aggressively.
The Decisions That Change the Output
The HTML to Markdown direction is where choices show up. Turndown is configured with the atx heading style, so headings come back as hashes followed by the text on one line, not as underlined setext headings. Existing Markdown that already uses setext headings will therefore not round-trip byte for byte; it round-trips semantically. Content that has no Markdown equivalent, such as a div with a class attribute, an inline style, or a table built from layout divs, is either dropped or flattened to plain text, so keep the original HTML if you need those attributes back. Fenced code blocks carrying a language tag are preserved better than indented ones, so prefer fences when you author the source.
Common Mistakes
Judging the safety of the output by looking at the preview. The rendered preview is passed through DOMPurify, which strips scripts and event handlers; the Copy output button hands you the unsanitized HTML from the renderer. A script tag or an onerror attribute you pasted will not run in the preview and will still be present in what you copy, so sanitize again if the HTML is going into a page you do not fully control. The second common mistake is pasting HTML that uses non-breaking spaces, which Turndown reads as ordinary characters and which then appear as stray spaces in the Markdown. The third is expecting the tool to keep blank-line spacing exactly as authored; block spacing is normalized to one blank line.
Where to Go Next
If the HTML you are converting was generated from a data payload, the JSON formatter is the better first stop.
Key features
- Bidirectional conversion: Toggle between Markdown and HTML with one click, keeping formatting intact.
- Live preview: See rendered HTML as you type and spot formatting issues instantly.
- Copy-friendly panels: Separate input/output panes make it easy to paste results into CMS or code editors.
Frequently asked questions
Which Markdown flavor is used?
The markdown-it parser handles headings, lists, links, blockquotes, tables, and fenced code. GitHub-specific extensions such as task-list checkboxes are not all supported.
Can I convert HTML back to Markdown?
Yes. Switch to HTML → Markdown mode and paste your snippet to see the Markdown equivalent.
Do you store my content?
No. Everything happens in your browser using open-source libraries.