Tools

Markdown Table Generator

Convert Excel paste to Markdown table syntax.

About this tool

This tool converts tab/comma-separated text to Markdown table in one click. Three features: 1) Paste Excel copy (tab-separated) directly to convert, 2) Comma-separated also supported, 3) All processing in browser—no data sent to server. Ideal for GitHub, Notion, HackMD tables.

Tool interface

 

The Complete Guide: Writing and Formatting Markdown Tables

Whether you are documenting an API on GitHub, writing a technical blog post, or organizing notes in Obsidian, you will eventually need to create a table in Markdown. However, manually aligning pipe characters (|) and hyphens (-) is incredibly tedious. In this guide, we will cover the core syntax, column alignment rules, escaping tricks, and how to instantly convert spreadsheet data into Markdown.

Basic Markdown Table Syntax

The foundational rule for creating a table in Markdown is straightforward: use vertical pipes (|) to separate columns, and add a dashed line consisting of hyphens (-) immediately beneath the header row.

| Header 1  | Header 2  | Header 3  |
| --------- | --------- | --------- |
| Data 1    | Data 2    | Data 3    |
| Data 4    | Data 5    | Data 6    |

While some Markdown parsers allow you to omit the outer pipes at the beginning and end of a line, including the outer pipes is considered best practice. It ensures optimal compatibility across major platforms like GitHub Flavored Markdown (GFM), Reddit, and Jekyll.

Controlling the Alignment of Columns

To improve the readability of your data, you can specify text alignment (left, center, or right) for each individual column. You do this by placing a colon (:) on the dashed separator row.

Alignment Style Syntax Rule Code Example
Left-Aligned (Default) Colon on the left | :--- | or | --- |
Center-Aligned Colons on both sides | :---: |
Right-Aligned Colon on the right | ---: |

As a general typography rule: use right alignment for numbers and currency (it helps decimal points line up), center alignment for statuses, tags, or boolean values, and left alignment for descriptive text paragraphs.

Limitations and Escaping Characters

Markdown tables have severe constraints compared to HTML tables. Be aware of the following gotchas:

1. No Native Multi-line Cells

By design, a single row in a Markdown table must correspond to a single line of text in your `.md` file. If you need a line break inside a cell, you must manually insert standard HTML break tags (<br>).

2. How to Write a Pipe Character Inside a Cell

Because the pipe character (|) defines column boundaries, attempting to write a mathematical absolute value like `|x|` or a logical OR `||` will break the table parsing entirely. You must escape the character with a backslash (\|) or use the HTML entity (&#124;).

Stop Formatting by Hand: Converting CSV / Excel

If your table has more than three columns, manually typing it out is a massive waste of developer time.

The Optimal Workflow

  1. Compile and sort your raw data using a spreadsheet tool like Excel or Google Sheets.
  2. Highlight the table area and press Copy (this copies the data as "Tab-Separated Values").
  3. Paste the raw text directly into an automated Markdown Table Generator (like the one above).
  4. Copy the neatly formatted output into your README file.

About This Markdown Generator

Visually aligning the columns in plain text by inserting exact numbers of whitespace padding is the most frustrating part of writing Markdown tables. Our browser-based Markdown Table Generator instantly takes unstructured CSV or Excel copy-paste data and outputs perfectly padded, valid Markdown. Everything happens securely within your browser using client-side JavaScript, meaning none of your proprietary or sensitive documentation data is ever transmitted to an external server.

Usage

  1. Paste tab-separated data from Excel or comma-separated text
  2. Click Convert to generate Markdown table
  3. Paste generated table into GitHub, Notion, or HackMD

When to use

Excel data to Markdown, documentation tables.

Examples

A\tB\tC → | A | B | C |\n|---|---|---|

FAQ

Markdown table syntax?

| col1 | col2 | for header, |---|---| for separator, | val1 | val2 | for rows.

How to copy from Excel?

Select cells and copy. Clipboard gets tab-separated. Paste here and convert.

Markdown table for GitHub?

Convert Excel data with this tool. Paste into README or Issue. Renders correctly.

Tab vs comma separated?

Tab = Excel copy. Comma = CSV. This tool supports both.

Align Markdown table columns?

Separator line with hyphens. |:---|:---:|---:| for left, center, right. Tool auto-generates.

Paste table into Notion?

Excel copy → this tool → Markdown table → Notion. Or paste Excel directly in Notion.

Newline in Markdown table cell?

Standard Markdown tables struggle. Use
or keep single line. Avoid for simplicity.

Markdown table in HackMD?

Convert Excel data here, paste in HackMD. Preview works immediately.

Escape pipe in Markdown table?

Wrap cell in backticks or switch to HTML table if pipe in content.

How to use Markdown table generator?

Paste tab or comma-separated text from Excel. Click Convert. Get Markdown table.

Related tools