How the table to Markdown converter works

Paste your table into the box at the top of this page. That is the whole procedure. There is no format dropdown to set wrong and no import wizard to click through, because the converter reads the text and works out for itself what it is.

In short
  • Paste a spreadsheet copy, CSV text or an HTML <table>, and the format is detected for you.
  • The first row becomes the header, and the alignment row underneath it is written automatically.
  • Number columns need one manual edit: change the delimiter cell to ---: so the digits line up on the right.
  • Everything runs in your own tab, so a customer list or an internal budget is never uploaded.

How the input format is detected

Detection follows three rules, checked in that order. Text holding a <table> element is parsed as markup, and the cells are read out of its <tr> and <td> elements. Text with tab characters in it is treated as TSV, which is exactly what Excel, Numbers and Google Sheets put on your clipboard.

Anything else falls through to commas. Quoted CSV fields are respected there, so a value such as "Taipei, Taiwan" stays in one cell instead of splitting into two.

What the converter writes for you

The first row becomes the header row. Under it goes the delimiter row, the line of dashes and colons that turns a stack of pipe characters into a real table. Every column starts left aligned as :---. Cells are also padded to a common width, which changes nothing in the browser but keeps the raw file readable in a code review.

Where the result goes next

Copy the output into a README, a GitHub issue, a wiki page or a Discord message. You can also drop it into the Markdown editor on our homepage and keep writing the document around it. The rest of the Markdown tools work the same way, in the same tab, with nothing sent to a server.

Tip: Fix the data before you convert, not after. Correcting a cell in the spreadsheet and pasting again takes seconds. Hand-editing a padded Markdown table does not.

Illustration of spreadsheet cells and an HTML table element flowing into a single pipe-delimited Markdown table

From an HTML table to Markdown: a worked example

Say you are moving a page out of an old CMS and into a repository. You open the page source and copy the table out of it. This is what lands on the clipboard:

<table>
  <thead>
    <tr><th>Team</th><th>Lead</th><th>Headcount</th></tr>
  </thead>
  <tbody>
    <tr><td>R&amp;D</td><td>Mei Lin</td><td>42</td></tr>
    <tr><td>Support</td><td>Dave Okoro</td><td>18</td></tr>
    <tr><td>Sales &amp; Marketing</td><td>Ana Ruiz</td><td>7</td></tr>
  </tbody>
</table>

Paste that in, and the converter returns exactly this Markdown:

| Team              | Lead       | Headcount |
| :---------------- | :--------- | :-------- |
| R&D               | Mei Lin    | 42        |
| Support           | Dave Okoro | 18        |
| Sales & Marketing | Ana Ruiz   | 7         |

Three decisions were made for you in that jump, and each one is worth naming.

Three things the converter did quietly

  • The <thead> row became the Markdown header, and the delimiter row appeared beneath it. That is the part nobody enjoys typing by hand.
  • The HTML entity &amp; was decoded back to a plain &, because Markdown is plain text and has no use for entities.
  • Every column was padded to the same width. Renderers ignore that padding, but a reviewer reading the diff will thank you for it.

The whole trip, in four steps

  1. Copy the complete <table> element, opening tag through closing tag.
  2. Paste it into the input box at the top of this page.
  3. Change the Headcount delimiter cell from :-------- to --------:, because the column holds numbers.
  4. Copy the Markdown out and paste it into your file.

Step three is the only manual work in the whole job. Paste the finished block into the editor first if you want proof: the live preview confirms the table renders before it reaches your repository.

What each source actually pastes

"Copy the table" means different things depending on where you copy it from. That difference decides whether the conversion is clean or fiddly.

What lands on your clipboard, source by source

These are the sources people paste from most, what each one really hands over, and the detail in each that catches people out.

You copy fromWhat reaches the clipboardDetected asWatch out for
Microsoft ExcelTab-separated rows, one line eachTSVA cell containing a line break arrives wrapped in double quotes
Google SheetsTab-separated plain textTSVMerged cells paste as empty cells, leaving ragged rows
Apple NumbersTab-separated plain textTSVCurrency and percent formatting arrives as text, such as NT$1,200
LibreOffice CalcTab-separated rowsTSVFormulas paste as their displayed result, not the formula
A .csv file in a text editorComma-separated lines with quoted fieldsCSVSemicolon-delimited exports from European locales are not CSV
Page source or DevToolsRaw <table> markupHTMLCopy the whole element, not a loose run of <tr> rows
A rendered table on a web pageTab-separated text, flattened by the browserTSVLinks and bold inside cells are lost in the flattening
A Notion database viewTab-separated textTSVMulti-select cells join their values with commas
A Word or Google Docs tableTab-separated textTSVEmpty trailing cells can add a phantom last column
A PDF tableLine-by-line text with no separatorsNeitherRebuild it in a spreadsheet first, then copy from there

