Markdown Table Generator
Build Markdown tables in a grid, or paste from Excel or CSV. Runs in your browser.
About this markdown table generator
This Markdown table generator lets you build a table in a spreadsheet-style grid and copy it as Markdown or HTML. It is for anyone who writes README files, docs, GitHub issues, wiki pages or notes and does not want to count dashes and pipes by hand.
Type into the cells, or copy a block of cells from Excel or Google Sheets and paste it into any cell: the rows and columns spread out from there. You can also import CSV, an existing Markdown table or an HTML table. Set the alignment of each column with one click, sort, transpose, and copy neatly padded Markdown that reads well even as plain text.
Need to edit thousands of rows or clean messy data first? The CSV editor is built for big files and exports Markdown too.
Features
Paste straight from a spreadsheet
Excel, Google Sheets, LibreOffice and Numbers put tab-separated text on the clipboard. Paste it into any cell and the block lands there, adding rows and columns as needed.
Import CSV, Markdown or HTML
Paste or open a .csv, .tsv, .md or .html file. The format is detected for you: CSV with commas or semicolons, quoted fields with line breaks, Markdown with its alignment row, or an HTML table with merged cells spread out.
Alignment per column
The L, C and R buttons above each column write :---, :---: and ---: into the separator row. The – button leaves the column at the renderer's default.
Neat or compact output
Pretty mode pads every cell so the pipes line up in a plain text editor, and it counts Chinese, Japanese, Korean and emoji as double width so they line up too. Compact mode skips the padding for the smallest output.
Safe cell content
Pipes inside a cell are escaped as \| so they do not split the column. Line breaks inside a cell become <br>, the only way to show a line break in a GFM table.
Sort, transpose and tidy
Sort by any column (numbers sort as numbers, so 9 comes before 10, and $24 after $9), swap rows and columns, trim stray spaces and remove empty rows.
How to use the markdown table generator
- 1Type in the grid, or paste cells from Excel or Google Sheets into any cell.
- 2Set each column's alignment and sort or transpose if you need to.
- 3Copy the Markdown or HTML, or download it as a file.
When to use it
README and docs tables
Comparison tables, option lists, keyboard shortcut tables and changelogs read far better as tables. Build it here, paste it into your README on GitHub or GitLab, and it renders straight away.
Turning a spreadsheet into Markdown
Select the cells in Excel or Sheets, copy, click the first cell here and paste. Set the alignment and copy the Markdown. A price list with 40 rows takes under a minute.
Fixing a broken table
Paste a Markdown table that renders wrong into the importer. It is split into cells, and the output comes back with matching column counts and escaped pipes. If you are converting a whole page that contains tables, convert the HTML to Markdown first.
How do you make a table in Markdown?
A Markdown table is rows of cells separated by pipes. The first row is the header. The second row is the separator: three or more dashes per column, with colons to set the alignment. Every row after that is data. The leading and trailing pipes are optional, but most people include them because the table is easier to read.
Tables are not part of the original Markdown or of CommonMark. They come from the GitHub Flavored Markdown spec, which GitHub, GitLab, Bitbucket, Reddit, most static site generators and most note apps follow. The cells do not have to line up for the table to render; padding is only for people reading the raw text.
- | Name | Price |
- | :--- | ----: |
- | Tea | $3 |
- | Cake | $5 |
How do I align columns in a Markdown table?
Put a colon on the side you want to align to in the separator row. :--- aligns left, ---: aligns right and :---: centres. A plain --- leaves it to the renderer, which usually means left aligned.
Right alignment is the usual choice for numbers and prices, because the digits line up. Centre suits short status words like Yes, No or a tick. Long text reads best left aligned.
What Markdown tables cannot do
GFM tables are deliberately simple. There is no colspan or rowspan, so merged cells have to be repeated or left blank. There is no way to put a list or a code block inside a cell, though inline formatting such as **bold**, `code` and links works. A table must have a header row, even if you leave its cells empty, which is what the No header option does.
When you need any of those, use the HTML output instead. Most Markdown renderers accept a raw HTML table in the middle of a Markdown file.
Why use Mavros
| Mavros | Typical upload sites | |
|---|---|---|
| Paste from Excel or Sheets | Into any cell, grows the grid | Separate import box only |
| Imports | CSV, TSV, Markdown, HTML | CSV only |
| Pretty output with CJK and emoji | Double-width aware padding | Misaligned pipes |
| Escapes pipes and line breaks | Yes, automatically | Often breaks the table |
| Sort and transpose | Yes, numbers sort as numbers | Rare |
| Privacy | Runs in your browser | Varies |
Tips
- Paste into the cell where you want the top-left corner of the block to land. Pasting into the first cell replaces the header row too.
- Press Enter to move down a cell. Pressing it in the last row adds a new row, so you can type a long list without reaching for the mouse.
- Small tables are saved in the page address as you edit, so you can bookmark the page or send the link to a colleague to share a draft.
- Check how the table looks with the rest of your document in the Markdown previewer.
- Line breaks inside cells need the <br> option. Without it, they become spaces so the table does not break.
Questions
How do I create a table in Markdown?
Write a header row of cells separated by pipes, then a separator row of dashes such as | --- | --- |, then one row per line of data. This generator writes all three for you from the grid.
How do I convert an Excel table to Markdown?
Select the cells in Excel, press Ctrl+C, click the first cell of the grid here and press Ctrl+V. The rows and columns fill in, and the Markdown appears below, ready to copy.
How do I convert CSV to a Markdown table?
Open the Import section, paste the CSV or open the .csv file, and press Import into grid. Commas and semicolons are both detected, and quoted fields with commas or line breaks inside are kept in one cell.
How do I add a line break inside a Markdown table cell?
Use <br> where the break should go. GFM tables cannot hold real line breaks. With the <br> option on, a line break in a cell is written as <br> for you.
How do I escape a pipe in a Markdown table?
Write it as \|. The generator does this for every pipe you type, so a cell like Up to 5 people | shared stays in one column.
Is my table data uploaded?
No. The grid, the import and the output all run in your browser. Small tables are also written into the page address so a link reproduces them, so think twice before sharing that link if the table holds private data.