File Converters

HTML to Markdown Converter

Convert HTML markup into clean Markdown text with automatic tag conversion, entity decoding, and whitespace normalization.

Run tool

This HTML to Markdown converter transforms markup into formatted Markdown syntax using targeted pattern matching. You can paste snippets or full HTML markup into the text box to produce readable Markdown. The converter recognizes standard structural elements, turning headings from h1 through h6 into corresponding hash prefixes, paragraphs into spaced text blocks, and blockquotes into standard quote lines. It processes unordered and ordered list items, converts line breaks and horizontal rules, and transforms bare code tags into inline backticks or fenced code blocks when formatted inside pre containers. Inline emphasis tags like b, strong, i, and em convert directly into Markdown asterisks or underscores. Hyperlinks with standard href attributes become bracketed links, while matching img elements turn into Markdown image syntax. Embedded script and style blocks are stripped automatically along with remaining unmapped tags, while their enclosed text remains intact. The tool also decodes common named entities and numeric character references, normalizing excessive blank lines into clean spacing across your output.

Instructions

  1. Paste or type your HTML markup into the Text field.
  2. Click the run button to start the conversion process.
  3. Review the resulting Markdown output displayed in the result area.
  4. Copy the converted Markdown text for use in documentation, notes, or publishing tools.

Examples

  • Input: <h1>Project Setup</h1><p>Visit <a href="https://example.com">our site</a> for <strong>fast</strong> updates.</p> Output: # Project Setup Visit [our site](https://example.com) for **fast** updates.
  • Input: <ul><li>First item</li><li>Second item</li></ul><pre><code>npm install</code></pre> Output: - First item - Second item ``` npm install ```

FAQ

What happens to inline style and script tags during conversion?

Matched opening and closing script and style element blocks are stripped automatically, removing both the tags and their internal content.

Does the converter preserve tags that lack standard Markdown equivalents?

Unsupported or unrecognized HTML tags matching the converter pattern are removed from the output while preserving the readable inner text.

How are HTML character entities handled?

Standard named entities such as &amp; or &gt; and valid numeric decimal references are converted directly into their corresponding characters.

What happens if the text input is left blank?

Submitting an empty text field produces an empty converted text result without errors.

Embed this tool

Add this working SmartPlusLab tool to your website with the code below.