Formats

CSV, JSON and XML with MarkItDown

Updated 2026-11-16·Upstream source ↗
Markdown view

CSV is the one data format MarkItDown really converts: it becomes a Markdown table. TSV, JSON, YAML, TOML and ordinary XML are accepted but printed back unchanged, with exit code 0, so nothing tells you they were not converted. RSS and Atom feeds are the exception among XML files.

Short answer

markitdown data.csv -o data.md gives a Markdown table. Do not expect any conversion from .json, .tsv, .yaml or generic .xml: you get the original text. Non-UTF-8 CSV files need the encoding hint (CLI page).

Tested with markitdown 0.1.9 · Python 3.13 · markitdown 0.1.9 · 15 files on Ubuntu, Windows and macOS runners (T05) · 2026-11-16 · evidence: format-matrix.csv, echoed-types.csv, synthetic_data.csv.md

What each file gave

Fifteen data files, one run each, and our grade (A is best)
FileTypeOutput charactersGradeNotes
synthetic/csv-gbk.csv.csv24DA 24-byte GBK file is detected as UTF-16 and comes out as mojibake in a single cell; -c gbk fixes it.
synthetic/csv-quoted-newlines.csv.csv82BQuoted line break inside a cell is flattened to a space; table intact.
synthetic/csv-semicolon.csv.csv73CSemicolon-separated values are not split: one column containing 'id;name;city'.
synthetic/csv-utf16.csv.csv101ATable; UTF-16 detected.
synthetic/csv-utf8-bom.csv.csv101ATable; BOM handled.
synthetic/data-cp1252.csv.csv79CTable produced but charset guessed wrong: 'café déjà vu' became 'cafķ dķjÓ vu'. Fixed with -c cp1252.
synthetic/data-shiftjis.csv.csv52AShift-JIS detected correctly; Japanese text intact.
synthetic/data.csv.csv146AMarkdown table; pipe inside a cell is escaped (\|).
synthetic/csv-tab.tsv.tsv50DTab-separated text is echoed unchanged, not converted to a table (.tsv is plain text).
synthetic/data.json.json117DPassed through unchanged (pretty-printed JSON stays JSON; no fenced code block).
synthetic/data.xml.xml102DPassed through unchanged as plain text.
synthetic/feed-atom.xml.xml37AAtom feed: title H1, entries H2, summary text.
synthetic/feed.xml.xml108ARSS converter: feed title H1, items H2, date line, HTML description converted.
synthetic/config.yaml.yaml35DPassed through unchanged as plain text (no YAML handling).
synthetic/config.toml.toml35DPassed through unchanged as plain text.
Fifteen data files, one run each, and our grade (A is best) Source: Test T05 · markitdown 0.1.9 · format-matrix.csv · Download CSV

CSV becomes a table

A CSV with a comma and a pipe in cells
| station | rainfall_mm | notes |
| --- | --- | --- |
| Alpha | 412.5 | Battery, low |
| Bravo | 388.0 | OK \| stable |
| Charlie | 451.3 | café |
synthetic_data.csv.md · 147 bytes output (.md)

The first row is the header. A pipe inside a cell is escaped (\|), and a line break inside a quoted cell became a space:

Quoted newlines
| id | note |
| --- | --- |
| 1 | line one line two |
| 2 | has "quotes", commas |
synthetic_csv-quoted-newlines.csv.md · 82 bytes output (.md)

UTF-8 (with or without a byte-order mark) and UTF-16 files came out correctly (grade A), and so did a Shift-JIS file.

Delimiters other than a comma

A semicolon-separated file stayed in one column, because only commas split cells:

A semicolon CSV
| id;name;city |
| --- |
| 1;Zoë;Zürich |
| 2;Łukasz;Kraków |
| 3;田中;東京 |
synthetic_csv-semicolon.csv.md · 85 bytes output (.md)

Other encodings

A GBK file and a Windows-1252 file with accented letters came out wrong: the GBK file was garbled completely, and the Windows-1252 file had wrong characters.

A Windows-1252 CSV, default settings
| station | notes |
| --- | --- |
| Alpha | cafķ dķjÓ vu |
| Bravo | na’ve Ć5 |
synthetic_data-cp1252.csv.md · 85 bytes output (.md)

Telling MarkItDown the encoding fixed both in our tests (-c gbk and -c cp1252 on the command line; see CLI page), and see encoding errors.

JSON, TSV, YAML and generic XML are echoed

What the plain-text converter does with a JSON file
TypeWhat you get
.jsonexit code 0; the file's own text is printed back unchanged
What the plain-text converter does with a JSON file Source: Test T05 · echoed-types.csv · Download CSV
A JSON file
{
  "station": "Alpha",
  "readings": [
    {
      "date": "2026-03-01",
      "mm": 412.5
    }
  ],
  "ok": true
}
synthetic_data.json.md · 117 bytes output (.md)

The same is true of .tsv, .yaml, .toml and a generic .xml file:

Generic XML
<?xml version="1.0"?>
<stations><station id="1"><name>Alpha</name><mm>412.5</mm></station></stations>
synthetic_data.xml.md · 102 bytes output (.md)

If you want a Markdown table from TSV or JSON, convert it yourself first (for example to CSV) and then run MarkItDown. We did not test a particular recipe.

RSS and Atom feeds

An RSS or Atom file becomes a title plus one section per entry (formats page).