What is Markdown Table Generator?
Build Markdown tables visually — paste from Excel/Google Sheets, set per-column alignment, and copy clean GFM output for GitHub, Notion & Discord.
MD Table runs entirely in your browser using JavaScript (browser). Your data never leaves your device.
Free Markdown Table Generator
Build and edit Markdown tables visually without memorizing syntax. Add and remove rows and columns with buttons. Set per-column alignment to left, center, or right — the tool outputs the correct :---, :---:, or ---: Markdown syntax automatically. Paste directly from Excel or Google Sheets (tab-separated) or from a CSV file and it auto-parses into the grid editor. Preview the Markdown output live alongside the editor. Choose compact mode for minimal syntax or pretty-print mode for aligned column spacing. Copy the GitHub Flavored Markdown (GFM) output with one click.
▶Paste from Excel / Google Sheets / CSV
Paste your Excel/Sheets selection or CSV below. First row becomes the header. Tab-separated or comma-separated is auto-detected.
Markdown Output (GFM)
| Column 1 | Column 2 | Column 3 | | :--- | :--- | :--- | | | | | | | | | | | | |
Preview
| Column 1 | Column 2 | Column 3 |
|---|---|---|
Frequently Asked Questions
What is Markdown?+
Markdown is a lightweight text formatting language that uses plain-text symbols to add formatting that renders as HTML. Created by John Gruber in 2004, it is used everywhere developers and writers need formatted text without a rich-text editor: README files, documentation, blog posts, GitHub comments, Discord messages, and more. The core idea: format text with asterisks for bold, hyphens for lists, and hash symbols for headings, then render it anywhere.
What is GitHub Flavored Markdown (GFM) and what does it add for tables?+
GitHub Flavored Markdown (GFM) is a superset of standard Markdown created by GitHub. It adds several features not in the original spec, including tables, strikethrough (~~text~~), task lists (- [x]), and syntax-highlighted code fences. GFM table syntax uses pipe characters (|) to separate columns, three or more hyphens (---) for the header separator row, and optional colons to specify alignment. GFM is now supported by most Markdown renderers including GitHub, GitLab, Reddit, Discord, Notion, and Obsidian.
How does Markdown table alignment work?+
Column alignment in Markdown tables is set in the separator row (the row of hyphens under the header). Left-align: :--- or --- (default). Center-align: :---: Right-align: ---: For example, | Left | Center | Right | followed by | :--- | :---: | ---: | produces a table with the first column left-aligned, the second centered, and the third right-aligned. This tool sets alignment per column via toggle buttons and generates the correct syntax automatically.
How do I paste from Excel or Google Sheets?+
Select a range of cells in Excel or Google Sheets and copy them (Ctrl+C). When you paste into the "Paste from Excel/Sheets" area of this tool, the tab-separated values are automatically parsed into the table grid, with the first row used as column headers. For Google Sheets exports or CSV files, the tool also accepts comma-separated values by detecting whether the pasted content uses tabs or commas as delimiters.
How do I include a pipe character (|) inside a table cell?+
Pipe characters inside table cells must be escaped with a backslash: write \| to display a literal | in a cell. Without escaping, the pipe is interpreted as a column separator and breaks the table structure. This is one of the most common Markdown table mistakes. This tool automatically escapes pipe characters when you type them into the visual editor.
What is the difference between pretty-print and compact mode?+
Compact mode outputs the minimal valid Markdown syntax — cells are not padded, making the source code shorter but harder to read. Pretty-print mode adds spaces to pad each cell to the same width as the widest value in the column, making the source code look like an aligned table even before rendering. Both modes render identically in any Markdown parser. Use compact mode for content you will not read in raw form; use pretty-print when the Markdown source itself needs to be readable (e.g., in a README or documentation file).
Where do Markdown tables work?+
GFM-style Markdown tables work in: GitHub (README files, issues, pull requests, wikis), GitLab, Bitbucket, Reddit (in posts and comments), Discord (table syntax renders in most channels), Notion (import or paste), Obsidian, Typora, Bear, and most documentation platforms (Docusaurus, GitBook, MkDocs). Tables do NOT render in standard CommonMark parsers without the GFM extension enabled, and they do not work in basic email clients. Always test in your specific target platform.
You might also like
Browse all 7 Writing & Content tools →Markdown Editor
Write Markdown with a live split-pane preview — download .md or copy HTML
CSV to JSON Converter
Convert CSV files to clean JSON instantly — free, private, no upload
Case Converter
Convert text between uppercase, lowercase, title case, and more
Markdown Tables: Syntax, Alignment, and Best Practices
Markdown tables are one of the most useful additions in GitHub Flavored Markdown, but they are also one of the most annoying to write by hand. The pipe-and-hyphen syntax is readable once rendered but tedious to construct — especially for tables with many columns or cells that need alignment. This generator eliminates the manual work: build the table visually, paste data from a spreadsheet, and copy clean GFM output in seconds.
GFM table syntax explained
A GitHub Flavored Markdown table consists of three parts. The header row: cells separated by pipe characters (|), with an optional leading and trailing pipe. The separator row: three or more hyphens per column, with optional colons for alignment. Data rows: same pipe-separated format as the header. Colons in the separator row set alignment: :--- for left, :---: for center, ---: for right. The column widths in the separator row can be any number of hyphens (minimum 3) — extra hyphens are ignored by parsers but improve readability in pretty-print mode.
Pasting from Excel and Google Sheets
When you select a range of cells in Excel or Google Sheets and copy them to the clipboard, the data is placed as tab-separated values (TSV). This tool's paste feature detects this format and parses it automatically — the first row becomes the column headers, and subsequent rows become data rows. For CSV files (comma-separated), the parser automatically detects the delimiter. One gotcha: cells containing commas in a CSV file are typically wrapped in quotes — the parser handles standard quoted CSV correctly, but unusually formatted exports may need manual cleanup.
Where Markdown tables render correctly
GFM tables are supported in: GitHub (all contexts — README files, issues, pull requests, discussions, wikis), GitLab, Bitbucket, Discord, Reddit (in posts and new comment editor), Notion (via Markdown import or paste), Obsidian, Typora, Bear, Zettlr, most documentation platforms (Docusaurus, MkDocs, GitBook, Mintlify), and Slack (partial — pipe-separated text renders as a monospaced block, not a visual table). Tables do not render in standard email clients, plain CommonMark without the GFM extension, or most WYSIWYG editors that do not explicitly support Markdown input.
Pretty-print vs compact: when to use each
Compact mode outputs the minimal valid Markdown — no padding, no extra spaces. This is the right choice when the Markdown will be rendered immediately and you do not need to read the source. Pretty-print mode adds spaces to align each column to the width of its widest cell. Use pretty-print when the source Markdown will be read directly — in a README file, a documentation PR, or a template where other developers will edit the table manually. Both modes produce identical rendered output in any GFM parser.