Markdown to HTML
Turn Markdown into body HTML, or into a complete page skeleton
Your data stays with you. Conversion happens inside the browser; nothing is sent to a server.
Did this tool do the job?
Thanks, your feedback came through.
How it works
Type or paste your text into the left panel; the output appears on the right as you write. The conversion is done by a mature Markdown parser, so the tool recognises the whole of everyday syntax: headings from one to six, bold and italic, strikethrough, inline code and fenced code blocks, nested lists, task lists (a space or an x inside square brackets), tables, quotes, images, horizontal rules and links written out as plain addresses. If your text already contains HTML, it is kept as HTML — but only after passing through a safety filter that drops script tags, event attributes and addresses that run code when clicked. The result line counts what was found and, if anything was dropped, says how many items went. Two output shapes are available: body HTML is meant to be pasted inside an existing page, while the full page option produces a file you can open on its own.
This tool is also known as markdown to html, md to html converter, markdown table to html, markdown converter, markdown preview.
What is Markdown marks?
In Markdown, formatting is expressed with punctuation at the start of a line or around a piece of text rather than with tags: the number of hashes gives the heading level, a double asterisk makes text bold, a single one italic, a backtick marks code, and a line beginning with a greater-than sign is a quotation. This is a convention rather than a single official standard; processors agree on the core and diverge in the details.
What is GFM (GitHub Flavoured Markdown)?
GFM is the most widely used dialect of Markdown, adding four things to the basic syntax: tables drawn with pipe characters, task lists in square brackets, strikethrough text between double tildes, and the automatic linking of an address written out inside a sentence. Most of the Markdown written today is in this dialect, and this tool recognises it.
What is HTML sanitisation?
Sanitising HTML means stripping the dangerous parts out of a fragment before it goes onto a page: script tags, attributes hooked to click or load events, tags that embed a foreign page in a frame and addresses that execute code are removed, while the remaining structure is kept. It differs from escaping in one key respect: escaping turns everything into text, whereas sanitising leaves safe tags working as tags.
What is Body HTML?
Body HTML is the set of tags that make up only the content part of a page: headings, paragraphs, lists, links. The doctype declaration, the head section, the character set and the stylesheet links sit outside this fragment, because they belong to the skeleton of the page. Publishing systems, newsletter templates and blog editors normally expect the text they are given in exactly this shape.
What is the difference between Markdown and HTML?
Both do the same job — they give text a structure — but they address different sides. Markdown looks at the human: it reads well unprocessed, it is quick to type, and it stays clean in version history. HTML looks at the browser: every element is an explicit tag, it takes attributes, and it nests without limit. That is also why Markdown works almost everywhere; somewhere down the line it is converted into HTML. This tool does that last step without going near a server.
Which Markdown syntax is recognised?
Core CommonMark syntax plus the GitHub additions that have become common everywhere. The list below gathers the ones people actually use; anything outside it comes out as plain text rather than silently disappearing.
Single line breaks deliberately do not split a paragraph: lines you write one under another stay in the same paragraph, and a blank line starts a new one. That is why text pasted from an email or a notes app is not broken into fragments.
- Headings, bold, italic, strikethrough (~~like this~~)
- Inline code and fenced code blocks with a language name
- Nested bulleted and numbered lists; task lists
- Pipe tables, together with their alignment row
- Quotes, horizontal rules, images, links
- A bare address written in the text becomes a clickable link
What happens to the HTML in your text?
Markdown's own definition allows HTML to sit between the paragraphs; a disclosure box (details), a keyboard key (kbd) or a hand-written table is usually written that way. This tool keeps them, but runs them through a mature sanitiser first.
The filter removes anything that could make the browser run code: script tags, tags that embed a foreign page in a frame, attributes hooked to click and load events, and addresses that execute code. Two further tags are dropped on purpose: the style block and the form. Body HTML is pasted inside somebody else's page, so a style block that slips in repaints the whole page, and a form can turn into a fake sign-in box.
If anything was dropped, the result line says how many items were cleaned. You therefore learn that something left your text without having to compare the output line by line.
How are link addresses filtered?
The scheme at the front of the address — the part before the colon — is checked. Web, email, telephone, text-message and file-server addresses pass; addresses that run code when clicked are dropped quietly and the link is left without a target.
Relative addresses are allowed on purpose: a path starting with a slash, a file name in the same folder or an anchor inside the page all count as valid. If you are pasting the output into your own site, that is exactly what you need.
If you gave a link a target of your own (open in a new tab, for instance) that is kept too; current browsers already isolate such links when they open them.
Body HTML or a full page?
The body output gives you content tags only: you drop it into a page template you already have, into the editor of a publishing system, or straight into the text of an email.
The full page option produces a working HTML file with a doctype declaration, a language attribute, a character set and a viewport tag. The page title is taken from the first top-level heading in your text; if there is none, a generic name is written instead.
Frequently asked questions
Are the HTML tags in my text kept?
Yes, but only after filtering. Disclosure boxes, keyboard keys or tables you wrote yourself stay as tags in the output; scripts, frames, event attributes and code-running addresses are dropped. The result line tells you how many items were removed.
Does it convert tables as well?
Yes. Pipe tables are turned into real table tags together with their header row and alignment row. If your data is still sitting in a spreadsheet export, the CSV to Markdown table converter will get it into this shape first and save you a step.
Are nested lists preserved?
Yes. As long as you indent the sub-items, the depth comes out as written; two or four spaces of indentation are enough. Task list items also come out as ticked or unticked boxes.
Can characters in a code block break?
No. No formatting is applied inside a code block or inline code, and angle brackets are turned into text inside the code tag, so they look exactly as you typed them. Writing a language name after the opening fence adds that language's class to the output tag.
Is my text sent anywhere?
No. The conversion and the safety filter are done by two libraries running inside your browser; the text you paste never reaches a server.