About the Markdown Table Generator
Markdown tables in README files, documentation and forum posts are tedious to type because every row needs pipes and the separator line needs dashes. This Markdown table generator lets you build the table in an editable grid like a small spreadsheet, or paste CSV and spreadsheet cells, then set the alignment of each column and copy the result. The source is neatly padded, so it stays readable even before it is rendered, which reviewers appreciate.
Already have the data? Paste cells copied from Excel or Google Sheets straight into the grid, or paste CSV, tab-separated text or an existing Markdown table into the import box. Imported Markdown tables keep their column alignment, which makes the tool handy for tidying up and editing the tables in README files and documentation.
Set each column to left, center or right alignment and the separator row is written with the right colons. Pipe characters inside cells are escaped automatically so they cannot break the table. Compact mode removes the padding when you want the shortest possible code, and a live preview shows how the table will look once rendered.
The output follows the GitHub Flavored Markdown table syntax used by GitHub, GitLab, Bitbucket, Obsidian and most documentation generators. To build HTML instead, use the HTML table generator; to convert a CSV file to a web table, the CSV to HTML table converter; and to turn Markdown into HTML, the Markdown to HTML converter.
How to use the Markdown Table Generator
- Fill in the gridType into the cells, and use the buttons to add or remove rows and columns.
- Or import dataPaste CSV, spreadsheet cells or an existing Markdown table and press Import.
- Choose the alignmentPick left, center or right for each column above the grid.
- Copy the MarkdownCopy the code or download it as a .md file, and check the preview.
Markdown Table Generator features
- Editable grid with rows and columns
- Paste cells from Excel or Google Sheets
- Import CSV, TSV or Markdown tables
- Left, center and right column alignment
- Padded or compact output
- Pipe characters escaped automatically
- Live preview of the rendered table
- Copy or download as .md
Common uses
- Writing README files on GitHub and GitLab
- Adding comparison tables to documentation
- Converting spreadsheet data for wikis and notes
- Tidying messy Markdown tables
- Formatting tables for Obsidian and static site generators
Markdown tables in practice: documenting settings in a README, readable diffs, code and line breaks in cells, and platform differences
Tables are the clearest way to document settings, endpoints, commands and comparisons in README files and project documentation. Writing them by hand means counting pipes and dashes, and editing them later is worse. This guide documents a project's environment variables as a worked example, then covers the trade-off between padded and compact tables in version control, what can and cannot go inside a cell, when a table is the wrong choice and how different platforms treat Markdown tables.
A worked example: documenting environment variables
A web project needs a README section explaining its settings. A table with four columns, Name, Required, Default and Description, does the job:
- DATABASE_URL, required, no default, the database connection string.
- PORT, optional, default 3000, the port the server listens on.
- MAIL_FROM, optional, default noreply@example.com, the sender address for emails.
- LOG_LEVEL, optional, default info, how much detail to log.
Typed into the grid, with the Name column holding values in backticks and the Default column centred, the result is a table new developers can scan in seconds. Pairing it with a committed .env.example file containing the same names keeps the documentation and the code in step.
Padded or compact
Padded tables, with every column aligned, are easy to read in the source. Their drawback appears in version control: lengthening one cell widens its column, so every row changes and the diff becomes hard to review. Compact tables avoid that, since only the changed row differs. Teams that review documentation changes often prefer compact tables for files that change frequently and padded ones for stable reference tables.
Code, links and line breaks in cells
Cells can contain inline code, links and emphasis. They cannot contain block content such as lists, code blocks or headings, and pressing Enter ends the row. On GitHub, an HTML <br> tag inside a cell creates a line break when one is genuinely needed. If a cell needs more than a sentence or two, the content probably belongs in a section below the table, with the table linking to it.
Pipes inside code
In GitHub Flavored Markdown, a pipe character inside a cell must be escaped even when it sits inside backticks, because the table is split into cells before code is processed. Commands containing pipes, such as shell pipelines, therefore need a backslash before each pipe. The generator handles this automatically, which is one of the most common reasons hand-written tables break.
When a table is the wrong choice
Tables suit short values compared across the same set of columns. Long explanations, step-by-step instructions and content that differs from row to row work better as headings and lists. Tables wider than six or seven columns are hard to read on phones, where many people now browse repositories, so splitting a wide table into two narrower ones often helps.
Sorting rows
Readers find things faster when rows follow an obvious order: alphabetical for settings and commands, logical order for steps, or importance for feature comparisons. Sort the data before building the table, and keep the order consistent when adding rows later so the table does not slowly become a jumble.
Platform differences
GitHub, GitLab, Bitbucket, Obsidian and most static site generators support the same table syntax. Some tools use their own: Jira's older wiki markup, for example, marks header cells with double pipes. Chat apps often display Markdown tables as plain text. Check how the destination renders tables before pasting a large one into it.
Accessibility
Markdown tables always have a header row, which assistive technology uses to announce each cell's column. Clear, short header names make that announcement useful. Avoid empty header cells and avoid using tables purely for visual layout, which confuses screen readers and serves no documentation purpose.
Keeping tables current
Documentation tables go out of date when code changes and nobody updates them. Placing the table near the code it describes, reviewing it in the same pull request as related code changes, and noting in a contributing guide that settings must be documented, keeps tables trustworthy.
Common mistakes
- Forgetting to escape pipes inside code in cells.
- Padding frequently edited tables, creating noisy diffs.
- Cramming paragraphs or lists into cells.
- Building tables too wide to read on phones.
Related tools
To convert web pages into Markdown, use HTML to Markdown. To sort rows before building a table, try Text Sorter, and to inspect CSV data first, CSV Viewer.
Tables from script output
Benchmark results, test summaries and comparison figures often come from scripts as tab-separated text. Pasting that output straight into the importer turns it into a table for a pull request or report in seconds. Put units in the headers, such as Load time (ms), and keep the same number of decimal places in each column so values are easy to compare.
Highlighting a recommendation
Markdown tables cannot use colour, so use bold text sparingly to mark a recommended option or an important value, such as the setting most users should choose. Highlighting one or two cells draws the eye; highlighting many cancels the effect and makes the table harder to read.
Privacy
Tables are built in your browser. Nothing you type or paste is uploaded or stored.
Frequently asked questions
How do you make a table in Markdown?
Write the header cells between pipes on the first line, then a separator line of dashes such as | --- | --- |, then one line per row. This generator writes all of that for you from the grid, padded so the columns line up.
How do I align columns in a Markdown table?
Colons in the separator row set the alignment: :--- aligns left, :---: centers and ---: aligns right. Choose the alignment for each column above the grid and the generator writes the separator row for you.
Can I paste from Excel or Google Sheets?
Yes. Copy the cells and paste them into any cell of the grid, and they fill the grid from that position, adding rows and columns as needed. You can also paste them into the import box and press Import.
How do I put a pipe character in a cell?
Escape it with a backslash, written as \|. The generator does this automatically for every pipe you type in a cell, so the column structure of the table is not broken when it is rendered.
Can I edit an existing Markdown table?
Yes. Paste the table into the import box and press Import. The cells and the column alignment are loaded into the grid, ready to change, and the output is rewritten with neatly padded columns.
Does every Markdown app support tables?
Tables are part of GitHub Flavored Markdown and are supported by GitHub, GitLab, Bitbucket, Obsidian, most static site generators and many editors. The original Markdown specification had no tables, so a few older tools show them as plain text.
Is my data uploaded?
No. The grid, the import and the Markdown output all run in this page on your own device. Nothing is sent to a server or stored, so it is safe to use with private data.