Table to Markdown Converter
Convert an HTML table, CSV, or TSV into a GitHub-Flavored Markdown table. Pick the first row as the header, choose column alignment, and toggle padded or compact output. Pipe characters in cells are escaped automatically.
Input
Output
More ways to use this tool
REST API
curl -X POST https://api.iotools.cloud/v1/tool/table-to-markdown-converter \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"inputMode": "csv",
"inputTable": "Name,Role\nAlice,Admin\nBob,Editor",
"firstRowHeader": "true",
"alignment": "left",
"compactMode": "true"
}'Swap in your own key from your account. The tool's fields are the body — no wrapper.
Ask an AI agent
Use the IOTools `table-to-markdown-converter` tool (Table to Markdown Converter) on this input:
YOUR_INPUT_HEREPaste this at any agent connected to the IOTools MCP server, then add your input.
Embed widget
<iframe
src="https://iotools.cloud/embed/table-to-markdown-converter/"
width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
title="Table to Markdown Converter — iotools.cloud"
sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
allow="clipboard-write"
style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>Drop this into your own page — free, no key required, just a link back.
| Cost per API/MCP call | From 5 credits |
|---|---|
| Need more credits? | View pricing |
Also available with
Guides
Turn a table you already have — an HTML <table>, a comma-separated CSV export, or a tab-separated block copied straight from a spreadsheet — into a clean, GitHub-Flavored Markdown table. Paste your data, pick the input format, and the Markdown appears instantly, ready to drop into a README, a pull request, an issue, or any Markdown-aware editor.
How to use it
- Choose the Input Format that matches your data: HTML Table, CSV, or TSV.
- Paste the table into the input box. If you copy a range of cells from Excel, Google Sheets, or Numbers, it arrives as TSV (tab-separated) — pick that option.
- Adjust the options and copy the Markdown from the output panel.
The conversion runs entirely in your browser. Nothing you paste is uploaded to a server.
Options
- First Row as Header — treats the first row as the table header (the bold top row above the
---divider). Turn it off and the tool generates genericColumn 1,Column 2, … headers, since a Markdown table always needs a header row. - Column Alignment — sets the alignment marker in the separator row for every column: left (
---), center (:-:), or right (--:). Markdown renderers use these to align the cell text. - Compact Mode — outputs the smallest valid table (no padding spaces). Leave it off and columns are padded so the raw Markdown lines up in a monospace editor and stays readable before it's rendered.
What it handles for you
- Pipe escaping. A literal
|inside a cell would otherwise split it into two columns, so every pipe in your data is escaped to\|automatically. - Ragged rows. If some rows have fewer cells than others, the shorter rows are padded with empty cells so the table stays rectangular and valid.
- Messy HTML. The HTML parser reads
<tr>,<th>, and<td>tags, strips any inline markup inside cells, and decodes common entities like&and .
Which format should I pick?
If you copied cells directly from a spreadsheet, use TSV — that's the format the clipboard uses. If you exported a .csv file, use CSV (it understands quoted fields containing commas). If you're pulling a table out of a web page's source, use HTML Table.
Does it produce GitHub-Flavored Markdown?
Yes. The output is a standard GFM pipe table — the same syntax GitHub, GitLab, and most Markdown editors render as a table.
Is my data private?
Yes. The conversion happens locally in your browser; the table text never leaves your device.