Markdown to HTML
Write Markdown on the left, get escaped, ready-to-paste HTML on the right.
Markdown, and where it stops
Markdown was designed as "plain text that reads well as plain text" — a syntax simple enough that an unrendered README is still legible. Headings with #, emphasis with *, lists with -: the whole core syntax fits on one page.
That simplicity is also its limit. Nested lists, footnotes, definition lists, math and diagrams all needed extensions (CommonMark, GFM, MDX, KaTeX). This converter implements the common subset you actually use in READMEs and blog posts: headings, paragraphs, bold/italic, strikethrough, inline code, fenced code blocks, links, images, blockquotes, ordered and unordered lists, horizontal rules and pipe tables.
Safety comes first
Raw HTML in Markdown is a security problem: a comment containing <script> renders as executable code. This converter escapes all HTML in the input before applying Markdown syntax, so <div> in your text appears literally rather than becoming an element. Links get rel="nofollow noopener" to avoid leaking the opener context and to keep user-generated links from passing ranking signals.
Preview is not the same as valid HTML
The generated markup is deliberately plain — no classes, no wrapper divs, no inline styles. That is what you want when pasting into a CMS, a template, or an email builder that applies its own styling. If you need styled output, add your own CSS scoped to the container.
Escaping and line breaks
In Markdown, a single newline inside a paragraph is not a line break; it is treated as a space. Two trailing spaces or a backslash force a hard break. Blank lines separate blocks. Getting this wrong is the most common reason a paragraph "merges" when rendered.
When to reach for a real parser
For production content pipelines use a maintained implementation — markdown-it, remark, Goldmark, or cmark — with a strict HTML policy. A hand-written converter like this one is ideal for a quick conversion, not for rendering untrusted user content at scale.