Skip to content
FormatKit

Free Markdown to HTML converter

Markdown to HTML with the settings shown

This converter turns Markdown into HTML for free and without an account, and it puts the four decisions other converters hide in front of you: GFM or strict CommonMark, heading ids on or off, a single newline as a space or a <br>, and a bare fragment or a whole file with the stylesheet inlined. The markup and the rendering sit side by side, so you can see what each switch actually changes. Documents up to 2 MB convert as you type.

  • 100% free
  • No signup
  • Up to 2 MB
  • Fragment or full file
  • Optional inline CSS
Conversion options

HTML output

<!-- The generated markup appears here. -->

How that markup renders

Nothing converted yet — the panes fill in as you type, with no button to press.

How to convert Markdown to HTML

Three steps, and the middle one is the reason to use this page rather than a one-button converter.

  1. Start with the source

    Type into the source box, open a .md file with the Open button, drag one onto the box, or paste with ⌘V; Ctrl+V everywhere else. Press Example for a CONTRIBUTING.md that exercises a fenced code block, an ordered list, a blockquote and an inline link.

  2. Set the four switches to match your target

    GFM keeps tables, task boxes, strikethrough and footnotes; CommonMark drops them back to punctuation. Turn heading ids off when your CMS already generates anchors, tick the <br> option when the text came from a comment box, and choose between a bare fragment and a whole HTML file. The last tick inlines the stylesheet, which is what makes the output survive a paste into an email or a CMS field that strips <head>.

  3. Check the rendering, then take the markup

    The right pane shows what that exact markup produces, so you can see the effect of a switch instead of guessing. Copy puts the string on the clipboard byte for byte, and Save .html writes it as fragment.html or document.html depending on the shape you picked.

Technical specifications

Input dialectsGitHub-flavoured Markdown (tables, task boxes, strikethrough, autolinks, footnotes) and strict CommonMark 0.31, switched without reloading
Output shapesFour: bare fragment, fragment with an inline style block, HTML5 document, HTML5 document with the stylesheet inlined
Generated markupSemantic HTML5 with no wrapper divs and no class names, except a scroll wrapper on tables; code fences become pre + code with a language- class
Inlined stylesheetAbout 2.5 KB covering headings, lists, code, tables, blockquotes and footnotes — enough to read standalone, small enough to paste
Heading anchorsOptional GitHub-compatible ids, deduplicated with a numeric suffix on a repeated title
Line-break handlingA single newline joins the paragraph by default, or becomes a <br> for text written in a comment box
Maximum document2 MB per conversion — a 40 KB README converts in about 3 ms and a 2 MB manual in about 90 ms
Blocked destinationsjavascript:, vbscript: and data:text/html links are removed; the anchor becomes plain text
Processing locationYour browser — the Markdown is never uploaded
PriceFree, no signup, no conversion count

Frequently asked questions

Does the generated HTML need a stylesheet to look right?

Only if you want it to look like anything in particular — the markup is semantic and carries no class names, so it inherits whatever styles surround it. That is the right default for a template or a CMS field, where your own CSS already covers h2, p and pre. Tick “Inline the stylesheet” when there is no surrounding CSS to inherit: it prepends a style block of about 2.5 KB scoped to a wrapper class, which is enough for headings, code blocks, tables and blockquotes to read properly on their own.

Why is there no <html> or <head> in my output?

Because the default output is a fragment, which is what you paste into an existing page. Switch Output to “Whole HTML file” and you get a doctype, a charset meta, a viewport meta and a title taken from the first heading in the document — a file that opens correctly by double-clicking it. The two are genuinely different artefacts, which is why they are a choice rather than a guess.

Does GFM support footnotes, and do they survive the conversion?

GitHub renders footnotes and this converter reproduces them, but they are not part of the published GFM specification — GitHub added them in 2021, four years after the spec was written, so a strict GFM implementation is free not to have them. Here a [^1] reference becomes a superscript link to an ordered list at the end of the document, with a return arrow back to the reference, and switching to CommonMark turns the marker back into the four literal characters. If the HTML is going somewhere other than GitHub, footnotes are the construct most likely to be missing at the other end.

Can I keep the HTML that is already inside my Markdown?

No — inline HTML in the source comes out escaped, so a <div> in your Markdown becomes &lt;div&gt; in the output and shows as five characters on the page. That is a deliberate trade: this converter is safe to point at Markdown you did not write, and the way it guarantees that is by never emitting a tag it did not generate itself. If your document depends on raw blocks, convert everything else here and paste those blocks back in by hand, or keep the file on a host that filters HTML rather than dropping it.

Should I turn the heading ids off?

Turn them off when the destination generates its own, which most static-site generators and CMS platforms do — two id attributes on the same heading is invalid HTML and the anchors will fight. Leave them on when the HTML is the final artefact and you want #getting-started to work. The ids follow GitHub's rule: lowercase, punctuation dropped, spaces to hyphens, non-ASCII letters kept, and a numeric suffix on a repeat.

Is the output XHTML, with self-closing tags?

No, it is HTML5: void elements are written <br>, <hr> and <img …>, without the trailing slash. XHTML has not been the serialisation anyone parses since 2014 and the slash is ignored by every HTML parser, but if you are pasting into a JSX file or an XML pipeline that does care, a find-and-replace on <br> and <hr> covers the two that appear in Markdown output.

What happens to a link whose destination is javascript:?

It is dropped and the link degrades to its own text — no anchor, no href. The same applies to vbscript: and to data: URLs that carry HTML rather than an image, because those three are how a Markdown link turns into script execution on the page that renders it. Ordinary schemes pass through untouched: http, https, mailto, tel, ftp, relative paths and #fragments, plus base64 data:image payloads on images, which READMEs use for inline badges.

About converting Markdown to HTML

“Markdown to HTML” sounds like one function and is really a family of them. CommonMark pins down the block and inline grammar in about 650 executable examples, but it stops at the door of the serialiser: it does not say whether a heading gets an id, what a table looks like in HTML — it has no tables — or how a single newline should be treated. Every implementation therefore answers those separately, which is why the same README produces different markup through GitHub, Docusaurus, MkDocs, Jekyll and a build script with a Markdown library in it. The switches on this page are exactly those unspecified decisions, pulled out where you can set them instead of discovering them in a diff.

The markup itself is deliberately plain. Headings, paragraphs, lists and blockquotes come out as the matching HTML5 element with no attributes at all; a fenced block becomes <pre><code class="language-ts"> so a highlighter can find it; a table carries text-align inline styles because the alignment colons in the delimiter row have no other expression in HTML; and nothing anywhere gets a framework class name you would have to strip. Two constructs are worth checking after conversion because they are the ones parsers disagree about most: footnotes, which GitHub added on top of its own specification, and hard line breaks, which depend on whether the text was written in a file or in a comment box. Paste the same source into the Markdown preview under both flavours if you are unsure which parts are load-bearing.

One thing to keep in mind if the Markdown is not yours: converting user-supplied Markdown to HTML is an injection surface, not a formatting task. Both CommonMark and GFM allow raw HTML to pass straight through, and a link destination is a URL, which means javascript: is a legal one. This converter closes both routes by escaping every character that arrived in the input and filtering destinations, so the only tags in the result are the ones it wrote. If you need the markup indented and inspectable afterwards, the HTML formatter will re-indent it, and the HTML to Markdown converter takes you back the other way.

Where the conversion happens

The parser and the serialiser are JavaScript inside this tab, so an internal runbook or an unpublished release note is converted on your own machine and never sent anywhere. Nothing is stored between visits either — reload the page and the box is empty.