How Markdown syntax maps to HTML
Markdown uses simple punctuation to indicate formatting. A # at the start of a line becomes an <h1> tag. ## becomes <h2>, and so on through six heading levels. **bold** becomes <strong>bold</strong>. *italic* becomes <em>italic</em>. Lines starting with - or * become <ul> list items.
Links use the format [link text](https://url), which becomes <a href='https://url'>link text</a>. Images use , becoming <img src='image-url' alt='alt text'>. Triple backticks create <pre><code> blocks. Single backticks create inline <code> elements.
The conversion is deterministic — the same Markdown always produces the same HTML. Different Markdown parsers (marked, remark, CommonMark) may handle edge cases differently, but for standard syntax the output is consistent.
CommonMark and Markdown flavors
The original Markdown specification left many edge cases ambiguous, which led to different implementations producing different HTML from the same input. CommonMark is a standardized specification that resolves all these ambiguities with a clear, testable spec.
GitHub Flavored Markdown (GFM) extends CommonMark with additional features: tables, task list checkboxes (- [x] item), strikethrough (~~ text ~~), and autolinks. Most developer documentation platforms use GFM or a similar extension.
For converting Markdown intended for GitHub READMEs or docs, using a GFM-compatible parser like marked with GFM enabled or remark with the GFM plugin ensures consistent output.
Converting Markdown to HTML online
The Irreva Markdown to HTML converter accepts Markdown input and produces the rendered HTML output. You can view both the HTML source and the rendered preview. The tool uses a CommonMark-compatible parser with GitHub Flavored Markdown extensions.
Common uses: converting a README section for embedding in a website, converting documentation from Markdown to HTML for a CMS that expects HTML, previewing how Markdown will render before committing it, and extracting the HTML from a Markdown email template.
For developers who need Markdown conversion in their code: marked, markdown-it, and remark are the most popular Node.js libraries. Python has python-markdown and mistune. All are available via their respective package managers.
