Markdown Table Generator
CSV in, HTML or Markdown table out. No more hand-typed pipe characters.
What this does
Paste CSV or TSV, click Markdown Table or HTML Table, get a table. The first row becomes the header. The delimiter is detected for you, so commas, tabs, semicolons and pipes all work, and a quoted cell with a comma inside stays in one piece.
Here's some CSV:
Tool,Price,Notes
grep,$0,"fast, free"
sed,$0,a|b
awk,$0,*stars* and snake_case The Markdown table it makes:
| Tool | Price | Notes |
| ---- | ----- | ------------------------- |
| grep | $0 | fast, free |
| sed | $0 | a\|b |
| awk | $0 | \*stars\* and snake\_case | The quoted comma stayed in its cell. The pipe in a|b got a backslash so it doesn't start a new column, and the asterisks and underscore got escaped so GitHub shows them as typed instead of italicizing half the row. Columns are padded so the raw Markdown lines up, which the person reviewing your pull request will appreciate. Padding stops at 80 characters, so one very long cell doesn't stretch every row.
Common use cases
README and docs tables. Export the sheet as CSV, paste it, copy the Markdown table, commit. Typing pipes by hand gets old by the second row.
HTML tables for a blog post, a docs page or an email. The output is a plain <table> with <thead> and <tbody>. No inline styles, no classes, so your site's CSS takes over.
Dropping spreadsheet data into a GitHub issue, a pull request description or any wiki that speaks Markdown.
Things to know
Every row gets trimmed or padded to the header's width. Short rows get empty cells. Long rows lose their extra cells without a warning, so if a value seems to be missing, count the header columns.
Line breaks inside a quoted cell break a Markdown table, because a table row has to fit on one line. Swap them for <br> before converting. The Markdown output leaves angle brackets alone, and GitHub renders <br> inside cells. In HTML output the line break stays inside the <td>, where the browser shows it as a space.
That same hands-off treatment of angle brackets cuts both ways. The HTML output escapes <, >, & and quotes, so a cell holding <b>bold</b> shows up as literal text. In the Markdown output it reaches GitHub as real HTML and renders bold.
Privacy
Your spreadsheet goes into a text box and comes out as a table, all inside your browser. Salary bands, client lists, the fantasy league standings: nothing gets uploaded.
Questions
How do I put a pipe character inside a Markdown table cell?
Escape it as \|. The generator does that for you, including inside backtick code spans, where GitHub-Flavored Markdown still needs the backslash: `x|y` comes out as `x\|y`. GitHub shows a plain pipe in both cases.
Can I align Markdown table columns left, right or center?
The generator writes a plain separator row of dashes, so no alignment is set. Add colons by hand after copying: :--- for left, ---: for right, :---: for center. Right-aligning a column of prices is usually worth the five seconds.
Why are there backslashes in my Markdown table?
Markdown treats * and _ as formatting, so the generator escapes them. snake_case comes out as snake\_case and renders as snake_case. If you actually want bold or italics in a cell, delete the backslashes. One catch: inside backticks the backslash shows up on GitHub, so delete it there too.
Is the first row always the header?
Yes. Markdown tables can't exist without a header row, and the HTML output puts row one in <thead>. If your data has no header, add a row of column names before converting.
Does it work with data copied from Excel or Google Sheets?
Yes. Copying cells from a spreadsheet gives you tab-separated text, and the delimiter detection picks up the tabs. Exported CSV files work too, byte order mark and all.