Markdown & HTML Table Generator

Build a table in an editable grid, or paste one from a spreadsheet, CSV, Markdown or HTML, and get it back as a GitHub Markdown table, HTML, CSV, LaTeX or an ASCII box table, with per-column alignment and correct escaping.

Generator Web & Dev Updated Oct 4, 2026
Learn how this works
How to Use
  1. Type into the grid, or paste a block of cells copied from Excel or Google Sheets into any cell to fill the grid from there.
  2. Or paste a whole table — CSV, TSV, Markdown or HTML — into Import and press Import; the format is detected for you.
  3. Use + Row and + Column to grow the table, the × buttons to remove a row or column, and the letter button above each column to cycle its alignment (· default, L, C, R).
  4. Pick the output: Markdown, HTML, CSV, LaTeX or ASCII, and set its options, such as padded columns or a CSS class.
  5. Copy or Download the result. Show Work lists the detected input format, the column widths, the alignment row and every character that was escaped.
Table
CSV, TSV, Markdown or HTML
Presets
Output
Rows
—
Columns
—
Cells
—
Output size
—

Worked Example

A price list with a header row and three columns: Item (left), Qty (centre) and Price (right), and three items: Apples 3 $1.20, Bread 1 $2.50, Coffee beans 2 $9.00.

The widest cell sets each column’s width: “Coffee beans” is 12 characters, Qty is 3 (the header, and the minimum the dashes need) and Price is 5. The alignment row puts a colon on the side each column hugs, and every cell is padded on the opposite side:

| Item         | Qty | Price |
| :----------- | :-: | ----: |
| Apples       |  3  | $1.20 |
| Bread        |  1  | $2.50 |
| Coffee beans |  2  | $9.00 |

The same table as LaTeX gets the column spec {lcr}, and each $ becomes \$, because a bare dollar sign starts maths mode.

The common mistake: a pipe inside a cell. A row written as | a|b | logical OR | 50% | under a three-column header has four cells, not three; GitHub keeps the first three, so the Code column shows “a”, Meaning shows “b” and the 50% disappears. Written as a\|b — as this tool does — the pipe stays in its cell.

Show Work

Edit the table to see how the output is built.

Table Syntax Reference

Markdown alignment
:--   :-:   --:
Left, centre, right; plain --- leaves the default
Markdown escapes
| → \|   line break → <br>
Each row must stay on one line
HTML
<thead><th> … <tbody><td>
& < > " become entities; alignment as a style or a class
CSV (RFC 4180)
"He said ""hi"", then left"
Quote cells holding a comma, quote or line break; double inner quotes
LaTeX tabular
\begin{tabular}{lcr} a & b & c \\
Escape \ & % $ # _ { } ~ ^ < > |
ASCII box
+------+   | cell |   +======+
= under the header; also a reStructuredText grid table

Where Pipe Tables Came From

John Gruber’s original Markdown of 2004 had no table syntax; the advice was to write HTML. Michel Fortin’s PHP Markdown Extra added the pipe-and-dashes layout with colons for alignment, and other converters copied it. GitHub wrote it into the GitHub Flavored Markdown specification in 2017, including the rules that the header row is required, that a pipe inside a cell is escaped as \|, and that extra cells in a row are ignored.

The other formats here are older standards. CSV was in use for decades before RFC 4180 wrote its quoting rules down in 2005. LaTeX’s tabular environment takes one letter per column (l, c, r) for alignment. The box-drawing ASCII layout is the grid table of reStructuredText, the markup used for Python’s documentation.

About This Tool

This tool is an editable grid of up to 300 rows and 26 columns with a header-row switch and per-column alignment. It imports CSV and TSV (with quoted fields), GitHub Markdown tables (keeping their alignment) and HTML tables (reading align and text-align, and turning <br> into line breaks), and writes Markdown with optional padding, HTML with a class and your choice of alignment markup, CSV, LaTeX and ASCII.

Imported HTML is parsed with the browser’s DOMParser into a separate, inert document, so its scripts never run and nothing is added to this page. Show Work reports the detected format and why, the column widths, the alignment row and the number of characters escaped. Everything runs in your browser.

Related tools: Markdown to HTML Converter, JSON ⇄ CSV Converter, and CSV Viewer.

Frequently Asked Questions

How do I align a column in a Markdown table?

With colons in the row of dashes under the header: :-- is left, :-: is centre and --: is right; dashes alone leave the column at the renderer’s default. Click the letter above a column in the grid to cycle it through default, L, C and R and the alignment row is written for you.

How do I put a | character inside a Markdown table cell?

Write it as \|. An unescaped pipe starts a new cell, and GitHub drops cells beyond the header’s count, so | a|b | logical OR | 50% | under a three-column header loses the 50% and shifts the rest left. This tool escapes every pipe automatically.

Can I paste a table straight from Excel or Google Sheets?

Yes. Spreadsheets copy cells as tab-separated text, so pasting into a cell fills the grid across and down from that cell, adding rows and columns as needed. The Import box also accepts CSV (with quoted fields, and a semicolon or comma delimiter picked by which splits the lines most evenly), Markdown tables and HTML tables.

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

A Markdown table row has to stay on one line, so a line break in a cell is written as
, which GitHub renders as a break. In the HTML output it becomes
too, in CSV the cell is quoted with the real line break inside, and in LaTeX and ASCII it becomes a space.

Does a Markdown table need a header row?

Yes. GitHub Flavored Markdown only recognises a table when the first row is followed by the dashes row, so the first row is always the header. If you untick Header row, the Markdown output gets an empty header row and all your rows go in the body; the HTML output simply leaves out <thead>.

How do I use the Markdown & HTML Table Generator?

Just pick your options. The answer shows up right away — there is no button to press. Change anything and it updates by itself.

Is it free? Does it work without internet?

Yes to both. It is free with no sign-up, and once the page has loaded it keeps working even with no internet.

Where does my data go?

Nowhere — every calculation runs on your own device. Nothing you enter is uploaded, logged, or stored.

Common Use Cases

README comparison tables

Lay out a feature matrix with centred tick columns and copy a padded Markdown table that also reads cleanly in the raw file.

Spreadsheet to web page

Copy 20 rows from a spreadsheet, paste into one cell and copy the HTML with a <thead> and a CSS class for your CMS.

Tables for a paper

Paste results from a CSV and get a LaTeX tabular with a {lcr} column spec and the %, & and _ already escaped.

Plain-text reports

An ASCII box table lines up in code comments, terminal output and plain-text email, and doubles as a reStructuredText grid table.

Scraping a table

Paste the HTML of a table from a web page and download it as CSV; the HTML is parsed in a detached document and never run.

Last updated: