Markdown Table Generator
Build a table in an editable grid, then export Markdown, HTML, CSV or TSV — or paste TSV/CSV/Markdown and edit it back. Live output, rendered preview, per-column alignment, pipes escaped correctly. Nothing is uploaded.
The first row is the header. Set each column's alignment from the menu above it (Default, Left, Center, Right). Type a pipe | in any cell — it is escaped for you.
Paste a Markdown table, or TSV/CSV from a spreadsheet.
Rendered preview
Runs entirely in your browser — your data never leaves your device. The grid, the generator and the parsers are a small script you can read; there are no network requests for your content.
What this tool does
Fill in the grid on the left and the table appears on the right the moment you type — there is no button to press. Add or remove rows and columns, and set each column to left, center or right alignment from the menu above it. Pick the output you need from the Markdown / HTML / CSV / TSV switch: the same grid serializes to GitHub-Flavored-Markdown, a semantic HTML <table>, or RFC-4180 CSV / tab-separated text. Below it a live HTML preview shows how the finished table actually renders, alignment and all. When it looks right, Copy the active format or Download it (.md, .html, .csv or .tsv).
Four output formats from one grid
The grid is the single source of truth; each output is generated from it on the fly:
- Markdown — GitHub-Flavored-Markdown with the delimiter row and per-column alignment, columns padded so the raw source is readable and diffs cleanly. Pipes and backslashes are escaped (see above).
- HTML — a semantic
<table>with<thead>/<tbody>, alignment applied viastyle="text-align:…". Every cell value is HTML-escaped —<,>and&become<,>and&— with the ampersand escaped first, so a cell containinga < bor a stray<script>is inert text, not markup. - CSV — comma-separated using the RFC 4180 rules: a field that contains a comma, a double-quote or a line break is wrapped in quotes, and inner quotes are doubled (
""), soShe said "hi", loudlyexports as one field and re-imports intact. - TSV — tab-separated, which is exactly what Excel and Google Sheets read from the clipboard, so a copied cell block pastes straight into a spreadsheet.
Honest delimiter detection when you paste
On import the tool counts commas and tabs (ignoring anything inside quoted fields) and picks whichever is more frequent. When the two counts are equal and both actually appear, there is no correct guess — so instead of silently choosing, it imports as CSV and tells you it was ambiguous, so you can fix the source rather than discover a mangled table later. TSV normally wins whenever tabs outnumber commas, matching a spreadsheet paste.
The one bug this tool exists to prevent: escaping pipes
A Markdown table uses the pipe character | to separate columns, so a pipe inside a cell — a bitwise-OR in a code snippet, a "yes | no" note, a file path with | — will silently split that cell in two and wreck the whole row. The fix is to escape it as \|, and to escape a literal backslash as \\. The subtle part is the order: you must escape the backslash first, otherwise the backslash added by \| gets doubled and you end up with \\|. This tool always escapes backslash-then-pipe, so:
| You type | It generates |
|---|---|
a|b | a\|b |
C:\path | C:\\path |
\| | \\\| |
Reading a table back in reverses this exactly, so a\|b becomes the literal cell a|b again — a genuine round-trip, not a lossy one.
Worked example
A three-column grid with the header Name, Score, City, left / right / center aligned, and two data rows, generates exactly this — columns are padded so the raw Markdown is readable and diffs cleanly:
| Name | Score | City |
| :---- | ----: | :----: |
| Ada | 95 | London |
| Grace | 82 | Berlin |
Notice the delimiter row (line 2): :--- means left, ---: means right, and :--: means center. A bare --- with no colons means "renderer default", which most renderers show as left — this tool keeps that distinction so a Default column is not silently rewritten as an explicit Left when you re-import the table.
Pasting from Excel, Google Sheets, or an existing table
Open the Paste to import tab and paste. The importer auto-detects the format:
- TSV — copying cells out of Excel or Google Sheets puts tab-separated text on your clipboard, so a plain paste just works.
- CSV — comma-separated files are parsed with the RFC 4180 rules: a quoted field such as
"Smith, John"stays one cell despite the comma, and a doubled""inside a quoted field un-escapes to a single quote. - Markdown — paste a table you already have and it is parsed back into editable cells, alignment included, so you can tweak a value and regenerate.
If an imported row has fewer cells than the widest row, it is padded with empty cells and the import note tells you how many rows were padded — Markdown tables must be rectangular, so this is done openly rather than by dropping data.
Honest limits
GitHub-Flavored-Markdown tables are deliberately simple, and this tool does not pretend otherwise. There are no merged/spanning cells (colspan/rowspan) — GFM has no syntax for them. A cell cannot contain a real line break; if you paste multi-line content, the newline is folded to a <br> so the row stays valid. Basic inline Markdown inside a cell (like **bold** or a `code` span) is passed through as text and will render wherever your Markdown renderer supports it, but block content — lists, headings, code fences — cannot live inside a table cell. For anything richer than a rectangular grid, you need real HTML.
Common mistakes
- Unescaped pipes. The classic broken row. Let the tool escape them instead of typing
|into raw Markdown by hand. - Missing the delimiter row. A GFM table is invalid without the second
---line; the generator always emits it. - Ragged columns. Rows with different cell counts render as a broken table — import padding fixes this, but check the padded blanks are what you meant.
- Expecting alignment everywhere. Some Markdown renderers ignore column alignment entirely; the colons are still valid, they just may not visibly align.