Markdown Table Generator: Build GFM Tables from a Grid or CSV
Type into the grid or import CSV, TSV, spreadsheet cells, or an existing Markdown table. Set column alignment, reorder rows and columns, sort or transpose, then copy GitHub Flavored Markdown with escaped pipes and padding that counts CJK and emoji as double width. Everything runs in your browser.
Import data
Import replaces the grid (Undo restores it). Press Ctrl+Enter in this box to import.
Table grid
The first row is the header. Tab/Shift+Tab move across, Enter/Shift+Enter move down/up, arrow keys leave a cell at the edge of its text, Alt+Enter adds a line break inside a cell. Pasting several spreadsheet cells fills the grid from the current cell. Row and column buttons act on the current cell.
Markdown output
GFM cells are single-line. With <br> on, a line break inside a cell is written as <br>, which GitHub renders as a break (and import reads back as a line break). With it off, line breaks become spaces. Pipes are always escaped as \|.
Preview
Built by parsing the generated Markdown back into a table, so it shows what a GFM renderer receives. Inline Markdown such as **bold** or links is shown as source text.
Diagnostics
How it works and limits
- Output format. Pipe tables follow the GitHub Flavored Markdown spec: one header row, a delimiter row (
---none,:---left,:---:center,---:right, always at least three hyphens), then body rows. Pretty mode pads every cell to the widest cell in its column; compact mode adds no padding. A column narrower than its delimiter (for example a one-letter column) keeps the shorter cells, so its delimiter sticks out slightly. For example, CSVa,b/1,2becomes| a | b |,| --- | --- |,| 1 | 2 |. - Display width. Padding uses an approximation of Unicode East Asian Width: CJK ideographs, kana, Hangul, fullwidth forms, and emoji count as 2 columns, combining marks and zero-width characters as 0, everything else (including East Asian “ambiguous” characters) as 1. Columns line up in monospaced editors that follow the same rules; some fonts still differ.
- Escaping. Every
|inside a cell is written as\|and read back as|. Other backslashes and inline Markdown are passed through unchanged, because cell text is Markdown source. - Without edge pipes. GFM lets rows omit the leading and trailing pipe, but a row then becomes ambiguous if its first or last cell is empty, the table has one column, or the first cell looks like a list, quote, or heading. Those rows keep both pipes so the table still parses; Diagnostics says how many.
- Import. CSV and TSV follow RFC 4180 quoting (quoted fields may contain delimiters, doubled quotes, and line breaks), which is what Excel and Google Sheets put on the clipboard. Markdown import finds the first header row followed by a delimiter row, reads alignment colons and escaped pipes, and stops at the first blank line. Rows whose cell count differs from the header are reported by line number; tick “Pad ragged rows” to fill missing cells with blanks (extra cells become new columns).
- Whitespace. Markdown trims spaces at the start and end of each cell. Diagnostics flags affected cells; Trim whitespace cleans them in the grid.
- Undo. Undo reverses grid actions, alignment changes, imports, pastes, sorting, and clearing (up to 40 steps). It does not undo individual keystrokes inside a cell; use the browser’s own undo while editing.
- Limits. The grid is capped at 200 rows (header included) and 50 columns to stay responsive. Larger imports are cut to that size with a warning. Merged cells, multi-row headers, and formatting from spreadsheets are not supported by GFM tables.
- Privacy. Parsing, generation, and downloads happen on this page. Nothing is uploaded or saved; reloading the page discards the table. CSV downloads are UTF-8 with a byte-order mark so spreadsheet apps read non-Latin text correctly.