Skip to content
ToolPlankDEV
Text Tools
100% In-Browser Execution

Updated:

HTML Table to Markdown Converter

Use this html table to markdown converter to turn an HTML table, or a table copied from a web page, into a Markdown table for a README, wiki or issue. Links and bold text are kept, pipes are escaped and merged cells are handled. Nothing is uploaded.

Processing in browser...

Loading the tool. It runs entirely in your browser, so your data is never uploaded.

More free tools you may need next.

Quick Guide

How to use HTML Table to Markdown

Simple step-by-step instructions to get the exact output you need.

  1. 01

    Paste the table

    Copy a table from a web page, Google Docs or Word and paste it into the box, or paste HTML that contains a <table>. Press Example to load two small tables with a link, bold text and a merged cell.

  2. 02

    Choose the table

    When the HTML has several tables, pick one in the Table menu, or choose All tables. The preview shows the first rows of the table you picked.

  3. 03

    Set the Markdown options

    Align columns sets the alignment row. Keep links and bold turns links into text and bold or italic text into ** and _. Merged cells and Line breaks in cells decide what happens to things Markdown cannot show.

  4. 04

    Copy the Markdown

    Press Copy Markdown to paste the table into a README, a wiki page or an issue, or Download to save table.md.

How to Convert an HTML Table to Markdown

To convert an HTML table to Markdown, paste the table into the box above. The tool reads the header and the rows and writes a pipe table with a header line, an alignment line and one line per row. For the first table in the Example it writes:

markdown
| Name                               | Role                   | Notes                            |
| :--------------------------------- | :--------------------- | :------------------------------- |
| Ada Lovelace                       | Mathematician          | Wrote the first program, in 1843 |
| [Linus](https://example.com/linus) | **Engineer**           | Pipes \| and more                |
| Grace Hopper (admiral)             | Grace Hopper (admiral) | Line one<br>Line two             |

The link in the second row stayed a link and the bold text stayed bold. The pipe in the Notes cell was escaped, because a bare pipe would start a new column. The line break in the last cell became a <br> tag, since a Markdown table row has to stay on one line.

Paste a Table Copied from a Web Page, Google Docs or Word

When you copy a table from a web page, Google Docs or Word, the clipboard holds an HTML version of it next to the plain text. The tool takes the HTML version when you paste, so the cells, the header and the links are all there. You do not need to look at the page source.

If the clipboard has only plain text with tabs between the cells, which is what a spreadsheet gives you, the tool reads that as a table as well. For a table that is already in CSV text, CSV to Markdown is the more direct tool.

What Is Kept and What Is Lost

Markdown tables are simpler than HTML tables, so some things have to change. The tool keeps the content and drops the layout.

  • Kept: cell text, the header row, links, bold and italic text, line breaks (as <br>), special characters that Markdown would misread.
  • Changed: merged cells. Markdown has no colspan or rowspan, so the value is repeated in each covered cell, or only the first cell is filled, depending on Merged cells.
  • Replaced: an image becomes its alt text.
  • Dropped: colors, widths, fonts, scripts, styles, and the caption. A table inside a cell is flattened into text, and a list inside a cell becomes words on one line.

Characters that Markdown uses for formatting, such as *, `, [ and ], are escaped with a backslash so they show as typed. An underscore is escaped only when it could start italics, so snake_case stays as it is. Turn off Keep links and bold if you want plain text without any Markdown marks.

How to Align Columns in a Markdown Table

The second line of a Markdown table sets the alignment with colons: a colon on the left means left, on both sides means center, and on the right means right. Align columns applies one choice to every column. Right alignment suits numbers, and left suits text.

Align columns in text is a separate setting. It pads each cell with spaces so the pipes line up in the raw text, as in the code above. That makes the Markdown easy to read and to compare in a pull request, and it does not change how the table is displayed. Turn it off for the shortest possible text.

Pipes and Line Breaks Inside Cells

Two characters cause most problems in Markdown tables. A pipe sign inside a cell would be read as the start of the next column, so the tool writes it as \|. A line break would end the row, so it is written as a <br> tag, which GitHub and many other renderers display as a line break.

Some places do not allow HTML tags. In that case set Line breaks in cells to Turn into a space, and the lines of a cell are joined with a space. If you want to clean text before you convert it, Remove HTML Tags strips tags from a block of text.

Markdown Tables in a README, Wiki or Issue

Tables are not part of the original Markdown. They come from extensions such as GitHub Flavored Markdown, which GitHub uses in READMEs, issues, pull requests and wikis. Many documentation tools and note apps support them too, but some renderers do not, so check where the text will be shown.

  • A table needs a header row. If the HTML has none, turn on First row is the header, or turn it off to get an empty header row and keep every row as data.
  • A wide table scrolls sideways on narrow screens in some renderers. Keep the columns few and the cell text short where you can.
  • A very long table is easier to read when you split it into parts or link to the source.
  • Check the preview of your platform before you publish. Rendering differences are the most common surprise.

Several Tables, Footnotes and Other Options

A page often holds more than one table. The Table menu lists each one with its number of rows and columns, and All tables writes them one after the other with an empty line between them. Remove [1] markers deletes references like [1], [a] and [citation needed], which show up in tables copied from encyclopedia pages.

If you need the same table as a spreadsheet file instead, use HTML Table to CSV. To write a simple list as one line, see Column to Comma Separated List.

Limits and Privacy

The tool cannot fetch a table from a web address, because a browser tool is not allowed to read other sites. It writes pipe tables only, not HTML tables, and it does not convert whole pages. It finds up to 200 tables in one paste and accepts up to 2,000,000 characters.

The conversion runs in your browser. The HTML is not sent to a server and not stored, and scripts in pasted HTML are never run. See the Privacy Policy for details. Respect the terms of the sites you copy data from.

Frequently Asked Questions

Technical Q&A for HTML Table to Markdown

Common questions about edge cases, character encoding, and privacy guarantees.

Paste the table or its HTML into the box, pick the table if there are several, and press Copy Markdown. You get a pipe table with a header line, an alignment line and one line per row.

Yes. When you copy a table, the browser puts an HTML version on the clipboard, and the tool reads the cells, the header and the links from it.

Markdown has no colspan or rowspan, so the value is repeated in every cell the merged cell covered, or only the first cell is filled and the others are left empty. You choose in Merged cells.

Use Align columns to choose left, center, right or default. The tool writes the colons in the second line of the table for you.

A pipe is written as \| so it does not start a new column. A line break becomes a <br> tag, or a space if you choose that.

Yes, while Keep links and bold is on. Links become text, bold text becomes **text** and italic text becomes _text_. Turn the option off for plain text.

An image is replaced by its alt text. Markdown tables from this tool do not embed images.

Yes. Choose All tables to get every table in one result, separated by an empty line, or pick one table at a time.

It finds the tables in the HTML you paste and ignores the rest of the page. It does not convert the text of the page to Markdown.

No. The conversion runs in your browser, nothing is sent to a server or saved, and scripts in pasted HTML are never run.