Anyone who has migrated documentation or moved a blog knows the moment of dread: the article text converts cleanly, the headings look right, and then the pricing table, the comparison table, the one piece of content that actually mattered, comes out as a paragraph of loose words. Whether your rows survive conversion is not luck. It depends on what kind of table you started with, and it is knowable before you convert anything important.
This guide explains which tables the free HTML to Markdown Converter on Ovatly turns into proper Markdown pipe tables, which ones it flattens and why, and the pre-conversion check that tells you which kind you have. It works on HTML you paste, parsed as text in your browser, and never fetches a page from a URL.
Contents
- Quick answer
- What the converter does with a table
- Which tables survive and which flatten
- How to convert an HTML table, step by step
- Worked example: a small price table
- Limitations and honest tradeoffs
- Common mistakes
- FAQs
- Conclusion
- References
Quick answer
To convert an HTML table to Markdown without losing rows: paste the HTML into the HTML to Markdown Converter and convert. A simple data table, one header row and plain cells underneath, comes out as a Markdown pipe table with every row preserved. That promise has a boundary: merged cells, nested tables and tables used for page layout do not survive as tables at all. They are flattened to text. So before converting a full page, copy the table's HTML on its own, convert that fragment first, and read the result. If the pipe table has the right columns and all the rows, the full conversion is safe.
What the converter does with a table
The converter is built on the Turndown library, which rewrites each pasted element as its Markdown equivalent. Headings become ATX headings in the # style, lists become hyphen bullets, emphasis becomes underscores, and code blocks become fenced blocks. A table that fits Markdown's model becomes a pipe table: the header row, a separator line, and one line per data row, with cells separated by pipe characters.
Markdown's table model is deliberately small. A table is a grid of plain cells under a single header row. There is no Markdown syntax for a cell that spans two columns, one that spans rows, or a table nested inside another table's cell. Anything in your HTML that relies on those shapes has no equivalent to convert into, and the converter falls back to the text the cells contained.
The rest of the page converts the same way. The converter's own worked example is a heading and a paragraph: <h2>Our story</h2> followed by a paragraph containing <em>small-batch</em> and a link comes out as ## Our story and the sentence "We make small-batch soap. Read how it is made." Images become Markdown image syntax with their source and alt text, such as . The image file itself is not downloaded.
Which tables survive and which flatten
Survives: an ordinary data table. One header row, a regular grid, text or simple inline formatting in the cells. Specification tables, price lists, feature comparisons and schedules are usually built this way, and they convert row for row.
Flattens: a table with merged cells. The moment a cell carries a span across columns or rows, the grid stops being a grid and Markdown has nowhere to put it. The text survives, the structure does not.
Flattens: a nested table, one table placed inside another's cell. Markdown cannot express it, so the inner content is read out as text.
Flattens: a layout table. Older pages, and nearly all HTML emails, use tables as scaffolding to position text and images rather than to present data. Converting one of those produces the page's words in reading order, which is sometimes useful for a draft, but it is not a table conversion.
How to convert an HTML table, step by step
- Find the table in your page's HTML and copy just the table element, from its opening tag to its closing tag.
- Paste that fragment into the HTML to Markdown Converter and convert it on its own. This is the pre-conversion check: it converts in a second and shows exactly what will happen inside the full page.
- Read the output and count the columns and data rows against the original. If the pipe table matches, the table is a survivor.
- If it flattened, stop. Keep that table as HTML in your new document, or rebuild it as a simple table, rather than discovering the loss after the page is published.
- Convert the full page or article, then copy the Markdown or download it as a .md file.
- Skim the converted document once for the other known losses: images that are now references to files you still need to move, and any complex elements that were simplified.
Worked example: a small price table
Here is the kind of table that converts cleanly, a two-column price list with a header row:
<table>
<tr><th>Bar</th><th>Price</th></tr>
<tr><td>Lavender</td><td>6.00</td></tr>
<tr><td>Cedarwood</td><td>6.50</td></tr>
<tr><td>Unscented</td><td>5.50</td></tr>
</table>
Converted on its own, it comes out as a pipe table with the header row kept as the header and all three data rows present:
| Bar | Price |
| --- | --- |
| Lavender | 6.00 |
| Cedarwood | 6.50 |
| Unscented | 5.50 |
Three rows in, three rows out, and the check took seconds. Contrast that with the same shop's homepage, where a table positions a photo beside a paragraph of welcome text. That table is layout, not data. Converting it produces the welcome text as ordinary paragraphs and the photo as an image reference. Nothing is malfunctioning: it was never the kind of table Markdown can hold.
Limitations and honest tradeoffs
The headline limitation deserves repeating plainly: "without losing rows" is a property of simple tables, not of the tool in general. Merged cells, nested tables and layout tables do not survive as tables. They flatten to text, keeping the words and discarding the structure. If your document depends on a merged header or a spanned cell, Markdown itself is the constraint, and no converter setting changes that.
Beyond tables, elements Markdown cannot express are simplified or dropped while keeping their text where possible, and scripts and styles are not carried over at all. The converter also works only on what you paste: a full page or a fragment. It never fetches a URL, so live content has to be copied from the source yourself. And because an image converts to a reference rather than a file, a converted document with pictures is not finished until the image files have been moved to wherever the references point.
Common mistakes
- Converting the whole page first. The failure is discovered at the end, mixed into a long document. Convert the table alone first.
- Assuming a layout table will survive because it looks tidy. Appearance says nothing. If the table positions content instead of presenting data, it will flatten.
- Forgetting the images. The output holds image references, not image files. Publish without moving the files and every picture is a broken link.
- Expecting merged cells to be preserved. A spanned cell has no Markdown form. Rebuild the table as a plain grid, or keep that one table as HTML.
FAQs
Will every HTML table convert to a Markdown table? No. Simple data tables with a header row convert to pipe tables with their rows intact. Merged cells, nested tables and tables used for page layout do not survive as tables; they are flattened to text.
How can I check a table before converting the whole page? Copy just the table's HTML and convert that fragment on its own. If the pipe table comes out with the right columns and every row present, convert the full page. If it flattens, keep that table as HTML or rebuild it by hand.
Does the converter download the images in my HTML?
No. An image becomes Markdown image syntax carrying its source and alt text, for example
. The image file itself is not downloaded, so you need to move the files separately.
Can I convert a page by pasting its URL? No. The converter works on HTML you paste, either a full page or a fragment. It never fetches a page from a URL, and the pasted HTML is parsed as text in your browser.
What happens to scripts and styles in the pasted HTML? They are not carried over. Scripts and styles are dropped during conversion, and elements Markdown cannot express are simplified or dropped while keeping their text where possible.
Conclusion
Rows are lost in conversion when a table was never a plain grid to begin with, and that is a fact you can establish in seconds, not after publication. Convert the table on its own first, read the pipe table, and only then trust the HTML to Markdown Converter with the full page. The same habit of inspecting source before trusting output applies to your page head as well: our companion guide on canonical tag mistakes you can spot in the page source covers the declarations that quietly misdirect search engines. For more guides in this series, see our Website and Webmaster Tools guides.
References
- Turndown, the JavaScript library that converts HTML to Markdown: https://github.com/mixmark-io/turndown
- GitHub Flavored Markdown specification, on pipe table syntax: https://github.github.com/gfm/#tables-extension-