CSV to Markdown and HTML table converter
Paste CSV, or copy cells straight out of a spreadsheet. The output updates as you type and handles the awkward characters, such as pipes, quotes, angle brackets and commas inside cells, for you.
Preview
| Product | Category | Price | Stock | Notes |
|---|---|---|---|---|
| Desk lamp | Lighting | 34.99 | 120 | Warm white, 3 brightness levels |
| Monitor arm | Accessories | 89.00 | 45 | Fits 17–32 inch screens |
| Cable tray, large | Accessories | 24.50 | 300 | |
| Standing desk | Furniture | 429.00 | 12 | Ships in 2 boxes; "easy" assembly |
| Footrest | Furniture | 39.95 | 80 | Adjustable | tilting |
How to use it
Paste your data or open a file, choose Markdown or HTML, then copy or download the result. The preview shows how the parser split your data into columns. If a column looks wrong there, fix the delimiter or quoting before copying the output. Tick or untick "Line up the pipes" to choose between a Markdown table that is readable as plain text and a compact one; both render identically.
What the converter does to your data
Reading CSV
Input is parsed according to RFC 4180. A comma inside double quotes stays part of the cell
("Cable tray, large" is one cell), and a doubled quote inside a quoted cell is a literal
quote ("Ships in 2 boxes; ""easy"" assembly" becomes Ships in 2 boxes; "easy"
assembly). Rows shorter than the header are padded with empty cells and the tool says how
many. Repeated or empty column names are made unique so no column is lost.
Writing Markdown
Output is a GitHub Flavored Markdown pipe table. The second line sets alignment:
:--- for left and ---: for right. Inside cells, | becomes
\|, a backslash is doubled, and a line break becomes <br>, which GitHub
and most renderers display as a break. Leading and trailing spaces in a cell are trimmed, because
Markdown ignores them anyway.
Writing HTML
Output is a plain semantic table: an optional <caption>, a <thead>
whose header cells carry scope="col" so screen readers announce the column name with each
value, and a <tbody>. Every cell is escaped, turning &,
<, > and quotes into entities, so data can never become markup. There
are no classes or colours to fight with your stylesheet.
Worked example
The sample has five products and five columns. Price and Stock are entirely numeric, so they are
right-aligned: in the separator line their dashes end in a colon (-----:), while the text
columns start with one (:----).
The third product's name contains a comma inside quotes and arrives as one cell,
Cable tray, large. The footrest's note, Adjustable | tilting, would otherwise
split into two columns; in the Markdown it is written Adjustable \| tilting. In the HTML the
doubled quotes in the standing desk's note come out as "easy".
Markdown or HTML?
| Destination | Use |
|---|---|
| GitHub or GitLab README, issue, pull request | Markdown |
| Static site (Hugo, Jekyll, Astro, Docusaurus) | Markdown |
| Notes apps such as Obsidian | Markdown |
| CMS HTML block, email template | HTML |
| Table needing a caption or merged cells | HTML (then edit) |
Limits
Markdown tables cannot merge cells, hold block content such as lists, or have more than one header row.
Formatting inside cells, such as bold, links or code, is left as typed, so Markdown syntax in your data
will be rendered. The converter does not format numbers: 1234.5 stays
1234.5. For JSON output instead, use the JSON and CSV converter;
to summarise before publishing, use the pivot table.
Common questions
How do I copy a table from Excel or Google Sheets into Markdown?
Select the cells, copy, and paste them into the box above. Spreadsheets put tab-separated text on the clipboard, which is detected automatically, so there is no need to save a CSV file first. Then copy the Markdown output into your README, issue or document.
How do I put a pipe character inside a Markdown table cell?
Escape it as \|, which this tool does for you. An unescaped pipe would be read as a column boundary and shift every cell after it. Backslashes are escaped too, and line breaks inside a cell become <br>, because a Markdown table row must fit on one line.
Which Markdown flavours support tables?
Pipe tables come from GitHub Flavored Markdown and are supported by GitHub, GitLab, Bitbucket, most static site generators, Obsidian, Notion imports and many other editors. The original 2004 Markdown had no table syntax, so a strictly classic parser will show the pipes as text.
Is the HTML output safe to paste into a web page?
Yes, as far as the cell contents go: every value is HTML-escaped, so a cell containing <script> appears as text rather than running. The table has no inline styles apart from right-alignment of numeric columns, so it takes on your site's own table styling.
Why are some columns right-aligned?
Columns where at least 80% of the filled cells are numbers are right-aligned, as spreadsheets and typesetting conventions do, so the digits line up by place value. Choose "Left" alignment if you would rather not.
Other tools
- CSV cleaner How do I clean up this messy CSV export?
- CSV to bar or line chart How do I turn this spreadsheet into a chart quickly?
- Pie and donut chart maker What share of the total is each category?
- Histogram maker How many bins should my histogram have?
- Scatter plot with linear regression Are these two numbers related, and how strongly?
- Summary statistics calculator What are the mean, median and outliers of this data?
- Pivot table and group-by summarizer What are total sales by region and product?
- JSON to CSV converter (and back) How do I open this JSON export in a spreadsheet?