Markdown Table Generator

Turn delimited rows into a Markdown pipe table, without counting pipes or spaces yourself.

Runs on your deviceDeveloperWorkingNo account needed

What this tool does

Markdown Table Generator reads your rows with a quote-aware CSV parser, so a field wrapped in double quotes may contain the delimiter itself and a doubled quote inside it becomes one literal character. Each cell then has any pipe escaped as a backslash and a pipe, so the character cannot end the column early; a line break inside a quoted field becomes a <br> tag; and whatever whitespace is left around the edges is stripped off last. Blank lines are dropped rather than turned into empty rows.

Two different things get called alignment here, and they do separate jobs. Pad cells so the source lines up inserts spaces until every column is the same width in the raw text, which changes only how the Markdown reads in an editor or a diff — a renderer collapses that whitespace. Column alignment writes colons into the separator row, and that is what actually pushes a column left, right or centre once the table is displayed. One choice applies to every column at a time; individual colons have to be edited into the output by hand.

A Markdown table has no headerless form, which explains how First row is the header behaves. Leave it ticked and your opening line becomes the headings. Untick it and nothing is thrown away — every line is treated as data and headings reading Column 1, Column 2 and so on are generated above it, because the alternative would not be valid table syntax. Rows of unequal length are squared off to the width of the longest one, so a short line gains empty cells at the end instead of shifting the columns of the rows around it.

Everything above happens inside the page you have open, with no request to a server at any point. Set against that, there are three things the tool will not do for you. It is a converter rather than a grid you can click into: rows are pasted as text, there is no file picker and no editable cells, so a correction means fixing the input and running it again. Only the pipe is escaped, so an asterisk, underscore or backtick sitting in your data stays live markup and renders as emphasis or code. And the <br> used for a multi-line cell is inline HTML, which GitHub renders but a stricter Markdown pipeline may strip or print literally.

How to use it

  1. Paste your rows. Delimited text goes into the input box, or press Load sample for a four-line table to experiment with. A field wrapped in double quotes can hold the delimiter, a doubled quote or a line break without splitting the row.
  2. Confirm the delimiter. Left on Detect automatically, the tool tallies each candidate character over the first five lines and goes with the one it sees most. A cell of prose full of commas can tip that tally, so name the delimiter yourself whenever a column breaks in the wrong place.
  3. Decide what the opening row is. Ticked, that line becomes the headings. Unticked, it stays as data and generic Column 1, Column 2 headings are written in front of it.
  4. Choose alignment and padding. Alignment writes the colons a renderer obeys. Padding widens the cells so the raw Markdown lines up in an editor — switch it off and every column shrinks to three characters wide: three dashes on their own, or a colon replacing the dash at the aligned end, or one at both ends for centred.
  5. Copy the Markdown. The output pane holds the finished pipe table as plain text. Copy output puts it on the clipboard, ready to paste into a README, an issue or a pull request.

Processing & privacy

Runs on your device. Your file is processed directly in this browser.

Common use cases

Documenting options in a README

A README table of flags, defaults and descriptions is tedious to hand-align. Keep the list wherever you already edit it, paste the rows here, and paste the result into the file.

Moving a spreadsheet selection into an issue

Copying cells out of a sheet gives you tab-separated text, which is exactly what the automatic detection expects, so a block of cells goes straight from the clipboard into a comment.

Turning a query result into notes

A result grid exported as CSV becomes a readable table for a wiki page, a changelog entry or a design document without anyone counting separator dashes.

Writing a table with awkward content in it

Values holding commas, quotes or a stray pipe are the ones that break a hand-typed table. Quoting the field and letting the escaping happen is quicker than checking each row.

Questions

Does building the table involve a server?
No. Reading the delimited text and assembling the pipe table are both done by the page in front of you, so there is nothing to transmit, log or keep, and the tool carries on working with the network switched off.
What happens to a pipe inside a cell?
It is escaped as a backslash followed by the pipe, which is the GitHub-flavoured Markdown escape. The character appears in the rendered cell instead of ending the column early.
Can I align each column differently?
Not from the settings — one alignment applies to the whole table. The separator row it produces is ordinary Markdown, so editing individual colons in the output afterwards works normally.
Why is some of my text coming out bold or italic?
Because only the pipe is escaped. Asterisks, underscores, backticks and square brackets reach the renderer as markup, so a value such as *draft* is displayed as emphasis. Escape those characters in your source data if they need to be shown literally.
Do I have to give it a header row?
One is always written, because a pipe table cannot exist without it. Untick First row is the header and your data stays intact with Column 1, Column 2 headings added above, which you can rename in the output.
What does padding actually change?
Only the raw text. Renderers ignore the extra spaces, so a padded and an unpadded table display identically. It is worth having when the Markdown will be read or edited by hand, and worth turning off when you would rather the source stayed narrow — widening one cell re-pads its whole column, so a later edit shows up as a change to every row in a diff.
Can it turn a Markdown table back into rows?
No, this direction only. Markdown Preview will render an existing table so you can check it, but converting one back to CSV is not something this tool does.

Related tools