Markdown Table Generator

Convert CSV, TSV (Excel paste), JSON arrays, or raw text into clean GitHub Flavored Markdown (GFM) tables with customizable column alignments and instant copy.

How to Generate Markdown Tables Online

1

Paste Data or Select Format

Paste CSV rows, Excel cells (TSV), or JSON objects into the input area.

2

Real-time Generation

The tool parses your input and formats a aligned GitHub Markdown table (`| Column |`).

3

Copy Markdown

Click Copy to grab the markdown table code for GitHub READMEs, PRs, or docs.

Tool Options

Excel & TSV Support

Seamlessly copy tables directly from Excel, Google Sheets, or TSV and convert them to GFM markdown.

Column Alignment

Supports Left (`:---`), Center (`:---:`), and Right (`---:`) column alignment markers.

JSON & CSV Conversion

Converts JSON arrays of objects and CSV spreadsheets into formatted Markdown tables instantly.

Your Data Privacy

Web Tool
Privacy-First Architecture
Most of our web tools process your data entirely in-browser. Where server processing is technically required, payloads are evaluated statelessly in-memory and are never stored, saved, or logged.
REST API
Stateless In-Memory Processing
When you use our API endpoints, your requests are processed strictly in-memory without persistent database storage, disk logging, or data retention.
Want to learn more about how we safeguard your information and infrastructure?
Read our full Privacy Policy for detailed security standards, data retention principles, and compliance guarantees.

What does the Markdown Table Generator do?

The Markdown Table Generator helps developers, technical writers, and open-source contributors convert tabular data (CSV, TSV, Excel copies, JSON arrays) into clean GitHub Flavored Markdown (GFM) tables. It handles column padding, alignment markers (:---, :---:, ---:), and header separation lines.

Core Concepts

Understanding GitHub Flavored Markdown (GFM) Table Syntax:

  • Header Line: Defines column titles enclosed in pipe characters (| Column 1 | Column 2 |).
  • Separator Line: Specifies column alignment using colons and hyphens:
    • Left Align: | :--- |
    • Center Align: | :---: |
    • Right Align: | ---: |
  • Data Rows: Formats cell contents into matching pipe-separated rows.

How to use the tool?

  1. Paste Input Data: Paste your CSV, TSV (copied directly from Microsoft Excel or Google Sheets), or JSON array into the input box.
  2. Select Options: Choose the input format and default column alignment.
  3. Copy Markdown Table: Click Copy on the generated Markdown table to use in GitHub READMEs, PRs, or documentation.

Related Developer Utilities

If you work with documentation and web formats, explore these complementary tools:

REST API Integration

Blueutils provides a free REST API endpoint (POST https://blueutils.com/api/markdown/table-generator) to programmatically convert CSV or JSON tabular data into GitHub Markdown tables.

API Request Parameters

Name Type Description Example
text String Input tabular text (CSV, TSV, JSON array, or Markdown). "Name, Role\nAlice, Engineer"
format String Input format: "csv", "tsv", "json", or "markdown". Default "csv". "csv"
alignments Array Array of alignment strings ("left", "center", "right"). ["left", "center"]
prettyPadding Boolean Whether to auto-pad cells with spaces for clean source code. Default true. true

API Request Payload Examples

cURL

curl -X POST https://blueutils.com/api/markdown/table-generator \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Name, Role\nAlice, Engineer",
    "format": "csv"
  }'

Python

import requests

url = "https://blueutils.com/api/markdown/table-generator"
payload = {
    "text": "Name, Role\nAlice, Engineer",
    "format": "csv"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())

Java

import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        String jsonPayload = """
            {
                "text": "Name, Role\\nAlice, Engineer",
                "format": "csv"
            }
            """;

        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://blueutils.com/api/markdown/table-generator"))
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
            .build();

        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}

API Response Parameters

Name Type Description Example
isValid Boolean Indicates whether table generation succeeded. true
markdownTable String Formatted GitHub Markdown table string. "| Name | Role |\n| :--- | :--- |\n| Alice | Engineer |"
rowsCount Number Total number of data rows in table. 1
colsCount Number Total number of columns in table. 2

