HTML to Markdown Converter
CV-21Paste HTML and get Markdown back: headings, links, lists, code blocks and tables all convert. Pick the heading, bullet and code block style you want.
Runs in your browser. Nothing is uploaded.
HTML
Markdown
How to use it
- Paste your HTML into the input box, or open an .html file.
- Read the Markdown in the output box. It updates as you type.
- Choose Hash or Underline headings, the bullet character, and fenced or indented code blocks.
- Check links, tables and any formatting that Markdown cannot express.
- Copy the Markdown or download it as a .md file.
What converts and what is lost
Headings, paragraphs, bold, italic, links, images, lists, block quotes, code and horizontal rules all map to Markdown. Strikethrough becomes ~~text~~, and tables become pipe tables with the first row as the header. Markdown cannot hold colors, classes, ids, inline styles or most other attributes, so those are left out. Elements with no Markdown form, such as forms and iframes, are reduced to their text or dropped.
Scripts, styles and whole pages
You can paste a fragment or a full page. The contents of <script>, <style> and <title> are dropped, so they do not end up as text in the result. The text of the page body is kept. Characters that Markdown treats as markup, such as * and _ in ordinary text, get a backslash so they stay literal. A lot of page chrome, such as menus and footers, comes through as lists and links, so trim the HTML first for an article.
Tables
Each row becomes a line of cells between pipes, and a divider line is added after the first row, since Markdown tables need a header. A pipe character inside a cell is escaped. Cell content is turned into inline Markdown on one line, so a list or a paragraph break inside a cell is flattened to spaces. Merged cells with colspan or rowspan are not kept, and tables nested inside cells are not supported.
Questions people ask
How do I convert HTML to Markdown?
Paste the HTML into the input box and the Markdown appears in the output box. Copy it or download a .md file. It runs in your browser using the turndown library, so the HTML stays on your device.
Does it convert HTML tables?
Yes, to GitHub-style pipe tables with the first row as the header. Merged cells and tables nested inside cells are not kept, and anything other than inline formatting inside a cell is flattened to one line.
What happens to scripts and styles?
<script>, <style> and <title> elements are dropped, so their contents do not appear in the Markdown. Other elements that Markdown has no form for, such as forms and iframes, are reduced to their text or removed.
Can I choose the Markdown style?
Yes. Headings can use # marks or underlines, bullets can be a dash, asterisk or plus, and code blocks can be fenced with three backticks or indented by four spaces. Links are written inline as [text](url).
Why are there backslashes in my Markdown?
Characters such as *, _ and # mean something in Markdown. When they appear in ordinary text, they get a backslash so they display as typed instead of being read as formatting. Remove the backslash if you do want the formatting.
Will the converted Markdown look the same as the page?
Not exactly. Markdown only holds structure and simple emphasis. Layout, colors, fonts, classes and most attributes are lost, so the result keeps the content and its outline but not the design.
About this tool
Uses the turndown library and your browser to read the HTML, then writes Markdown. Script, style and title elements are dropped. Tables become pipe tables with the first row as the header; merged cells (colspan, rowspan) are not kept, and tables nested inside cells are not supported. Markdown has no way to write colors, classes, ids or most attributes, so those are lost, and HTML that Markdown cannot express, such as forms or iframes, is reduced to its text. Special characters in text are escaped with a backslash.