ASCII table generator

Render headers and rows as a box-drawing or plain ASCII table for terminals, logs and code comments.

Input

The rows: a list of lists, or a list of objects keyed by column name.
Column names. Leave out to use the object keys, or the first row.
Border style. ascii uses only + - and | for places that cannot show box-drawing characters.
Right-align columns that hold only numbers.
Longest cell in characters; longer text is cut with an ellipsis.

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/ascii-table \
  -H 'Content-Type: application/json' \
  -d '{"input":{"headers":["Name","Age"],"rows":[["Sam",31],["Alex",27]]}}'
import json, urllib.request

body = {'input': {'headers': ['Name', 'Age'], 'rows': [['Sam', 31], ['Alex', 27]]}}
request = urllib.request.Request("https://setget.net/v1/tools/ascii-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/ascii-table", {
  method: "POST",
  headers: {"Content-Type": "application/json"},
  body: JSON.stringify({"input":{"headers":["Name","Age"],"rows":[["Sam",31],["Alex",27]]}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
  "slug": "ascii-table",
  "input": {
    "headers": [
      "Name",
      "Age"
    ],
    "rows": [
      [
        "Sam",
        31
      ],
      [
        "Alex",
        27
      ]
    ]
  }
}
{
  "input": {
    "headers": [
      "Name",
      "Age"
    ],
    "rows": [
      [
        "Sam",
        31
      ],
      [
        "Alex",
        27
      ]
    ]
  }
}

Endpoint: POST /v1/tools/ascii-table. Over MCP: run_tool with slug: "ascii-table". Machine-readable: input schema, Markdown. Connect an agent.

Inputs

NameTypeRequiredWhat 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.
style string no Border style. ascii uses only + - and | for places that cannot show box-drawing characters. One of: box, rounded, double, ascii. Default: "box".
align_numbers boolean no Right-align columns that hold only numbers. Default: true.
max_width integer no Longest cell in characters; longer text is cut with an ellipsis. Default: 60. From 5 to 200.

Examples

Input
{
  "headers": [
    "Name",
    "Age"
  ],
  "rows": [
    [
      "Sam",
      31
    ],
    [
      "Alex",
      27
    ]
  ]
}
Result
{
  "text": "┌──────┬─────┐\n│ Name │ Age │\n├──────┼─────┤\n│ Sam  │  31 │\n│ Alex │  27 │\n└──────┴─────┘",
  "rows": 2,
  "columns": 2,
  "width": 14
}

Plain ASCII borders

Input
{
  "headers": [
    "Name",
    "Age"
  ],
  "rows": [
    [
      "Sam",
      31
    ],
    [
      "Alex",
      27
    ]
  ],
  "style": "ascii"
}
Result
{
  "text": "+------+-----+\n| Name | Age |\n+------+-----+\n| Sam  |  31 |\n| Alex |  27 |\n+------+-----+",
  "rows": 2,
  "columns": 2,
  "width": 14
}

Questions

The borders look broken. Why?
Box-drawing characters need a monospaced font and UTF-8. Choose the ascii style where that is not available.