HTML to Markdown Converter
Paste HTML source, or copy part of a web page and paste it here, to get clean Markdown with GitHub-style tables.
Need the reverse? Use the Markdown to HTML converter.
What this converter is for
Markdown is the format of READMEs, wikis, static-site generators, note apps like Obsidian and most documentation platforms. Content, however, often starts life as HTML: a page in an old CMS, a help-centre article, an email template, a Confluence export or simply a section of a web page you want to quote in your notes. Rewriting it by hand loses links and formatting; copying the plain text loses everything else.
This tool converts HTML into Markdown by parsing it into a real document tree and translating each element with Turndown, a widely used conversion library, plus extra rules for GitHub-style tables and strikethrough. Because it works on the DOM rather than with text patterns, nested lists keep their nesting, & becomes &, and a <blockquote> is never mistaken for bold text.
How to use it
- Paste HTML source into HTML input, or press Load example.
- To convert part of a web page, select it in your browser, copy it, and paste it into the input. With Paste rich text as HTML ticked, the HTML behind the selection is inserted automatically.
- Pick the Markdown flavour you want with Headings, Bullet marker, Code blocks, Links, Italic and Tables.
- The Markdown output updates instantly. Press Copy Markdown or Download .md.
Worked example
Input HTML:
<h1>Release notes</h1> <p>Version <b>2.1</b> fixes a bug in <code>parse()</code> & adds <i>one</i> option.<br>See <a href="https://example.com/docs">the docs</a>.</p> <blockquote><p>Breaking change: <del>v1 API</del> removed.</p></blockquote> <ul><li>Faster startup<ul><li>Lazy loading</li></ul></li> <li>Smaller bundle</li></ul> <table><thead><tr><th>Option</th><th>Default</th></tr></thead> <tbody><tr><td>cache</td><td>true</td></tr></tbody></table>
Output with the default options:
# Release notes
Version **2.1** fixes a bug in `parse()` & adds _one_ option.
See [the docs](https://example.com/docs).
> Breaking change: ~~v1 API~~ removed.
- Faster startup
- Lazy loading
- Smaller bundle
| Option | Default |
| --- | --- |
| cache | true |The <br> became two trailing spaces plus a newline (a Markdown hard line break), the entity was decoded, and the nested list is indented under its parent item. List markers are followed by three spaces so that nested content lines up with the item text.
Options explained
- Headings – ATX uses # Title for every level. Setext underlines h1 and h2 with === or --- (h3–h6 still use #).
- Bullet marker – the character used for unordered lists. All three are valid; pick the one your linter expects.
- Code blocks – fenced blocks keep the language from a language-js class (```js); indented blocks use four spaces and cannot carry a language.
- Links – inline keeps the URL next to the text; reference style moves URLs to numbered definitions at the end, which reads better in long documents.
- Italic – underscores or asterisks around emphasised text. Bold always uses **.
- Tables – GFM pipe tables, or the original table HTML left untouched (Markdown renderers display inline HTML).
Limitations
- Markdown has no colours, fonts, column layouts or underline, so styling is dropped.
- Pipe tables cannot hold lists, paragraphs or merged rows; cell content is flattened to one line and rowspan is ignored. Use Keep as HTML for complex tables.
- Relative links and image paths such as /logo.png are kept as they are; they only work if the Markdown is published on the same site.
- Inputs larger than 2 MB are rejected to keep the browser responsive.
Tips
- Copy only the article body, not the whole page, to avoid menus and footers ending up in your Markdown.
- Check the result by rendering it in the Markdown Preview, or turn it back into HTML with the Markdown to HTML converter.
- If you only need the data from a table, the HTML Table to CSV tool is a better fit.
Frequently Asked Questions
How does the converter work?
It parses your HTML into a DOM tree with the browser's own parser and walks it with the Turndown library, so nested lists, entities like & and tags such as <blockquote> or <img> are recognised correctly instead of being matched with regular expressions.
Can I paste content copied from a web page?
Yes. With Paste rich text as HTML ticked, pasting content copied from a browser, Google Docs or Word inserts its underlying HTML, which is then converted, so links, bold text and lists survive.
Are HTML tables converted?
Yes, into GitHub Flavored Markdown pipe tables. The first row becomes the header, colspan cells are padded with empty cells, and pipe characters are escaped. Rowspan, cell alignment and block content inside cells cannot be expressed in GFM; choose Keep as HTML for those tables.
What is removed from the HTML?
Scripts, styles, the document head, iframes, embedded objects and form controls are dropped because they have no Markdown equivalent. CSS styling such as colours and fonts is also lost.
Does the Markdown work on GitHub, GitLab and Obsidian?
Yes. Headings, emphasis, links, images, lists, fenced code blocks, blockquotes, strikethrough and pipe tables are all part of GitHub Flavored Markdown, which these tools support.
Is my HTML sent to a server?
No. The conversion runs in your browser. Scripts in the pasted HTML are never executed and the HTML is never inserted into this page.
Related tools
- Excel to CSV ConverterConvert Excel spreadsheets (XLSX/XLS) to CSV format. Supports multiple sheets, custom delimiter, and UTF-8 output.
- CSV to Excel ConverterConvert CSV files to Excel spreadsheets (XLSX) directly in your browser. Auto-detects delimiter and infers column types.
- JSON to YAML ConverterConvert JSON objects to YAML format for configuration files, CI/CD pipelines, or scripts. Live preview, copy, and download.
- YAML to JSON ConverterConvert YAML config files into JSON format quickly. Supports nested objects, arrays, multi-line strings, and all scalar types.
- Markdown to PDF ConverterConvert Markdown documents to styled PDF directly in your browser. Print-ready output with code blocks, headings, and lists. No upload needed.
- CSV to SQL Insert GeneratorConvert CSV files into SQL INSERT statements. Configurable table name, dialect (MySQL/PostgreSQL/SQLite), and batch size.
All Converters tools · Found a bug or a wrong result? Report it.