Why a spreadsheet is the best middle step

The pattern in that last column is easy to miss, so here it is plainly. Every clean row comes from a spreadsheet, and every awkward row comes from somewhere that only looks like a grid. So when a source refuses to paste cleanly, drop it into Excel or Google Sheets, tidy the columns there, and copy that block into this converter. Two paste operations still beat retyping thirty rows.

Watch out: A PDF is the one source with no structure left to recover. Its text arrives line by line with no separators at all, so no converter can guess where your columns were.

Converter or generator: which page do you want?

This page and the Markdown table generator are opposites, and picking the wrong one costs a few minutes. One question separates them: does the data already exist?

Convert when the table lives somewhere else

Use this page when the rows are already sitting in a spreadsheet, an export, a CSV file or an HTML page. The job is translation, not authoring, and you should not be retyping a single cell. Detection, the header row and the delimiter row are all handled for you.

Generate when the table does not exist yet

Use the table generator when you are inventing the content as you type: a small comparison, a pricing grid, a parameter reference. It gives you an empty grid and one alignment button per column, which beats fighting pipe characters in a plain text box.

Tip: If you can select it and copy it, convert it. If you have to think it up, generate it. That rule settles the choice every time.

Three lines of CSV, converted

A short example shows how little work this direction takes. Given this input:

Region,Q1,Q2
North,1420,1655
South,980,1130

you get this back immediately:

| Region | Q1   | Q2   |
| :----- | :--- | :--- |
| North  | 1420 | 1655 |
| South  | 980  | 1130 |

If you would rather understand the syntax than generate it, the Markdown tables guide covers alignment, escaping and cell contents in full, and how to make a table in Markdown gives the short answer. Tables were never part of original Markdown. They arrived with GitHub Flavored Markdown, which is why a strict CommonMark parser with no extensions still shows your table as plain text.

What goes wrong, and the fix

Four failures cover nearly every bad conversion. Each one has a visible symptom, so start from what you can see on screen.

A row splits into too many columns

Almost always a pipe character inside the data. | is the column separator, so a cell reading a | b becomes two cells. Escape it as \|:

| Pattern  | Meaning        |
| :------- | :------------- |
| cat|dog  | broken row     |
| cat\|dog | correct escape |

Commas cause the same trouble in CSV. Taipei, Taiwan,2.6M is three fields, while "Taipei, Taiwan",2.6M is two. Re-export with quoting turned on, or paste tab-separated text from the spreadsheet instead, where the problem cannot happen at all.

Nothing comes out of the HTML input

Check that you copied a complete <table> element with its closing tag. A fragment starting at <tr> gives the parser no table to find. Copying from the rendered page instead of the source is fine as well; that text simply arrives flattened, as TSV.

The rows come out the wrong shape

  • Ragged rows. Merged cells and uneven exports leave rows with fewer values than the header. Most parsers refuse to render the table rather than guess, so fill the gaps with empty cells until every row has the same number of pipes.
  • A line break inside a cell. A Markdown table row has to sit on one line, so replace the break with <br>.
  • A cell that needs paragraphs, a list or a code block. That content has outgrown a table. Split it into headed sections instead, a trade-off Markdown versus HTML works through.

The output renders as text with visible pipes

Either the delimiter row is missing, or there is no blank line between the table and the paragraph above it. Drop the block into the Markdown viewer to confirm the syntax before blaming the destination. Remember too that a very wide table gets clipped when the page is saved as a PDF. For whole documents rather than single tables, HTML to Markdown and Markdown to HTML cover both directions.

Support data verified

Frequently Asked Questions

How do I convert an Excel table to Markdown?

Select the cells in Excel, copy them, and paste into the box at the top of this page. The clipboard carries tab-separated values, which the converter recognises automatically and turns into a Markdown table with a header and an alignment row. Google Sheets and Apple Numbers behave identically.

Can it convert an HTML table to Markdown?

Yes. Paste a complete <table> element, including the closing tag, and the cells are read out of its rows. HTML entities such as &amp; are decoded back to plain characters. For converting a whole HTML document rather than one table, use the HTML to Markdown converter.

Does it handle CSV files?

Yes. Paste the text of the file and commas are used as the separator, with quoted fields respected so that a comma inside a value does not split the cell. Semicolon-delimited exports are not recognised as CSV, so switch the delimiter to a comma or a tab before pasting.

How is this different from the Markdown table generator?

This page converts a table you already have. The table generator builds a new one from scratch in an editable grid with per-column alignment controls. Converting is for existing data; generating is for tables that do not exist yet.

Is my data uploaded anywhere?

No. The conversion runs entirely in your browser as JavaScript, so nothing is sent to a server, stored or logged. That makes it safe for internal spreadsheets, customer lists and anything else you would not paste into an unknown website.

Keep learning

Try the Editor

Open Editor