/api/v1/convert/csv-to-tableCSV → Markdown table API
Convert CSV (or TSV) to a GFM pipe table.
POST /api/v1/convert/csv-to-table turns CSV or TSV data into a clean GitHub-Flavored Markdown table. Handles quoted fields, embedded newlines, and locale-specific delimiters.
Overview
RFC-4180-compliant CSV parser. Quoted fields, embedded newlines, and escaped quotes are handled correctly. The first row becomes the table header.
Request
Authenticate with Authorization: Bearer YOUR_API_KEY and send a JSON body containing the parameters below. Pick your language:
curl -X POST 'https://trymarkdownviewer.com/api/v1/convert/csv-to-table' \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"csv":"name,age\nAda,36\nLinus,54"}'Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
| csv | string | required | CSV/TSV source. Max 512 KiB. |
| delimiter | "," | "\t" | optional | Field delimiter. Defaults to comma. |
Response
Success responses are wrapped in a data field. Errors use { error: { code, message } } with an appropriate HTTP status — see the error reference.
{
"data": {
"markdown": "| name | age |\n| --- | --- |\n| Ada | 36 |\n| Linus | 54 |\n",
"rows": 3,
"columns": 2
}
}Use cases
Reports → docs
Drop CSVs from BI tools straight into a wiki or README.
AI-generated tables
Have an LLM produce CSV (easy to validate) then convert here.
Related endpoints
Try in browser
Free tools that run the same logic locally — no API key, no upload.
Try it
Send a real request against your account in the API playground. Errors there link straight back to the error reference.