Markdown table generator
Build a Markdown table from headers and rows, padded so the columns also line up as plain text.
Input
Result
Fill in the input and press Run.
Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.
Use it from code or an agent
curl -s https://setget.net/v1/tools/markdown-table \
-H 'Content-Type: application/json' \
-d '{"input":{"headers":["Name","Age"],"rows":[["Sam",31],["Alex",27]],"align":["left","right"]}}'
import json, urllib.request
body = {'input': {'headers': ['Name', 'Age'], 'rows': [['Sam', 31], ['Alex', 27]], 'align': ['left', 'right']}}
request = urllib.request.Request("https://setget.net/v1/tools/markdown-table", json.dumps(body).encode(),
{"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/markdown-table", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"input":{"headers":["Name","Age"],"rows":[["Sam",31],["Alex",27]],"align":["left","right"]}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
"slug": "markdown-table",
"input": {
"headers": [
"Name",
"Age"
],
"rows": [
[
"Sam",
31
],
[
"Alex",
27
]
],
"align": [
"left",
"right"
]
}
}
{
"input": {
"headers": [
"Name",
"Age"
],
"rows": [
[
"Sam",
31
],
[
"Alex",
27
]
],
"align": [
"left",
"right"
]
}
}
Endpoint: POST /v1/tools/markdown-table. Over MCP: run_tool with slug: "markdown-table".
Machine-readable: input schema, Markdown. Connect an agent.
Inputs
| Name | Type | Required | What it does |
|---|---|---|---|
rows |
json | yes | The rows: a list of lists, or a list of objects keyed by column name. |
headers |
array | no | Column names. Leave out to use the object keys, or the first row. |
align |
array | no | Alignment: left, center, right or none. One value for every column, or one per column. |
Examples
Input
{
"headers": [
"Name",
"Age"
],
"rows": [
[
"Sam",
31
],
[
"Alex",
27
]
],
"align": [
"left",
"right"
]
}Result
{
"text": "| Name | Age |\n| :--- | --: |\n| Sam | 31 |\n| Alex | 27 |",
"rows": 2,
"columns": 2
}Objects as rows; the pipe character is escaped
Input
{
"rows": [
{
"tool": "a|b",
"ok": true
}
]
}Result
{
"text": "| tool | ok |\n| ---- | ---- |\n| a\\|b | true |",
"rows": 1,
"columns": 2
}Questions
- Why pad the cells?
- Markdown ignores the extra spaces, but padded tables are far easier to read and edit as plain text.
Related tools
- ASCII table generatorRender headers and rows as a box-drawing or plain ASCII table for terminals, logs and code comments.
ascii-table - Table image generatorRender a small table as a tidy SVG image with a header row, zebra stripes and right-aligned numbers.
table-image - CSV to Markdown tableTurn CSV into a Markdown table ready to paste into a README, issue or chat.
csv-to-markdown-table - .gitignore generatorBuild a .gitignore for the languages, editors and operating systems you use, merged without duplicates.
gitignore-generate - ASCII banner text generatorTurn short text into large five-line banner letters for terminals, READMEs, logs and code comments.
ascii-banner - Background pattern generatorMake seamless SVG background patterns (dots, grid, stripes, checker or waves) with your colours and scale.
pattern-image