Markdown Table Generator

Convert CSV, TSV & Excel data into Markdown tables

What Is a Markdown Table Generator?

A Markdown table generator turns rows and columns of data into the pipe-and-hyphen syntax that Markdown uses to render tables. Instead of typing every | and counting hyphens by hand, you paste your data — from a CSV file, a spreadsheet, or a tab-separated dump — and get a clean, valid table you can drop straight into a README, a GitHub issue, a blog post, or documentation.

Markdown tables are deceptively fiddly to write manually. Every row needs the right number of pipes, the divider row has to match the column count, and a single stray pipe inside a cell silently breaks the layout. This tool handles all of that for you, and it runs entirely in your browser — your data never leaves your machine.

How to Use This Tool

  1. Paste your tabular data into the input area above. This can be CSV (comma-separated), TSV (tab-separated, which is what Excel and Google Sheets copy to the clipboard), or data separated by semicolons or pipes.
  2. Pick your options in the settings bar: choose the delimiter (or leave it on Auto), decide whether the first row holds your column headers, set the column alignment, and toggle “Pretty” padding.
  3. Click “Generate Table” or press Ctrl+Enter. The Markdown table appears in the output panel.
  4. Copy the result with the Copy button or Ctrl+Shift+C, then paste it into your Markdown document.
  5. Clear the workspace anytime with Ctrl+L.

Because spreadsheets copy cells as tab-separated values, the fastest workflow is: select your range in Excel or Google Sheets, copy, paste here, and generate. The delimiter is detected automatically.

Markdown Table Syntax Explained

A GitHub-Flavored Markdown table has three parts:

| Header 1 | Header 2 | Header 3 |
| -------- | -------- | -------- |
| Cell A   | Cell B   | Cell C   |
| Cell D   | Cell E   | Cell F   |
  • The header row is the first line. Its cells become the bold column titles when rendered.
  • The divider row is the second line — a series of hyphen groups (---) separated by pipes. It tells the Markdown parser that the line above is a header and everything below is body data. This row is mandatory; without it, the block renders as plain text, not a table.
  • The body rows follow, one line per row of data.

The outer leading and trailing pipes are optional in GFM, but including them (as this tool does) makes the raw source far easier to read and is the most widely compatible style.

Controlling Column Alignment

Alignment is expressed entirely in the divider row using colons:

Divider syntaxAlignment
:---Left
:---:Center
---:Right
---Default (left)

Set the Alignment dropdown above to apply one of these to every column of your generated table. Right alignment is especially useful for columns of numbers, while center alignment reads well for short status labels or checkmarks.

Pretty Padding vs Compact Output

The Pretty option pads every cell with spaces so the columns line up in the raw Markdown source, like the example above. This has zero effect on how the table renders — Markdown ignores the extra spaces — but it makes the source dramatically easier to read and edit by hand later. Turn Pretty off to get compact output (| a | b |) when you want the smallest possible diff or you are pasting into a system that will re-render it anyway.

Converting From CSV, Excel, and Google Sheets

  • From Excel or Google Sheets: Select the range and copy. The clipboard receives tab-separated data, so paste it directly and leave the delimiter on Auto.
  • From a CSV file: Open the file, copy its contents, and paste. Auto-detection will pick the comma. If your CSV uses semicolons (common in European locales), the tool detects that too — or you can force it in the delimiter dropdown.
  • From a database export or log: Pipe- and tab-delimited exports work the same way. Choose the matching delimiter if Auto guesses wrong.

Quoted fields are fully supported: a value like "Smith, John" stays in one cell even though it contains a comma, and doubled quotes ("") inside a quoted field are unescaped correctly, exactly as the CSV standard specifies.

Common Markdown Table Errors

  • Mismatched column counts: If a body row has fewer cells than the header, some renderers drop data or misalign the table. This generator pads short rows with empty cells so every row matches the header width.
  • Unescaped pipes: A literal | inside a cell ends the cell early and breaks the layout. The generator escapes these as \| automatically.
  • Line breaks inside cells: Markdown table cells cannot span multiple lines. Newlines inside a quoted field are converted to <br> so the cell renders on one line with an explicit break.
  • Missing divider row: Hand-written tables often forget the --- divider, which makes the whole block render as plain text. A generated table always includes it.
  • Wrong number of divider cells: The divider row must have the same number of hyphen groups as there are columns. This is handled for you.

GitHub-Flavored Markdown vs CommonMark

Plain CommonMark — the base Markdown specification — does not define tables at all. Table support comes from the GitHub-Flavored Markdown (GFM) extension. In practice, nearly every platform a developer touches enables GFM: GitHub, GitLab, Bitbucket, Reddit, Stack Overflow, Discord, Obsidian, VS Code preview, and popular static site generators like Hugo, Jekyll, and Docusaurus. The output from this tool is standard GFM, so it renders consistently across all of them.

If you need the opposite conversion — turning existing HTML or Markdown back and forth — try the Markdown to HTML converter or HTML to Markdown converter. To reshape tabular data into other formats, the CSV to JSON and JSON to CSV tools cover the common cases.

Why Generate Tables in Your Browser?

Every calculation here happens client-side. There is no upload, no account, and no tracking of the data you paste — a real concern when your tables might contain internal metrics, customer lists, or unreleased data. Open the tool, paste, generate, copy, and close. That is the entire workflow, and none of your data ever touches a server.

Frequently Asked Questions

How do I create a Markdown table from Excel or Google Sheets?

Select the cells in Excel or Google Sheets and copy them (Ctrl+C). Spreadsheets copy data as tab-separated values (TSV), so you can paste directly into the input box above. The generator auto-detects the tab delimiter and produces a ready-to-paste GitHub-flavored Markdown table. Keep the 'First row is header' option checked so your column titles become the table header.

What is the syntax for a Markdown table?

A Markdown table uses pipes (|) to separate columns and a divider row of hyphens (---) to separate the header from the body. For example: `| Name | Age |` on the first line, `| --- | --- |` on the second, then one row of data per line. Colons in the divider row control alignment: `:---` is left, `:---:` is center, and `---:` is right.

How do I align columns in a Markdown table?

Column alignment is set in the divider row directly below the header. Add a colon to the left of the hyphens for left alignment (`:---`), colons on both sides for center (`:---:`), and a colon on the right for right alignment (`---:`). Use the Alignment setting above to apply this to your generated table automatically.

Do Markdown tables work on GitHub, GitLab, and Reddit?

Yes. This tool outputs GitHub-Flavored Markdown (GFM) tables, which render on GitHub, GitLab, Bitbucket, Reddit, Discord, Obsidian, Notion imports, and most static site generators. Standard (CommonMark) Markdown does not include tables, so table support depends on the GFM extension — which the vast majority of modern platforms enable by default.

How are pipe characters and line breaks inside cells handled?

A literal pipe (|) inside cell text would break the table structure, so the generator escapes it as `\|` automatically. Line breaks inside a quoted cell are converted to `<br>` tags, because a Markdown table cell must stay on a single line. This keeps your table valid even when the source data contains these characters.

Is my data safe when using this Markdown table generator?

Yes. All parsing and generation happen entirely in your browser using JavaScript. Your pasted data is never uploaded to a server, logged, or stored anywhere. You can confirm this by opening your browser's network tab — no requests are made while you generate a table.

Can I generate a Markdown table without a header row?

Yes. Uncheck the 'First row is header' option, and the generator will create generic headers (Column 1, Column 2, …) because a Markdown table always requires a header row to be valid. If your data genuinely has no headers, you can then edit those placeholder names in the output.