HTML to Markdown
Convert HTML to Markdown. Handles headings, lists, links, images, tables, code blocks, and inline formatting.
How to Use HTML to Markdown
- 1Paste your HTML code into the input panel.
- 2The Markdown output is generated instantly.
- 3Adjust options like link style and code fence type.
- 4Copy the resulting Markdown to use anywhere.
Zenovay
Privacy-first analytics for your website
Understand your visitors without invasive tracking. GDPR compliant, lightweight, and powerful.
Related Tools
Color ConverterConvert colors between HEX, RGB, HSL, and CMYK formats. Live preview with color picker.
Unit ConverterConvert between units of length, weight, temperature, area, volume, speed, and more.
Number Base ConverterConvert numbers between binary, octal, decimal, and hexadecimal bases.
Unix Timestamp ConverterConvert between Unix timestamps and human-readable dates. Show ISO 8601, UTC, local time, and relative time.
Frequently Asked Questions
What HTML elements are supported?▾
The converter handles the most common HTML elements: headings (h1–h6), paragraphs (p), line breaks (br), bold (strong, b), italic (em, i), inline code (code), code blocks (pre), links (a), images (img), unordered lists (ul/li), ordered lists (ol/li), blockquotes (blockquote), horizontal rules (hr), tables (table/thead/tbody/tr/th/td), and divs/spans (treated as paragraphs). HTML comments and script/style tags are stripped.
What Markdown flavors does this produce?▾
The output uses CommonMark-compatible Markdown, which is supported by GitHub, GitLab, Notion, Obsidian, Slack, and most static site generators (Jekyll, Hugo, Docusaurus). Tables use GitHub Flavored Markdown (GFM) pipe syntax. Code blocks use fenced ``` syntax. This output should work in any modern Markdown renderer.
How are tables converted?▾
HTML tables are converted to GFM pipe tables: | Header 1 | Header 2 | with a separator row of dashes: | --- | --- |. The converter handles th/td cells and preserves colspan values by repeating the cell content (since Markdown has no colspan support). Empty cells are preserved as | | entries.
What happens to nested lists?▾
Nested lists are converted with 2-space indentation per level, which is the CommonMark standard. For example, a ul inside a li produces a nested list with properly indented - bullet points. Mixing ordered and unordered lists at different nesting levels is handled correctly.
Why do some HTML elements get stripped?▾
Elements without a Markdown equivalent (div, span, section, article, header, footer, nav, aside, figure, figcaption) are treated as block or inline containers — their content is preserved but the element itself is omitted. Script, style, head, and HTML comment content is stripped entirely. The goal is to preserve the text and semantic structure, not pixel-perfect HTML rendering.