text tool

Markdown table generator

Type into the grid, or paste CSV or cells copied from a spreadsheet, and a Markdown table is written underneath with the columns padded so the source lines up. Each column gets its own alignment, and a rendered preview shows how it will look.

Loading the tool…

How it works

  1. 1

    Paste CSV or spreadsheet cells, or type

    Paste into the top box and the grid fills itself, with the separator detected. Or type straight into the grid; the first row is the header.

  2. 2

    Shape the grid

    Add a row or Add a column grows it, the cross beside a row or above a column removes it, and Enter in a cell moves down a row, adding one at the end.

  3. 3

    Set each column's alignment

    The menu above each column sets Default, Left, Centre or Right, which writes the colons into the alignment row.

  4. 4

    Copy the Markdown

    Check the rendered preview, then Copy the Markdown or Download .md. Untick Line up the columns for compact source.

What makes a valid Markdown table

Tables are not in the original Markdown; they are an extension, and the GitHub flavoured version is the one most editors follow. A table needs a header row, then an alignment row made of hyphens, then any number of body rows, each with cells separated by pipes. The header and the alignment row must have the same number of cells, or the whole thing renders as a paragraph of pipes. Body rows are more forgiving: a short row gets empty cells added and a long row loses its extras without warning, which is how data quietly goes missing. The grid here always writes every row at the header's width, so nothing is dropped by the renderer.

Alignment is a colon in the second row

A colon on the left of a column's hyphens aligns it left, on the right aligns it right, and on both sides centres it. With no colon the renderer's own style decides. Right alignment is the one worth setting on purpose: prices, quantities and percentages line up by their last digit only when the column is right aligned, so a reader can compare 9 and 120 at a glance. The example button sets a plan comparison with the price column right aligned and the seats column centred, so you can see each mark in the source and its effect in the preview.

Pasting from a spreadsheet

Copying a range in Excel, Google Sheets or Numbers puts tab separated text on the clipboard, and pasting it into the top box fills the grid at once. CSV works the same way, with quoted cells kept whole, so a cell such as "Phone, same day" stays in one column rather than splitting at its comma. Semicolons, which many European spreadsheet exports use, and pipes are detected too. The line under the button says which separator was used and how many rows were read, so a wrong guess shows up straight away rather than in the finished table.

Pipes, line breaks and padding

A pipe inside a cell would start a new column, so every unescaped pipe is written as a backslash and a pipe, and the page counts how many it changed. A line break inside a cell would end the table, so it becomes a space. Some renderers accept an HTML br tag inside a cell, but many do not, which is why it is not added for you; type it into the cell yourself if your target supports it. Padding adds spaces so every pipe sits under the one above, which makes the source readable in a plain editor and in a code review. It changes nothing in the rendered table.

Limits worth knowing

Markdown tables are deliberately simple: one line per row, no merged cells, no cell that spans two columns, no line breaks inside a cell, and only text and inline formatting inside a cell. If your table needs any of those, it needs HTML or a document instead. The grid caps at 500 rows and 20 columns to stay quick to edit. Nothing is uploaded and nothing is stored, ever, so a refresh clears the grid.

Limits

  • A Markdown table cell cannot hold a line break, so a break inside a pasted cell is replaced with a space and the page says how many were changed.
  • The grid holds up to 500 rows and 20 columns. A bigger paste is cut to that size with a notice.
  • The first row of a paste always becomes the header, because a Markdown table cannot exist without one.
  • Padding counts wide East Asian characters and emoji as two columns, which matches most code editors but not every font.

What it does not do

  • It does not merge cells or span a cell across columns; Markdown tables have no way to do either.
  • It does not keep bold, links or formulas from a spreadsheet. Cells arrive as plain text, and Markdown you type into a cell is passed through as written.
  • It does not read .xlsx files. Copy the cells in the spreadsheet and paste them.
  • It does not upload or store your table.

Questions people ask

How do I add a line break inside a Markdown table cell?

Standard Markdown has no way to do it, because each row of a table must be one line. GitHub and several other renderers accept an HTML br tag inside the cell, so typing <br> where the break should go works there. Plenty of tools strip HTML, though, so check your target first. This generator replaces real line breaks with a space and counts them.

Why does my Markdown table show up as plain text with pipes?

Usually the alignment row is missing or has a different number of cells from the header. Each header cell needs a matching set of at least three hyphens below it. Some renderers also need a blank line between a paragraph and the table. Copying the output of this generator avoids both problems, since every row is written at the header's width.

Can I convert a Markdown table back into a spreadsheet?

Yes. Paste the Markdown table into the top box and the pipes are detected as the separator, so the grid fills with your cells, the outer pipes are dropped and each column takes its alignment from the colons in the second row. From there you can edit the table and copy it back, or move the cells into a spreadsheet by hand.

Do I need the pipes at the start and end of each row?

No. The GitHub flavoured spec makes the leading and trailing pipes optional. They are recommended because they remove ambiguity when a row starts or ends with an empty cell, and they make the source easier to read. This generator always writes them, and every Markdown renderer that supports tables accepts them, so there is no compatibility cost.

Will the table look the same in Notion, Obsidian and GitHub?

The structure will: header, rows and columns survive in all three. Styling differs, since each app draws its own borders, stripes, fonts and column widths, and some apps convert a pasted table into their own table format. GitHub honours the alignment colons. Paste into the real destination once to check before committing a long table to a page.

Put the table in a finished document

Take what you made here into documents.

Create a document with OneCraft

More tools like this

Sources

Written and checked by the OneCraft team. Last checked .