CSV to markdown table converter

Updated

Paste CSV, TSV, or a range copied straight from Excel or Google Sheets and get an aligned GitHub-flavored markdown table. Quoted fields, embedded commas, and multi-line cells are parsed correctly; pipes are escaped for you. Flip the direction to turn a markdown table back into CSV. Everything runs in your browser.

Alignment (click to cycle)
CSV / TSV — or paste a spreadsheet range

4 rows × 4 columns · delimiter: Comma · pipes in cells are escaped as \|, newlines become <br>. Nothing is uploaded.

Why is the markdown padded with spaces?

Padding is purely cosmetic: markdown renderers ignore extra spaces inside table cells, but a padded source reads like a table in any text editor, which matters when the file lives in a repository and people edit it by hand. Turn Pad columns off for the most compact output, for example when the table is generated programmatically or will be embedded in a chat message. The markdown formatter can re-pad an existing table later.

How is this different from the table generator?

The markdown table generator is a grid editor: you type into cells, add rows, and drag things around. This page is a converter: it takes data you already have in CSV or TSV form and produces the table in one step, and it can go the other way, turning a table from a README back into CSV you can open in a spreadsheet. Use the generator to author; use this to convert.

What does a markdown table look like?

A header row, a separator row of dashes, then data rows, all divided by pipes. Colons in the separator set alignment: :--- left, :---: center, ---: right. Tables are a GitHub Flavored Markdown extension supported by GitHub, GitLab, Notion, Obsidian, and most documentation tools; the full syntax is on the markdown cheat sheet.

How do I convert an Excel or Google Sheets table to markdown?

Select the cells in the spreadsheet, copy, and paste into the input box. Spreadsheets put tab-separated text on the clipboard, which the delimiter auto-detect recognizes. Tick "First row is header" if your selection included the column titles.

What happens to commas and quotes inside a cell?

The parser follows RFC 4180: a field wrapped in double quotes may contain commas, newlines, and doubled quotes ("") for a literal quote. Those characters land in the markdown cell unchanged; a newline inside a cell becomes a <br> tag because markdown table cells cannot span lines.

How are pipe characters handled?

A literal | inside a cell would split the column, so the converter writes it as \| which GitHub and most renderers display as a plain pipe. Converting back to CSV reverses the escape.

Can I set column alignment?

Yes. Click a column chip above the input to cycle it through left, center, and right. Alignment is written into the separator row with colons (:---, :---:, ---:), which is how GFM tables express it.

Does it work for large files?

Yes, within your browser's memory. Files of tens of thousands of rows convert in well under a second; nothing is uploaded, so there is no server-side size limit.

More markdown tools