Input HTML

Converted Markdown

HTML to Markdown Examples

Convert HTML to readable Markdown. Example:

API reference snippet

Input HTML:

Input

Converted Markdown:

Output

Use Sample above to load more example data.

What Is HTML to Markdown?

Markdown is a lightweight markup for docs and READMEs. HTML is verbose—converting HTML to Markdown gives you readable, editable text. This tool parses your HTML and outputs Markdown: headings become #, links become [text](url), lists become - or 1.. The CommonMark spec defines the output format.

Conversion runs entirely in your browser. Nothing is sent to a server. The output is clean Markdown. For the reverse (Markdown to HTML), use Markdown to HTML. For editing with live preview, use the Markdown Editor.

How to Use This Tool

1

Paste or Upload HTML

Copy your HTML and paste it into the left editor. You can also click Upload to load a .html or .htm file. The Sample button loads example data.

2

View the Markdown Output

The right panel shows the converted Markdown. Headings, paragraphs, links, images, lists, and tables are converted. Complex HTML may produce verbose or approximate Markdown.

3

Copy or Download

Use Copy or Download. For formatting the output, use the Markdown Formatter. For validation, use the Markdown Validator.

When HTML to Markdown Helps

When migrating content from a website, CMS, or WYSIWYG editor to Markdown (e.g. for GitHub, GitLab, or static sites like Jekyll), this conversion provides a starting point. The W3C HTML spec defines the input. Copy HTML from a page, paste here, and get Markdown you can edit and version-control.

Scraping or exporting content often yields HTML. Converting to Markdown makes it editable in plain text and compatible with docs tools. For converting Markdown to HTML, use Markdown to HTML. For table generation from data, use the Markdown Table Generator.

Frequently Asked Questions

Is the conversion lossless?

Not always. HTML has more structure (divs, spans, classes). Markdown is simpler. Complex layouts, nested divs, or inline styles may not map perfectly. The output is a best-effort conversion.

Is my data private?

Yes. Conversion runs entirely in your browser. No data is sent to any server.

What about tables?

HTML tables are converted to Markdown table syntax where possible. Complex tables (colspan, rowspan) may not convert cleanly. For creating tables from data, use the Markdown Table Generator.

What about images?

Image tags become Markdown image syntax: ![alt](url). The alt text and URL are preserved. Relative URLs stay as-is.

Can I convert a full HTML page?

Yes. Paste the full page. The converter typically extracts body content. Scripts, styles, and meta tags are usually stripped. You get the main content as Markdown.

Related Tools

Learn more: CommonMark, CommonMark spec, GitHub Flavored Markdown, Markdown Guide, MDN HTML.