Markdown Table Generator
Paste CSV, TSV, or anything copied from Excel / Google Sheets and get a clean GitHub-flavored markdown table — with per-column alignment, automatic | escaping, line breaks inside cells, a Discord table mode, and merge-cells via HTML output. Free online, no signup, no install — everything runs 100% in your browser.
1. Paste your data
—
2. Columns
Paste data to configure columns.
3. Output
Output options
How to convert CSV or Excel to a Markdown table
From CSV: paste your comma-separated text — the parser handles the hard cases (quoted fields like "Doe, John", embedded newlines, doubled quotes) instead of naively splitting on commas. From Excel or Google Sheets: select cells, copy, paste — spreadsheets copy as tab-separated text, which is auto-detected. From plain text: anything with a consistent delimiter (tabs, semicolons, pipes) is detected automatically; truly delimiter-free text becomes a single column.
Toggle first row is header, set each column's alignment, then export your table: copy the result or hit Download .md for a file you can drop straight into a README, documentation site, wiki, or docs folder. That's the whole excel to markdown table generator workflow — and the google sheets to markdown table path is identical.
Markdown table syntax, explained
| Name | Age || :---- | ---: | ← the separator row controls alignment| Alice | 30 |
Every markdown table needs three parts: a header row, a separator row made of dashes, and the data rows. Alignment is set per column in the separator row: :--- aligns left, :---: centers, ---: aligns right, plain --- uses the default. The generator writes this row for you — use the Align dropdowns above instead of memorizing colons.
Line breaks inside table cells
Raw newlines are illegal inside a markdown table row — the row splits in two. The standard workaround is the HTML <br> tag, and this generator applies it automatically when a pasted cell contains a newline (Excel multiline cells are the classic case). Prefer spaces instead? Switch the option to "Replace with space". This directly answers the much-searched markdown table line break / new line in markdown table cell problem.
Merge cells and rowspan in markdown tables
Here's the honest answer most generators dodge: pure Markdown has no syntax for merged cells, colspan, or rowspan. If you need merged cells, switch to the HTML tab: open the Preview tab, drag across the cells you want to combine, click Merge cells, and copy the resulting <table> with real colspan/rowspan attributes. Most markdown renderers (GitHub included) accept inline HTML, so the merged table renders exactly as designed. The Markdown tab will remind you that merges only apply to HTML output — no fake promises.
Markdown tables for Discord
Discord's chat renderer ignores markdown table syntax entirely — pasting | a | b | into Discord just shows the raw pipes. The community-standard fix is a monospace code block with hand-aligned columns, which is exactly what the Discord tab produces: columns padded to equal width inside triple backticks. Paste it into any channel and it looks like a table. No bot, no plugin, no screenshot needed.
Markdown tables for Reddit
Reddit (new and old) renders standard GFM tables, so the default Markdown output works — with one gotcha that breaks most people's first attempt: put a blank line before the table. Reddit's parser won't start a table directly after a paragraph. Copy from the Markdown tab, leave an empty line, paste. That's the entire reddit markdown table generator trick.
Why is my Markdown table not working? (troubleshooting)
If your table shows up as raw text with visible pipes, check these in order:
- Missing blank line before the table. The #1 cause on Reddit, GitHub issues, and many wikis.
- Broken separator row. The second line must be pipes and dashes (
| --- | --- |). One typo and the whole table fails. - Unescaped pipe in a cell. A literal
|splits the row. This tool emits\|automatically. - Ragged rows. Rows with fewer cells than the header confuse parsers. The generator pads short rows.
- Leading spaces / tabs before pipes. Some strict parsers want the row to start at the line's beginning.
Tables generated here are built to dodge all five — which is why "markdown table generator not working" searches usually end at a better generator, not a better tutorial.
Best markdown table generator: comparison
| This tool | tablesgenerator.com | Asking an AI chatbot | |
|---|---|---|---|
| CSV / Excel paste import | ✅ auto-detect + real parser | ❌ manual cell editing | ⚠️ works, but re-do every time |
| Quoted fields, multiline cells | ✅ handled | ❌ | ⚠️ often mangles |
| Per-column alignment | ✅ dropdowns | ✅ basic | ⚠️ you must specify |
| Pipe/backslash escaping | ✅ automatic | ❌ | ❌ frequently forgotten |
| Line breaks → <br> | ✅ one toggle | ❌ | ⚠️ if you remember to ask |
| Merge cells / rowspan | ✅ via HTML mode | ❌ | ❌ (markdown can't) |
| Discord table mode | ✅ code-block tables | ❌ | ⚠️ inconsistent |
| Live preview | ✅ rendered | ✅ | ❌ |
| Copy + download .md | ✅ | ⚠️ copy only | ❌ |
| Privacy | ✅ 100% in-browser | ✅ | ❌ data sent to servers |
| Deterministic output | ✅ same input, same table | ✅ | ❌ varies run to run |
Checked October 2026. Competitor features change; this table reflects what was observable then. tablesgenerator.com is a fine simple tool — this one exists for the cases where simple isn't enough.
Frequently asked questions
What is a markdown table generator?
A markdown table generator turns spreadsheet-like data — CSV, TSV, or anything copied from Excel or Google Sheets — into a properly formatted Markdown table (header row, alignment row, escaped cells) that renders on GitHub, GitLab, Reddit, and in most markdown editors. Doing it by hand means counting pipes and dashes; the generator above does it instantly, with per-column alignment, automatic escaping of | characters, and optional line breaks inside cells.
How do I convert CSV to a markdown table?
Paste your CSV into the input box above — the tool auto-detects the comma delimiter, including tricky cases like quoted fields containing commas ("Doe, John"), embedded newlines, and escaped quotes (""). It parses them with a real CSV parser, not a naive split, then emits a clean markdown table. Toggle the header row and per-column alignment, then copy or download the .md file.
How do I convert Excel or Google Sheets to markdown?
Copy cells directly from Excel or Google Sheets (Ctrl+C) and paste into the tool. Spreadsheet apps copy as tab-separated values, which the auto-detector recognizes. Quoted fields, multiline cells, and numbers with thousand separators all survive the trip. This is the fastest excel to markdown table generator workflow: copy, paste, copy result — no file upload, no signup.
How do I make a table for Discord?
Discord does not render markdown tables, so the honest answer is: don't send raw markdown — use the Discord mode tab above. It generates a monospace, column-aligned table inside a code block (```), which is the community-standard workaround that actually looks like a table in Discord chat. Paste it as-is into any channel.
Does this work for Reddit tables?
Yes. Reddit's markdown (both new Reddit and old Reddit) supports standard GitHub-flavored tables: a header row, a separator row of dashes, then your data. The default Markdown output above is Reddit-compatible — just make sure there is a blank line before the table in your post, which is the most common reason Reddit tables fail to render.
How do I add a line break inside a markdown table cell?
Markdown tables cannot contain raw newlines inside a cell — the row would break. The standard workaround is the HTML <br> tag, and this generator does it automatically: with the "Line breaks" option set to <br>, any newline inside a pasted cell becomes <br>, so "Line1\nLine2" renders as two lines in one cell on GitHub and most renderers.
Can I merge cells or use rowspan in a markdown table?
Honest answer: pure Markdown has no merge-cells or rowspan syntax — any tool claiming otherwise is misleading you. This generator solves it two ways: switch to the HTML output tab, where you can select cells in the preview and merge them with real colspan/rowspan, then paste the resulting <table> anywhere HTML is allowed (many markdown renderers accept inline HTML). The Markdown tab will warn you that merges only apply to HTML output.
How do I align columns left, center, or right in markdown?
Column alignment lives in the separator row: :--- aligns left, :---: centers, and ---: aligns right. Instead of memorizing that, use the per-column Align dropdowns above the output — the generator writes the correct separator row for every column automatically, and the live preview shows the result.
How do I set column width in a markdown table?
Markdown itself has no column-width syntax — renderers size columns to fit content. What you can control is the source readability: enable "Pad cells" and every cell is padded with spaces so the raw markdown lines up in your editor (this is what the "markdown table generator column width" searchers usually want). For visual width control you need HTML output with inline styles.
Why is my markdown table not rendering?
The four classic causes: (1) no blank line before the table — most parsers require one; (2) a missing or malformed separator row (the | --- | --- | line) — every table needs it; (3) an unescaped pipe | inside a cell, which splits the row — this tool escapes them as \| automatically; (4) inconsistent column counts across rows — the generator normalizes ragged rows by padding short ones. Tables from this generator avoid all four.
How do I escape a pipe character inside a table cell?
Prefix it with a backslash: \|. A raw | inside a cell is interpreted as a column boundary and breaks the row. The generator escapes pipes automatically (toggleable), and also escapes literal backslashes so C:\path survives correctly.
Can I use this on Mac or in VS Code?
Yes — it's a web page, so it works identically on Mac, Windows, and Linux with no install. For VS Code (vscode): generate the table here, paste it into your .md file, and press Ctrl+Shift+V (Cmd+Shift+V on Mac) to preview it in VS Code's built-in markdown preview.
How do I generate markdown tables in Python, JavaScript, R, or Java?
If you need tables programmatically instead of this web UI: Python → the tabulate library — example: print(tabulate(data, headers="firstrow", tablefmt="github")); JavaScript → map rows to '| ' + cells.join(' | ') + ' |' with an alignment row, or paste the snippet from this page's output into CodePen; R → knitr::kable(df, format = "markdown"); Java → build the strings manually or with a small helper — there is no single canonical library. This web tool is for one-off conversions without writing code.
Are markdown tables responsive on mobile?
Not by themselves — wide tables overflow on small screens. The standard fix is wrapping the table in a scrollable container: <div style="overflow-x:auto"> ...table... </div>. If you publish to a site you control, add that wrapper (or equivalent CSS). GitHub and most docs sites already scroll wide tables horizontally.
Can I put equations or math in markdown table cells?
You can put math notation inside cells — e.g. $x^2$ for renderers with MathJax/KaTeX — but no generator converts an equation into a table; that's a misunderstanding of the query. If your equation contains pipes or backslashes, the automatic escaping here keeps the row intact. For heavy math layouts, an HTML table (see the HTML tab) gives you more control.
Is there an API, Chrome extension, or open-source version?
No API and no Chrome extension — deliberately. The tool is a single self-contained web page that runs 100% in your browser, which is why your data never leaves your device. Bookmark it instead of installing anything. The JavaScript is not obfuscated, so you can read exactly what it does in View Source; it is free to use for any purpose.
Is my data sent anywhere?
No. Everything runs 100% in your browser — the page makes zero network requests after loading. Pasting confidential spreadsheet data here is safer than with any server-side converter: nothing is uploaded, stored, or logged. There is no account and no signup.