Markdown to HTML – convert README, docs and notes into clean markup
Markdown is how most technical writing starts life: README files, static-site posts, wiki pages, changelogs, issue templates and CMS drafts. The web, however, renders HTML. This Markdown to HTML converter bridges that gap in your browser, turning Markdown source into standards-compliant markup while showing a live rendered preview beside it, so you can check the structure and the appearance at the same time.
What the converter produces
By default you get an HTML fragment — body-level markup with no <html>, <head> or <body> wrapper — which is what you want when pasting into an existing page, a CMS field or a React template. Turn on Full HTML document and the same content is wrapped in a complete HTML5 document with a doctype, <meta charset="utf-8">, a responsive viewport tag, your title and an optional readable stylesheet, ready to save as a .html file and open directly.
CommonMark versus GitHub Flavored Markdown
CommonMark is the reference specification: headings, emphasis, lists, links, images, blockquotes, code and horizontal rules. GitHub Flavored Markdown (GFM) adds four widely used extensions on top — pipe tables, ~~strikethrough~~, task-list checkboxes and autolinking of bare URLs. Switching flavors is the fastest way to answer the question "why is my table not rendering?": under strict CommonMark a pipe table stays a paragraph full of pipe characters, because tables were never part of the specification.
Heading IDs, anchors and a table of contents
Every heading can be given a GitHub-style slug id — lower-cased, punctuation removed, spaces turned into hyphens, with repeats disambiguated as intro, intro-1, intro-2. Those ids are what deep links such as #installation point at, and they are what the optional table of contents is built from. The generated TOC is a nested <ul> of anchor links, limited to whatever heading depth you choose, and the nesting is normalised so a document that jumps straight from an H2 to an H4 still produces valid list markup.
Sanitizing untrusted Markdown
Markdown allows raw HTML, which means Markdown from a comment box, a form or a third-party repository can carry a <script> tag. Two independent switches control this. Allow raw HTML decides whether HTML written in the source is emitted as markup or escaped into literal text. Sanitize HTML decides whether whatever is emitted gets filtered — and it filters on an allowlist, so only known-safe elements and attributes survive, on* event handlers are stripped, and href and src values are checked against a scheme allowlist after character references are decoded.
<script> into visible text. Sanitizing removes it from the document. Leaving raw HTML on with sanitizing off publishes whatever the author wrote — only do that with content you trust, and pair it with a Content Security Policy on the page that serves the result.Readable output you can hand to a reviewer
Generated HTML is normally one dense line. Pretty-print indents it at the width you choose, but only where indenting is meaningless to a browser: whitespace between two block elements is not painted, so it can be added freely, while a space between two inline elements is painted and is left exactly as it was. Anything inside <pre> is copied through byte for byte. The indented output is then re-parsed and compared against the compact output of the same document, and if they ever disagree the compact version is returned with a warning rather than shipping markup that changed meaning.
What the statistics tell you
Alongside the markup you get a word, line and character count for the source, the character and byte size of the output, a tally of every generated element, the document outline with each heading's level and slug, and an inventory of every link and image with an internal or external badge. That inventory is the quickest way to spot a http:// URL in a page that must be HTTPS-only, or a relative image path that will break once the HTML is pasted somewhere else.
Typical workflows
Paste a README to embed it in a marketing page. Convert a Markdown draft into an HTML email body and copy it as rich text straight into your mail client. Generate a standalone document for an offline handover. Drop a folder of docs in at once and export every converted file as a ZIP. Or simply type a snippet and read the markup, which is still the fastest way to learn precisely what a nested list, a fenced code block or a reference link compiles to.