Markdown is a lightweight markup language for publishing content on the web. It uses an easy-to-understand plain text formatting syntax to create tidy HTML via a simple Perl script.

Since then, many flavors of Markdown have appeared. While tables did not appear in the original specification, most Markdown editors now support them, and they’re easy to implement.

Find out how to make a Markdown table from scratch and discover resources that can speed up the process.

There Are Many Markdown Parsers

The original Markdown parser was written in Perl. Core features included support for block elements (paragraphs, headers, lists) and span elements (links, emphasis, images).

With the rise in the trend of Markdown usage, there are now several parsers with support for different implementations. These include GitHub Flavored Markup, Markdown Extra, MultiMarkdown, and CommonMark.

Many Markdown editors and online platforms support tables with the help of GitHub Flavored Markup and Markdown Extra. Both implementations use the same formatting, so you don’t have to remember the different syntax for different languages. The Markdown table syntax is also robust, easy to use, and doesn’t need a complicated system to create a table.

People have since made efforts to standardize Markdown, the most significant being CommonMark. Although this implementation does not include native support for tables, future iterations will.

How to Create a Markdown Table

A table in GitHub Flavored Markup and Markdown Extra consists of two parts: the header and the rows of data in the table. Define a header using this syntax:

  • A pipe character (|) separates the individual columns in a table.
  • Hyphens (-) act as a delimiter row to separate the header from the body.
  • A colon (:) aligns cell contents.
create a markdown table

As you can see from the above screenshot, the header of a table consists of two rows. The first row is the column header, where spaces and pipes separate each header. The second row is a delimiter row for the table that determines how it will horizontally align the text.

There must be at least three hyphens in each cell of the delimiter row. You can increase the hyphens or spaces for readability. These cells should be wrapped in pipes like other cells.

To left-align a column, put a colon to the left of the hyphens (:---). Put a colon to the right of the hyphen (---:) to right-align a column. To center-align, surround the hyphen with two colons on both sides (:---:).

Body and Markdown Formatting

The body of the table consists of any number of rows separated by line breaks. Just like the header, every cell is separated by a pipe. Within each table cell, you can use Markdown formatting syntax like italics, bold, links, images, and inline code blocks.

You can insert a pipe character in the cell as long as you precede it with a backslash. This way Markdown knows that the pipe doesn't indicate the start of a cell.

You can even use the <br /> tag to force cells to span multiple lines. Although, remember that Markdown tables will automatically wrap for cells that contain a lot of text. Nevertheless, you can use the <br /> tag to control the line breaks in a cell so that they happen where you want them to.

Markdown Table Generators

While the syntax for creating Markdown tables is easy to remember and implement, it is a tedious and time-consuming process. If you’d rather not struggle to format a table manually, a Markdown table generator might be of great use.

Tables Generator

markdown table generator

Tables Generator is probably the simplest website of its kind, featuring a full set of tools for creating tables in Markdown and exporting them as well. Tables Generator supports other languages as well, so make sure you're in the Markdown tab.

  1. Go to File and choose New table.
  2. From the dialog box that appears, select the number of rows (valid range 1–500) and columns (valid range 1–20).
  3. Click Create.
  4. Double-click on a field to add content. Then, press Tab to move between the fields.
  5. Click the Generate button to see the result.
  6. Click the Copy to clipboard button and paste the table into your document.
  7. Check the Compact mode to condense the table and save space.

You can use the alignment tool at the top to align the contents of your table. The tool even allows you to align cells independent of the column rule to ensure the table is formatted properly.

If you've already got your data in a table, you can import a CSV file via File > Import CSV file and convert it into Markdown.

Table Convert

table convert online tool

Table Convert is an intuitive online tool to convert data from CSV files to Markdown tables. This tool is a full-fledged editor for tables. It includes commands like Undo, Redo, Transpose, Find and Replace, and more. Here's how you can use it:

  1. Drag-and-drop the table data or upload a CSV file in the Data Source field. The table generator will show the Markdown table preview.
  2. Check Bold first row to bold the header row and make it stand out.
  3. Make sure to check Pretty-print your Markdown for better readability and more space in the table.
  4. Click Copy to clipboard to copy the table into your document or download it as a Markdown file.

Thanks to the universal CSV format, you can use this tool to convert Excel tables into Markdown.

Table Implementation in Markdown Apps

While Markdown table generators are useful, there's a trend of writing apps integrating support for Markdown tables. This allows you to format tables using a process familiar from Microsoft Word and other word processors.

Here are two examples of third-party apps with a built-in table generator.

Typora

table implementation in Typora

Typora is an excellent writing app, for reasons beyond just creating tables. Regardless, Typora not only lets you create Markdown tables through an interface, but also provides a robust table editor.

To create a table in Typora, go to Paragraph > Table > Insert Table. From the dialog box that appears, type in the number of rows and columns. To add rows and columns to your table, right-click on a table cell, then choose Table > Add Row Below or Add Columns Before or After.

Another great feature of Typora's table editor is that you can reorder rows/columns. Click on the left/top border of a row or column and use drag-and-drop to move it. You can even resize the table and align the contents through the alignment tool located at the top of the table.

Zettlr

Creating a table in Zettlr

Zettlr's built-in table editor lets you edit Markdown tables seamlessly. You can also use it to instantly convert the Markdown source into HTML.

Click the table icon in the toolbar and then select the size of your table to create it.

Click into any of the cells and start adding your content. You can use Tab or the Arrow keys to navigate the table. To add rows or columns, use the green plus (+) symbol on the borders. These buttons will appear when you hover over the table.

Do remember that when you’re inside any of the table cells, you’re in editing mode. Once you're done, make sure to click outside the table and save.

Master Markdown Today

Knowing Markdown is a great skill to add to your digital publishing repertoire. Whether you’re posting comments on Reddit, writing a readme for the GitHub platform, or thinking of starting a blog, this simplified markup language can help you out in many ways.

When you pair it with the right Markdown editor, you can convert your text into other formats like HTML, PDF, or more. You just need a bit of time and practice to get used to Markdown syntax.