TsWorks Tools
All tools (39)

HTML to Markdown

Turn HTML into tidy Markdown, with control over every syntax choice.

Headings
Bullets
Code
Emphasis

sub, sup, kbd, ins and abbr stay as HTML.

Optional tag mappings (0)

Map an HTML tag to Markdown before and after its content. Example: strong → ** and **. Use \n for a line break.

Paste HTML on the left. Scripts, styles and event handlers are stripped.

Turning HTML back into Markdown

Paste HTML and get Markdown. Headings, emphasis, links, images, lists, blockquotes and code blocks all map across; with GFM enabled, so do tables, ~~strikethrough~~ and task lists.

Choosing a syntax style

Markdown has several ways to write the same thing, and different projects lint for different ones. The controls above cover the four that matter:

  • Headings - # Heading (ATX) or underlined (setext). ATX is what almost every linter expects.
  • Bullets - -, * or +.
  • Code - fenced with backticks, or indented by four spaces. Fenced blocks can carry a language hint; indented ones cannot.
  • Emphasis - _italic_ or *italic*.

What gets dropped

<script>, <style> and inline event handlers are removed before conversion - Markdown has no way to express them, and keeping them would mean smuggling executable code into a document. Tags Markdown genuinely cannot represent (<sub>, <sup>,<kbd>) are kept as raw HTML if you leave that option on, since most Markdown renderers pass them through.

Related tools