Markdown Table Generator
Type cells in a grid or paste from a spreadsheet to get a padded Markdown pipe table with left, center or right alignment, plus HTML and CSV copies. How it works
Use the Markdown Table Generator
Row and column tools act on row 1, column 1: click a cell to pick another.
Cells are padded to the widest cell of their column (counted in characters; wide characters such as CJK or emoji may not line up), pipes are written as \| and line breaks as <br>. Up to 50 rows and 20 columns.
About the Markdown Table Generator
A Markdown table is a header row, a delimiter row of hyphens and the body rows, with cells between pipes. The Markdown table generator writes one from a grid you type in or paste, pads each cell to the widest in its column so the source lines up, and sets left, center or right alignment with :--, :-: or --: in the delimiter row.
The starting table with Role centered and City right-aligned
| Line | Markdown |
|---|---|
| Header row | | Name | Role | City | |
| Delimiter row | | :---- | :------: | -------: | |
| Row 2 | | Ada | Engineer | London | |
| Row 3 | | Grace | Admiral | New York | |
Copy Compact gives the same table without padding: | Name | Role | City |, then | :-- | :-: | --: |.
Characters that are escaped
| In the cell | In the Markdown |
|---|---|
| a|b | a\|b |
| a\|b | a\\\|b |
| line1 ⏎ line2 | line1<br>line2 |
⏎ is a line break typed in the cell. Backslashes already in front of a pipe are doubled, so a renderer reads the cell back as typed.
Frequently asked questions
- How do I align a column in a Markdown table?
- Put colons in the delimiter row: :-- for left, :-: for center, --: for right (GitHub Flavored Markdown). In the generator, click the button above a column; it cycles Left, Center and Right, and the delimiter row changes to match.
- How do I put a pipe character inside a table cell?
- Escape it with a backslash, as GFM requires. The generator does it for you: a|b is written a\|b. A line break inside a cell becomes <br>.
- Can I convert a spreadsheet or CSV to a Markdown table?
- Yes. Copy cells from a spreadsheet and press Paste from Spreadsheet; the browser may ask for permission to read the clipboard. If it refuses, paste tab-separated, comma-separated or Markdown table text into the box and press Import pasted text. Quoted CSV cells keep their commas, so "x, y",2 gives the cells x, y and 2. Up to 50 rows and 20 columns are imported; the rest is cut with a note.
- Do the columns have to line up?
- No. GFM says cells in a column do not need to match in length; padding only makes the source easier to read. Copy Compact gives the table without padding.
- Why does the CSV copy put a quote mark before some cells?
- Only when you tick the CSV option: cells that start with =, + or @, or with - followed by a letter, a bracket or one of = + - @, get a leading ' so a spreadsheet shows them as text, so =SUM(A1:A3) is written '=SUM(A1:A3). It is off by default because it changes the data.
Related Tools
View all toolsJSON Formatter
Paste JSON to format it with 2 spaces, 4 spaces or tabs, minify it or sort its keys. A syntax error is reported with its line, column and a caret under it.
JSON Path Query Tool
Test a JSONPath expression on your JSON and see the match count, each matching value and its path. Filters such as ?(@.price < 10) work. Up to 100 KB.
Base64 Converter
Encode text to Base64 or decode Base64 to text. UTF-8, standard and URL-safe alphabets, optional padding on decode, up to 250,000 characters.
URL Encoder/Decoder
Percent-encode or decode text as you type: one value with encodeURIComponent or a whole URL with encodeURI, and an option to read + as a space.
UUID Generator
Generate 1 to 1,000 random v4 UUIDs, or time-based v1, or name-based v5 and v3 from a namespace and a name, and copy them. Repeats of v4 are very unlikely.
ULID Generator
Generate 1 to 500 ULIDs, 26-character IDs that sort by creation time, in upper or lower case, and decode any ULID to the date it was made.