Convert HTML to Markdown with support for GFM, CommonMark, and Obsidian syntax.
Free online HTML to Markdown converter that transforms complex HTML markup, web articles, rich text, and CMS exports into clean, portable Markdown. Supports GitHub Flavored Markdown (GFM) with pipe tables, task lists, and strikethrough, standard CommonMark, and Obsidian wiki links. Features configurable formatting options including fenced or indented code blocks, ATX or Setext headings, custom bullet markers, and image stripping for LLM prompt token reduction and RAG indexing. Real-time conversion statistics display heading counts, table structures, link ratios, and byte reduction metrics. Operates 100% client-side for total privacy with zero server uploads.
Keywords: html to markdown, html to md, html to markdown converter, convert html to markdown, html to gfm, html to commonmark, html to obsidian, html markdown converter, html to markdown online, free html to markdown, turndown, markdownify, html to md converter, convert html to md, html table to markdown, html to markdown table converter, clean html for llm, html to markdown rag, rich text to markdown, webpage to markdown, html to markdown code blocks, html to obsidian wiki links, html to markdown python alternative, html2text online, rehype to remark converter
Tags: html, markdown, convert, gfm, commonmark, obsidian, converter
HTML to Markdown is also known as: HTML to Markdown Converter Online, HTML to MD Converter, HTML to GFM Converter, HTML to CommonMark Converter, HTML to Obsidian Converter, Turndown HTML to Markdown, HTML to Markdown Table Converter, Clean HTML to Markdown for LLM, Webpage to Markdown Converter, Rich Text to Markdown Converter.
Paste your raw HTML markup into the input editor on the left, or upload a local .html document file.
Select your target Markdown specification: GitHub Flavored Markdown (GFM) for tables and task lists, CommonMark for universal portability, or Obsidian Wiki Links for PKM vaults.
Configure transformation options: customize code block style (fenced ``` vs indented 4-space), heading format (ATX # vs Setext ===), and list bullet characters (-, *, +).
Tune optimization filters: toggle "Remove Images" to minimize prompt tokens for LLM context windows or "Keep HTML" to retain complex inline tags.
Click "Convert HTML" or press ⌘↵ (Ctrl+Enter) to transform your HTML AST into clean Markdown in real time.
Examine real-time conversion statistics to evaluate heading depth, link counts, table matrix structure, and overall byte/token size reduction percentage.
Copy the clean Markdown output (⌘⇧C), download as a .md file, or generate a compressed URL parameter to share the transformation with teammates.
Unified AST Conversion Pipeline: Powered by rehype and remark Abstract Syntax Trees (AST) for resilient, spec-compliant HTML-to-Markdown parsing.
3 Target Markdown Dialects: Seamlessly switch between GitHub Flavored Markdown (GFM), strict CommonMark, and Obsidian [[Wiki Links]].
GFM Pipe Table Extraction: Converts HTML <table>, <thead>, <tbody>, <tr>, <th>, and <td> structures into clean Markdown tables with column alignments (:---:, ---:).
Syntax-Highlighted Code Blocks: Automatically parses <pre><code class="language-*"> and extracts language hints into fenced ```language code blocks.
ATX & Setext Heading Formatting: Converts h1–h6 tags into structured # ATX headings or configurable Setext underline syntax, maintaining document outline hierarchy.
LLM & RAG Token Minimization: Strips noisy DOM wrappers (<div>, <section>, inline styles, class attributes) to reduce token consumption by 60–80% for embedding models.
Configurable List Markers: Preserves nested ordered (<ol>) and unordered (<ul>) list hierarchies with configurable bullet markers (-, *, +).
Task List & Checkbox Support: Transforms <input type="checkbox"> items into interactive GFM task lists (- [ ] and - [x]).
Strikethrough & Formatting Presets: Converts <del>, <s>, and <strike> tags into GFM ~~strikethrough~~ syntax while retaining bold (<strong>) and italic (<em>) emphasis.
Semantic Blockquote Handling: Transforms <blockquote> tags into nested Markdown > quotation blocks with proper whitespace indenting.
Selective Image Stripping: Strip <img> tags completely to create lightweight text-only corpora for prompt engineering and LLM training data.
Obsidian Vault Cross-Linking: Translates relative hyperlinks and anchor tags into native Obsidian [[note-title|Anchor Text]] internal references.
XSS Sanitization & Safety: Employs strict rehype-sanitize AST filtering to neutralize malicious <script> injections and dangerous DOM attributes before conversion.
Real-Time Conversion Metrics: Live telemetry reporting input/output bytes, byte reduction percentage, total headings, links, code blocks, tables, and lists.
Compressed URL Sharing: Compresses source HTML into stateless base64 URL hash fragments for zero-backend sharing with collaborators.
100% Client-Side Execution: All parsing and string generation execute in browser memory — no HTML documents or proprietary content ever reach a server.
Keyboard Hotkeys for Power Users: Rapid workflow acceleration with ⌘↵ (Convert), ⌘⇧C (Copy output), and ⌘⇧K (Clear editor).
The HTML to Markdown supports 6 syntax formats and dialects for accurate parsing and processing.
AI tokens are the fundamental atomic units of text and code processed by Large Language Models, governing pricing, context limits, and tokenization.
HTML is the standard markup language for creating web pages and web applications, structuring content through semantic elements and the DOM.
HTML entities are coded character strings starting with an ampersand and ending with a semicolon used to render reserved and special characters in HTML.
Markdown is a lightweight plain-text formatting syntax created by John Gruber in 2004 that converts readable text into structured HTML.
Chain HTML to Markdown with other utilities in a multi-step visual workflow.
Convert HTML to markdown and normalize text case.
Preview markdown and convert back to clean text.