Markdown Table Generator

Build markdown tables visually with a spreadsheet-like editor. Add rows and columns, set alignment, import CSV, and copy the generated markdown.

This Markdown Table Generator builds pipe-delimited GFM tables from a spreadsheet-style editor, with left, centre, or right alignment on each column and one-click CSV or TSV import. Tables follow the GitHub Flavored Markdown (GFM) spec, which is formally described in the CommonMark-based GFM specification maintained by GitHub, and render on GitHub, GitLab, Obsidian, Notion, Reddit, VS Code, and every static site generator that uses a CommonMark parser.

Ad
Ad

About Markdown Table Generator

Markdown Table Syntax

A markdown table is three things: a header row, a separator row of dashes with optional colons for alignment, and one or more body rows, all delimited by pipe (|) characters. The GFM specification requires the separator row to contain at least one dash per column and allows a leading or trailing pipe on each line.

AlignmentSeparator SyntaxExample
Left (default):---| Left |
Centre:---:| Centre |
Right---:| Right |

A basic two-column table looks like this: the header row has pipe-separated values, followed by a separator row (| --- | --- |), followed by data rows. The visual editor handles all this formatting automatically.

Where Markdown Tables Work

PlatformTable SupportNotes
GitHub (README, issues, PRs, wikis)FullThe most common use case for markdown tables
GitLabFullSame syntax as GitHub
NotionFullAlso converts pasted markdown tables to native tables
ObsidianFullRenders in preview mode, raw syntax in edit mode
VS Code previewFullBuilt into the markdown preview panel
SlackNoSlack does not render markdown tables - use code blocks instead
DiscordNoSame as Slack - wrap in triple backticks for monospace alignment
RedditFullSupported in new Reddit and most apps
Jekyll / Hugo / AstroFullStatic site generators render markdown tables as HTML

Import from CSV or Spreadsheets

Click Import CSV and paste comma-separated or tab-separated data. The first row becomes headers and the rest become body rows. This handles the most common workflow: you have data in Excel, Google Sheets, or a database export and need to include it in documentation.

SourceHow to Get Tab-Separated Data
Google SheetsSelect cells, Ctrl/Cmd+C - clipboard contains TSV
ExcelSelect cells, Ctrl/Cmd+C - clipboard contains TSV
CSV fileOpen in text editor, copy the contents
Database queryExport as CSV or copy from results grid

For viewing and exploring CSV files before converting them, the CSV Viewer renders them as sortable, filterable tables.

Formatting Best Practices

PracticeWhy
Align pipes vertically in sourceMakes the raw markdown readable in diffs and code reviews - this tool does it automatically
Keep tables under 5-6 columnsWide tables overflow on mobile and become hard to scan
Use right-align for numbersDecimal points line up, making columns scannable
Keep header text shortLong headers create very wide columns
Escape pipes in cell contentUse \| if your cell content contains a literal pipe character
No merged cellsMarkdown tables do not support colspan or rowspan - use HTML if needed

Markdown Tables vs HTML Tables

FeatureMarkdown TableHTML Table
Syntax complexitySimple - pipes and dashesVerbose - requires thead, tbody, tr, th, td tags
Merged cellsNot supportedcolspan and rowspan
Nested contentLimited - inline formatting onlyAny HTML element
StylingPlatform default onlyFull CSS control
Readability in sourceExcellent - readable as plain textPoor - hard to read raw markup
GitHub renderingClean, consistentRendered but some CSS restrictions

Use markdown tables when the data is simple (text, numbers, short strings) and will be read on platforms that support markdown. Switch to HTML when you need merged cells, complex formatting, or nested elements.

Special Characters in Cells

CharacterProblemSolution
| (pipe)Interpreted as column separatorEscape as \|
NewlineBreaks the table rowUse <br> for line breaks within cells
Leading/trailing spacesTrimmed by most renderersUse &nbsp; if whitespace is meaningful
BackticksMay conflict with inline codeUse HTML <code> tags instead

Worked Example: Converting a Spreadsheet to Markdown

Say you have this data in Google Sheets and want to drop it into a GitHub README:

NameRoleCommits
AliceLead412
BobBackend287
ChloeFrontend195

Select the three rows in Sheets, press Ctrl/Cmd+C, click Import CSV here, and paste. The clipboard arrives as TSV (tab-separated), which the parser detects automatically. Set the Commits column to right-align so the numbers line up. The output will read:

| Name  | Role     | Commits |
| :---- | :------- | ------: |
| Alice | Lead     |     412 |
| Bob   | Backend  |     287 |
| Chloe | Frontend |     195 |

Paste that into any .md file in a GitHub repo and it renders as a styled HTML table on github.com. The same markdown also renders in GitLab, Bitbucket, Gitea, Codeberg, and the built-in VS Code markdown preview.

How Popular Is Markdown for Documentation?

