A Markdown table generator for real data
Typing Markdown tables by hand means counting pipes and dashes and fixing them every time a value changes. This Markdown table generator writes the table for you from data you already have: a CSV file, a range copied from Excel or Google Sheets, or a JSON array. The output is a pipe table in the GitHub Flavored Markdown style, which GitHub, GitLab, many wikis and most static site generators render.
Example
Documenting command-line flags from a CSV:
Command,Description,Default
--port,"Port to listen on",8080
--mode,"dev | prod",dev
--banner,"Line one
Line two",
With the defaults (left alignment, padded columns):
| Command | Description | Default |
| :------- | :------------------- | :------ |
| --port | Port to listen on | 8080 |
| --mode | dev \| prod | dev |
| --banner | Line one<br>Line two | |
Two cells needed special handling. The pipe in dev | prod was escaped as \|, otherwise it would start a new column. The line break in the banner cell became <br>, because a Markdown table row must stay on one line.
Alignment options
Alignment is set with colons in the separator row under the header:
| Option | Separator | Effect |
|---|---|---|
| Left | :--- | Text aligned left (default) |
| Center | :---: | Centered columns |
| Right | ---: | Right aligned, useful for numbers |
| Default | --- | No colons; the renderer decides |
The choice applies to every column. If only one column should be right-aligned, generate the table and move the colon in that column's separator by hand.
Pad columns or keep it compact
With Pad columns on, every cell is padded with spaces so the pipes line up and the table is readable in plain text, in a code review or in a terminal. Turn it off for the smallest output; here combined with Right alignment:
| Command | Description | Default |
| ---: | ---: | ---: |
| --port | Port to listen on | 8080 |
Both versions render identically. Padded tables produce larger diffs when one long value changes, so some teams prefer compact tables in frequently edited files. Padding counts characters, so emoji or CJK text may look slightly misaligned in a monospace editor, but the rendered result is unaffected.
Input formats
- CSV with any common delimiter, including quoted values with commas and line breaks.
- Spreadsheet cells pasted from Excel, Google Sheets or LibreOffice, which arrive as tab-separated text.
- JSON arrays of objects. Nested objects become dotted column names such as
owner.team. - Markdown tables, which is a quick way to re-pad or re-align a table someone else wrote.
Untick First row is header when your data has no header; the generator adds Column 1, Column 2 and keeps every row as data, because Markdown tables always need a header row.
Where generated tables help most
- README files – feature matrices, supported versions, environment variables and configuration flags, kept in a sheet and regenerated when they change.
- Issues and pull requests – benchmark results or query output. Many database clients copy a result grid as tab-separated text, which pastes straight in here.
- Documentation sites – static site generators that render Markdown, where a table from a CSV is easier to maintain than hand-written HTML.
- Tidying existing tables – paste a ragged table someone typed by hand and get it back with aligned pipes.
Things to watch for
- Numbers are normalized, so
4.20becomes4.2. If you need fixed decimals, provide the data as JSON strings, for example{"v": "4.20"}, which are copied as-is. - Cell formatting such as bold or links is not added, but Markdown already inside a cell, like
**new**, is passed through and will render. - Pipe tables are an extension to Markdown. Renderers that follow only the original syntax show them as plain text.
To preview the rendered table, paste it into the Markdown viewer. For the opposite direction, HTML to Markdown converts an HTML table, and the LaTeX table generator produces the same data for papers and reports.
Privacy
The table is generated locally by your browser; your data is not uploaded. Using Load URL or Save & Share involves our server, by design.