Developer

HTML to Markdown Converter

Convert HTML into clean Markdown in your browser. Handles tables, nested lists, links and code blocks, and strips presentational markup.

Last reviewed by the Radiatus Cloud team

Need this built for your product?

We design, build & host secure software & APIs.

Talk to an engineer

What conversion can and cannot preserve

Markdown is deliberately smaller than HTML. It has constructs for headings, emphasis, links, images, lists, blockquotes, code and, with GFM, tables. It has nothing for colspan, inline styling, arbitrary attributes, forms, iframes or nested layout. Converting HTML to Markdown is therefore lossy by design, and the useful question is which losses are acceptable.

This converter maps structural elements to their Markdown equivalents and discards purely presentational wrappers. A <div> used for layout disappears; the text inside it survives. A <span style="color:red"> loses the colour and keeps the words. That is the correct behaviour: if you needed the colour, you needed HTML.

The pasted-from-Word problem

The most common input to a converter like this is HTML copied out of a word processor or a CMS editor. That markup is typically dense with nested spans, inline styles, conditional comments and class names that mean nothing outside the originating application. Converting it is really an exercise in throwing almost all of it away. The result is usually dramatically shorter than the input, which is the point.

Tables and nesting

Simple rectangular tables convert cleanly to GFM pipe tables. Tables using rowspan or colspan have no Markdown representation at all, and any converter must either flatten them, losing the merge, or emit raw HTML. Nested tables, still common in email templates, cannot be represented and are best handled by keeping the HTML.

Escaping matters

Text content that happens to contain Markdown syntax must be escaped or it will be reinterpreted on the next render. A literal asterisk, underscore, backtick or square bracket in body text needs a backslash in front of it, otherwise a product name like file_name_here renders with an italic run in the middle. Converters that skip this step produce output that looks fine until it is rendered.

Local conversion

Parsing uses the browser's own HTML parser, so the structure you get is exactly what a browser sees. Nothing is uploaded, which matters when converting internal documentation or client work.

Related tools

  • JSON Formatter — Format and beautify JSON in your browser. Pinpoints syntax errors by line and column, flags unsafe integers, and never uploads your data to a server.
  • JSON Validator — Validate JSON syntax with precise line and column errors, and check documents against a JSON Schema. Runs locally in your browser, nothing uploaded.
  • Regex Tester — Test regular expressions against sample text with live match highlighting, capture groups and flag control. Runs entirely in your browser.
  • HTML Minifier — Minify HTML by removing comments and redundant whitespace, without breaking inline elements or pre blocks. Runs entirely in your browser.

Frequently Asked Questions

Why is my formatting lost in the conversion?

Markdown has no representation for colours, fonts, inline styles or arbitrary attributes. Conversion keeps structure such as headings, lists, links and emphasis, and discards presentation. If the styling was essential, Markdown is the wrong target format.

What happens to tables with merged cells?

Markdown tables cannot express rowspan or colspan. The merge is either flattened, losing the structure, or the table is left as raw HTML. For complex tables, keeping the original HTML is usually the better choice.

Why do underscores in my text turn into italics?

Characters that carry meaning in Markdown must be escaped when they appear in body text. A product name such as file_name_here will render with an italic run unless the underscores are backslash-escaped. This converter escapes them for you.

Can I convert HTML pasted from Word or Google Docs?

Yes, and that is the most common use. Such markup is mostly nested spans and inline styles that carry no meaning outside the original editor, so the converter discards them. Expect the output to be far shorter than the input.

Is the conversion done on a server?

No. It uses your browser's own HTML parser and runs locally, so internal or client documents are never transmitted.

Privacy & Security

All processing happens locally in your browser — nothing is uploaded.

Data: None
Client-side-Side
Active
v1.0

How to Use

Paste HTML markup; the Markdown equivalent appears instantly.

Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.