The problem: Markdown tables are text, and text is hard to align by hand
A Markdown table is a block of pipe-delimited text. Pipes (|) separate columns. A row of hyphens separates the header from the data. That is the entire syntax. Here is a three-column, two-row table:
| Name | Age | Role |
| ---- | --- | ---- |
| Ana | 34 | Engineer |
| Ben | 28 | Designer |
Rendering engines parse this into an HTML <table>. The pipes become cell boundaries, the hyphen row becomes the <thead>, and everything below becomes <tbody> rows. The result looks like a normal table in any Markdown viewer — GitHub, GitLab, Notion, Obsidian, VS Code preview.
The problem is writing them. If you have 12 columns and 40 rows, you are typing 480 pipe characters and trying to keep them vertically aligned in your text editor. One missed pipe shifts every cell after it. One row with fewer columns than the header breaks the alignment. One cell containing a pipe character (common in technical documentation — ls | grep) splits the cell in two unless you escape it. Markdown tables are readable in rendered form and painful in source form.
The Markdown Table Generator solves this with a visual grid editor. You type into cells, add and remove rows and columns, set alignment, and the tool generates the pipe-delimited text. It also imports CSV, JSON, HTML, and existing Markdown tables, exports to eight formats, and includes templates for common table types (pricing, comparison, changelog, API reference).
Fastest path
Open the Markdown Table Generator, click any cell in the grid, and start typing. Add rows with the plus button below the table, add columns with the plus button to the right. Set alignment by clicking the alignment icon in each column header (left, center, right). The Markdown output updates live in the panel below the grid. Click Copy to copy the pipe-delimited text, or switch to the Export tab for HTML, CSV, JSON, RST, AsciiDoc, or LaTeX. To import existing data, go to the Import tab and paste CSV, JSON, HTML, or Markdown — or upload a file.
The syntax: pipes, hyphens, and colons
GitHub-Flavored Markdown (GFM) added table syntax in 2017. The original Markdown specification, written by John Gruber in 2004, had no table syntax at all — you wrote raw HTML <table> tags if you needed a table. GFM adopted the pipe table syntax from PHP Markdown Extra, which had introduced it in 2004. The syntax is now supported by nearly every Markdown renderer: GitHub, GitLab, Bitbucket, Obsidian, Notion, VS Code, Pandoc, MkDocs, Hugo, Jekyll, and most static site generators.
The grammar is three parts:
1. Header row. Pipe-delimited cells. Leading and trailing pipes are optional but recommended (they make the source easier to read and some parsers require them).
| Name | Role | Team |
2. Separator row. One hyphen per column (minimum three characters for GFM compliance, though most parsers accept one). Colons in the separator row control alignment:
| :--- | :--: | ---: |
:---— left-aligned (default if no colons):---:— center-aligned---:— right-aligned
If you omit colons entirely (---), every column defaults to left alignment. The tool's alignment icons set these colons — click left, center, or right in any column header and the separator row updates.
3. Data rows. Pipe-delimited cells matching the header's column count.
| Ana | Engineer | Platform |
| Ben | Designer | Brand |
If a data row has fewer cells than the header, GFM renders the missing cells as empty. If it has more, the extra cells are dropped. The tool prevents this by keeping all rows the same length — adding a cell to one row adds it to all rows.
Column padding: cosmetic in source, invisible in output
You can pad columns with spaces so the pipes line up in the source:
| Name | Age | Role |
| :---- | --: | :------- |
| Ana | 34 | Engineer |
| Ben | 28 | Designer |
This is easier to read in a text editor, but the rendered HTML is identical to the unpadded version. GitHub's renderer, like all GFM renderers, strips whitespace and renders the table based on pipe positions and alignment colons, not on spacing. Padding is for humans reading the raw file, not for the parser.
The tool has an auto-format toggle that pads columns to equal width automatically. It measures the longest cell in each column and pads every cell to that width. The padded output is what you copy — it looks clean in a text editor and renders identically to the unpadded version. If you are pasting into a system that strips whitespace (some wikis, some CMS editors), turn auto-format off and get the compact version with no padding.
Inline formatting inside cells
Cells can contain inline Markdown formatting. The tool supports four types:
- Bold:
**text**renders as text - Italic:
*text*renders as text - Code:
`text`renders astext - Links:
[text](url)renders as a hyperlink
These work because GFM processes inline formatting within table cells the same way it processes it in paragraphs. Block-level formatting does not work — you cannot put headings (# Heading), blockquotes (> quote), code blocks (triple backticks), or lists (- item) inside a table cell. The pipe parser treats newlines as row terminators, so any block syntax that requires multiple lines fails. If you need a code block inside a table, use inline code (single backticks) for short snippets. For multi-line content, you need a different format entirely — AsciiDoc tables support block content, or use a definition list instead of a table.
The tool's cell formatting buttons apply these inline styles. Select text in a cell and click Bold, Italic, Code, or Link to wrap the selection. The raw Markdown (**bold**) appears in the cell editor and renders as formatted text in the preview.
Escaping pipe characters inside cells
A pipe character inside a cell terminates the cell. If your cell content is ls | grep foo, the renderer sees two cells: ls and grep foo. To include a literal pipe, escape it with a backslash: ls \| grep foo. The backslash tells the parser "this pipe is content, not a delimiter." The rendered output shows ls | grep foo without the backslash.
This is the most common source of broken tables in technical documentation. Command-line examples, shell pipelines, and regex alternation (a|b) all contain pipes. The tool's cell editor handles this automatically — when you type a pipe into a cell, it stores the literal character and escapes it in the generated Markdown output. You see ls | grep foo in the grid; the exported Markdown contains ls \| grep foo.
Import: what survives and what does not
The tool imports five formats: CSV, TSV, JSON, HTML, and Markdown. Each has different fidelity:
CSV/TSV maps cleanly — one row per line, one cell per comma (or tab). Quoted fields with embedded commas, quotes, and newlines are parsed correctly (the tool's CSV parser handles RFC 4180 quoting). CSV does not carry alignment or formatting information, so all columns default to left alignment after import.
JSON is imported as an array of objects. Each object's keys become header cells, and each object's values become data cells. If objects have different keys, the tool unions all keys into the header row and fills missing values with empty strings. JSON preserves no alignment or formatting — just the data.
HTML tables are parsed with a DOMParser. <th> elements become header cells, <td> elements become data cells. The tool extracts text content, stripping HTML tags — so a cell containing <strong>Bold</strong> becomes **Bold** (the tool converts common HTML tags to their Markdown equivalents). colspan and rowspan attributes are not supported — merged cells are split into individual cells, with the merged content placed in the first cell and empty strings in the others.
Markdown tables are parsed by splitting on pipes and detecting alignment from the separator row. This is a round-trip — import a Markdown table, edit it in the grid, export it back. The parser is tolerant of missing pipes, inconsistent spacing, and rows with mismatched column counts.
Export: when Markdown is not enough
The tool exports to eight formats. Markdown is the default, but sometimes you need a different target:
HTML gives you a <table> with inline alignment styles (text-align: left/center/right). Use this when pasting into a CMS that does not support Markdown or when you need CSS control over the table styling.
CSV/TSV strips all formatting and alignment — pure data for spreadsheet import or data processing. CSV is the lingua franca of tabular data. Every spreadsheet application, database import tool, and data pipeline reads CSV.
JSON exports as an array of objects, using the header row as keys. This is useful when the table data needs to be consumed by JavaScript code or an API.
RST (reStructuredText) is the table format used in Python documentation (Sphinx, docutils). RST grid tables use +---+---+ borders and are even harder to write by hand than Markdown tables. If you are contributing to Python's official documentation or a Sphinx-based project, you need RST, not Markdown.
AsciiDoc is used by many enterprise documentation systems (O'Reilly, Springer, some Red Hat docs). AsciiDoc tables use |=== delimiters and support richer formatting than Markdown tables — block content, cell spans, header repetition. Export to AsciiDoc when your target system is AsciiDoc-based.
LaTeX exports a tabular environment with l, c, r alignment specifiers. Special characters are escaped (% becomes \%, & becomes \&, _ becomes \_). Use this when writing papers or reports in LaTeX — the exported code drops directly into a \begin{table} block.
Auto-detect alignment for numeric columns
The tool has an auto-detect feature that scans each column and sets right alignment if 70 percent or more of the cells contain numbers. This matches the convention in financial and scientific tables — numbers are right-aligned so decimal places line up, making magnitude comparison easier. Text columns stay left-aligned. Mixed columns (numbers and text) stay left-aligned because right-aligning text makes it harder to scan.
The 70 percent threshold prevents false positives. A column of product names where one entry is "Model 3000" would not trigger right alignment — the presence of one numeric-looking string in ten text cells is not enough. But a column of prices ($12.99, $8.50, $15.00) triggers right alignment because every cell is numeric. You can override the auto-detected alignment manually for any column.
Gotchas
- Block formatting does not work inside cells. Headings, blockquotes, code blocks, and lists require multiple lines, but table cells are single-line — the pipe parser treats newlines as row terminators. If you need multi-line content in a table cell, Markdown is the wrong format. Use AsciiDoc (which supports block content in cells) or switch to a definition list. The tool does not warn you about this — it accepts any text in a cell, but block syntax will render as literal text, not as formatted content.
- Cells with pipe characters must be escaped.
ls | grepin a cell creates two cells unless you escape the pipe as\|. The tool handles this in its export, but if you are writing Markdown by hand or importing from a source that did not escape pipes, the table will break. The Markdown import parser is pipe-based and will split unescaped pipes into extra columns. - GFM tables require a header row. Unlike HTML tables, which can have a
<tbody>without a<thead>, GFM tables must have a header row followed by a separator row. If you want a table with no headers, the convention is to leave the header cells blank — the separator row is still required. The tool always includes a header row (it can be empty) because without it, the output is not valid GFM. - Column count is determined by the header row. If a data row has more cells than the header, the extra cells are silently dropped by most renderers. If it has fewer, the missing cells are rendered as empty. The tool enforces uniform column count by adding or removing cells across all rows simultaneously, so you cannot create a mismatched table in the grid editor. But if you import a malformed Markdown table, rows with mismatched column counts are padded or truncated to match the header.
- CSV import does not preserve formatting or alignment. CSV is pure data — no bold, no italic, no alignment metadata. When you import a CSV, every column defaults to left alignment and all cell content is plain text. If your CSV contains Markdown formatting (like
**bold**), it will be rendered as literal**bold**in the grid but will render as bold in the Markdown output — the tool does not strip or interpret formatting from imported CSV.
Summary
- Markdown tables use pipe-delimited syntax: pipes separate columns, a hyphen row separates headers from data, and colons in the hyphen row control alignment (
:---left,:---:center,---:right). Column padding in the source is cosmetic — the rendered output is identical whether columns are padded or compact. - Inline formatting (bold, italic, code, links) works inside cells. Block formatting (headings, code blocks, lists, blockquotes) does not — table cells are single-line. Pipe characters inside cells must be escaped with backslash (
\|) or they split the cell. - The tool imports CSV, TSV, JSON, HTML, and Markdown, each with different fidelity — CSV is pure data with no alignment, HTML strips tags and loses cell spans, Markdown round-trips cleanly. It exports to eight formats: Markdown, HTML, CSV, TSV, JSON, RST, AsciiDoc, and LaTeX, covering documentation systems that do not accept Markdown.
- Auto-detect alignment sets right alignment for columns where 70 percent or more of cells are numeric, matching the convention for financial and scientific tables. Ten templates cover common table types (pricing, comparison, changelog, API reference, feature matrix). Undo/redo tracks 100 history entries.
- Use the Markdown Table Generator for visual table editing, the CSV to Markdown Converter for one-way CSV conversion, the Markdown Preview to render Markdown in the browser, and the Markdown to HTML Converter when you need HTML output from any Markdown.