Free tool
Markdown HTML Converter
Convert Markdown to HTML and HTML back to Markdown for headings, lists, links, images, code and quotes.
How it works
What is the Markdown HTML Converter?
The Markdown HTML Converter is a free tool that converts Markdown to HTML and HTML to Markdown. It supports the common subset: headings, paragraphs, bold, italic, links, images, nested lists, inline code, code blocks, blockquotes, line breaks and horizontal rules. Output is shown as code to copy, never rendered on the page.
How to use the Markdown HTML Converter
- Choose the direction: Markdown to HTML or HTML to Markdown.
- Paste your content, or press Load sample.
- Read the converted code in the output box.
- Press the copy button and paste it into your CMS, README or template.
What is Markdown?
Markdown is a plain-text way of writing formatted documents, created by John Gruber in 2004. A line starting with # is a heading, text between double asterisks is bold, a line starting with a hyphen is a list item. It stays readable as plain text and converts cleanly to HTML.
It is the default format for README files, developer documentation, many static site generators and note-taking apps, and it is what most AI chat assistants write their answers in.
Which Markdown syntax does this converter support?
Headings with # through ###### and the underlined style, paragraphs, **bold** and *italic* with asterisks or underscores, [links](url) and  with optional titles, ordered and unordered lists including nested ones, inline code in backticks, fenced code blocks with a language name, blockquotes, hard line breaks and horizontal rules.
It does not convert tables, footnotes, task lists, strikethrough, reference-style links or bare URLs. Raw HTML written inside Markdown is escaped and shown as text, not passed through. For documents that depend on those features, use a full CommonMark or GitHub Flavored Markdown library.
How do I convert Markdown to HTML?
Leave the direction on Markdown to HTML and paste the Markdown. The HTML appears as you type: one element per line, lists and blockquotes with their children nested, and code blocks wrapped in pre and code with a language- class if you named a language.
Characters that are special in HTML, the ampersand and the angle brackets, are escaped in text and code. The output is a fragment with no html or body wrapper, ready to paste into a page or CMS field.
How do I convert HTML to Markdown?
Switch the direction and paste HTML, a whole page or a fragment. The tool parses it with your browser's HTML parser and walks the result, so messy or unclosed markup is handled the way a browser would handle it. Scripts, styles and the document head are dropped.
Tags with a Markdown equivalent are converted. Everything else is reduced to its text: a div or span contributes its contents, and each table cell becomes its own paragraph. Classes, inline styles and other attributes are discarded, because Markdown has nowhere to put them.
Why is the result shown as code and not a preview?
Rendering pasted HTML inside a live page is how cross-site scripting happens, so this tool never does it. Both directions output text in a code box.
The converter itself does not sanitize. A link whose address starts with javascript: comes through as written. If the Markdown came from someone you do not trust, sanitize the HTML before publishing it. To shrink the HTML afterwards use the HTML and CSS Minifier, and to check the heading structure of the published page use the Heading Checker.
Questions
- Does it support tables?
- No. Tables are an extension to Markdown and are not converted in either direction. From HTML, table cells come out as plain paragraphs.
- Is this CommonMark or GitHub Flavored Markdown?
- Neither in full. It implements the common core that both share. Unusual edge cases, such as deeply nested emphasis or lazy continuation lines, may convert differently from a reference implementation.
- Will converting HTML to Markdown and back give the same HTML?
- Only for the supported elements. Attributes, classes, inline styles and unsupported tags are lost on the way to Markdown and cannot be recovered.
- Does it render my HTML?
- No. Output is always shown as text. Nothing you paste is executed or inserted into the page.
- Is the Markdown HTML Converter free?
- Yes, with a free spyc.ai account. It runs in your browser, so nothing you type or paste is sent to a server.
Developer Tools
More in Developer Tools
JSON Formatter
Format, minify and validate JSON in your browser, with the line and column of the first syntax error.
Format JSONJSON-LD Formatter
Pretty-print JSON-LD pasted bare or in script tags, list every @type and flag a missing @context.
Format JSON-LDCase Converter
Convert text to upper, lower, title or sentence case, or to camelCase, PascalCase, snake_case and kebab-case.
Convert caseReady when you are
Before your next buyer asks AI about you, ask AI about yourself
One check, four engines, about twenty seconds. We show you the answers before we ask for anything.