Markdown is now the default writing format for developer documentation. The Stack Overflow 2024 Developer Survey found that roughly 70% of professional developers work with Markdown at least occasionally, second only to HTML and CSS among markup languages. GitHub hosts well over 420 million public repositories as of 2025, with a README.md file expected in almost every one - that is the single largest use case for markdown tables in the world.

Use CaseTypical Table NeedNotes
Open-source READMEFeature matrix, supported platforms, CLI optionsGitHub renders GFM tables by default
API documentationEndpoints, parameters, response fieldsOften generated but sometimes hand-written
Changelog / release notesBreaking changes, migration stepsKeep headers short so mobile users can scan
Pull request descriptionsBefore/after benchmarks, checklist statusGitHub PR body supports full GFM
Technical blog (Jekyll, Hugo, Astro)Comparison tables, benchmark dataTables are rendered by the site generator
Internal wikis (Notion, Obsidian)Decision records, team rostersNotion converts pasted markdown to native tables automatically

GFM vs CommonMark: Why Tables Are Extension Syntax

Tables are not part of the original CommonMark specification. CommonMark, the spec that defines core Markdown, intentionally left tables out because early Markdown from John Gruber did not define them. GitHub Flavored Markdown added tables as an extension in 2014, and most renderers now support them: python-markdown with the tables extension, markdown-it with the markdown-it-table plugin, remark-gfm, pandoc with pipe_tables, and MultiMarkdown.

The practical consequence is that a pipe-delimited table might render on GitHub but not in a minimal CommonMark-only renderer. Almost every modern tool ships with GFM support or a table plugin enabled, so this rarely bites in practice, but it is worth knowing when you write for less common platforms. If you need true portability, the HTML Prettifier can format an equivalent HTML table that works everywhere.

Why Alignment Colons Matter

The colon placement in the separator row is the only way to control alignment in a GFM table. Left is the default, centre uses colons on both sides of the dashes, and right uses a colon only at the end. Without colons, numbers in the body render left-aligned, which makes columns of financial data, benchmarks, or counts much harder to read.

Column TypeRecommended AlignmentReason
Labels, names, categoriesLeftLeft-aligned text is easier to scan top-to-bottom
Numbers, counts, percentagesRightDecimal points and digit places line up vertically
Status badges, short codesCentreCentre-aligned tokens look balanced in a narrow column
Mixed content (e.g. "N/A" and "12")RightKeeps numeric cells aligned; text cells still read fine

Keyboard Workflow Tips

The fastest way to fill a table is to start with Import CSV. Copy a block of cells from any spreadsheet application, paste, and the headers and rows populate in one step. From there, Tab moves between cells left-to-right, Shift+Tab moves back, and the alignment button above each column cycles through left, centre, and right. When you are done, the Copy Markdown button writes the full output to your clipboard - no need to select the text manually. If a table grows past five or six columns, consider splitting it into two smaller tables on mobile; GitHub wraps wide tables in a horizontal scroll container, but most readers will miss the overflow and only see the first few columns.

Common Mistakes

MistakeWhat HappensFix
Missing separator rowThe table renders as one row of pipe-separated plain textThe separator row is mandatory, even for single-row tables
Fewer separator cells than header cellsSome parsers render only the matching columns, others ignore the table entirelyMatch the separator cell count exactly
Unescaped pipe in a cellA literal | inside data splits the cell into two columnsEscape as \| or replace with the HTML entity &#124;
Multi-line cell contentA newline inside a cell breaks the rowUse <br> for soft line breaks within a cell
Trying to merge cellsMarkdown tables do not support colspan or rowspanFall back to an HTML table when merged cells are essential
Tables wider than ~6 columnsMobile renderers either add horizontal scroll or truncateSplit into two narrower tables or use a description list

To preview how your generated table renders, paste it into the Markdown Preview tool. For converting between JSON and CSV data formats, the JSON to CSV Converter handles structured data. All processing runs locally in your browser.

Sources

Frequently Asked Questions

How do I set column alignment?

Click the alignment button above each column header. It cycles through left, center, and right. The alignment is reflected in the markdown separator row using colons.

Can I import data from a spreadsheet?

Yes. Click Import CSV and paste comma-separated or tab-separated data. The first row becomes headers and the rest become body rows. Tab-separated data from spreadsheets works too.

Does it support GitHub-flavoured markdown?

Yes. The output uses pipe-delimited table syntax which is supported by GitHub, GitLab, Notion, and most markdown renderers. The alignment syntax with colons in the separator row is part of the same standard.

Can I remove rows or columns?

Click the x button next to any row to remove it, or the x button at the end of the header row to remove the last column. The table must keep at least one row and one column.

Link to this tool

Copy this HTML to link to this tool from your website or blog.

<a href="https://toolboxkit.io/tools/markdown-table-generator/" title="Markdown Table Generator - Free Online Tool">Try Markdown Table Generator on ToolboxKit.io</a>