API Response Payload Examples

Success Response (HTTP 200 OK)

{
  "isValid": true,
  "markdownTable": "| Name  | Role     |\n| :---- | :------- |\n| Alice | Engineer |",
  "csvExport": "\"Name\",\"Role\"\n\"Alice\",\"Engineer\"",
  "rowsCount": 1,
  "colsCount": 2
}

Validation Failure Response (HTTP 400 Bad Request)

{
  "isValid": false,
  "error": "Invalid input: Text parameter is required."
}

Rate Limit Exceeded Response (HTTP 429 Too Many Requests)

{
  "error": "API rate limit exceeded. Please wait or contact support@blueutils.com."
}

Why use an API to generate Markdown Tables?

Integrating the Markdown Table Generator API into CI/CD pipelines and GitHub Actions offers key benefits:

  • Automated Pull Request Reports: Convert build summary JSON/CSV artifacts into formatted GFM markdown tables for GitHub PR comments.
  • AI Agent Tool Calling: Gives AI agents a deterministic tool to convert database rows into clean markdown tables without formatting errors.

Native Usage

How to generate markdown tables programmatically across environments:

Node.js (JavaScript)

function arrayToMarkdownTable(headers, rows) {
  const headerStr = `| ${headers.join(' | ')} |`;
  const sepStr = `| ${headers.map(() => ':---').join(' | ')} |`;
  const rowStrs = rows.map(r => `| ${r.join(' | ')} |`);
  return [headerStr, sepStr, ...rowStrs].join('\n');
}

console.log(arrayToMarkdownTable(['Name', 'Role'], [['Alice', 'Engineer']]));

Python

def csv_to_markdown(csv_lines):
    rows = [line.split(',') for line in csv_lines]
    header = f"| {' | '.join(rows[0])} |"
    sep = f"| {' | '.join([':---'] * len(rows[0]))} |"
    data = [f"| {' | '.join(r)} |" for r in rows[1:]]
    return '\n'.join([header, sep] + data)

print(csv_to_markdown(["Name,Role", "Alice,Engineer"]))

Java

public class MarkdownTableBuilder {
    public static String buildTable(String[] headers, String[][] rows) {
        StringBuilder sb = new StringBuilder();
        sb.append("| ").append(String.join(" | ", headers)).append(" |\n");
        sb.append("| ");
        for (int i = 0; i < headers.length; i++) {
            sb.append(":---").append(i == headers.length - 1 ? "" : " | ");
        }
        sb.append(" |\n");
        for (String[] row : rows) {
            sb.append("| ").append(String.join(" | ", row)).append(" |\n");
        }
        return sb.toString();
    }

    public static void main(String[] args) {
        String[] headers = {"Name", "Role"};
        String[][] rows = {{"Alice", "Engineer"}};
        System.out.println(buildTable(headers, rows));
    }
}

Frequently Asked Questions (FAQ)

How do I convert Excel or CSV tables to Markdown online?

Paste your CSV rows or copy cells directly from Microsoft Excel or Google Sheets into the input box. The tool formats an aligned GitHub Markdown table (| Column |).

How do I set column alignments in GitHub Markdown tables?

Select your desired alignment mode. Left alignment uses :---, center alignment uses :---:, and right alignment uses ---: in the separator row.

Can I convert JSON arrays of objects into Markdown tables?

Yes. Paste a JSON array (e.g. [{"name": "Alice", "role": "Lead"}]) and select JSON format to convert object keys and values into columns.

Rate Limits

UI Limits
100 uses per 15 minutes
Max payload size: 5 MB
API Limits
5 requests per 60 minutes
Max payload size: 256 KB
Need higher API rate limits, increased payload sizes, or custom developer solutions?
Contact our engineering team at support@blueutils.com for custom rate limit increases, higher quota allocations, or tailored enterprise integrations.