Formats
CSV, JSON and XML with MarkItDown
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
| File | Type | Output characters | Grade | Notes |
|---|---|---|---|---|
synthetic/csv-gbk.csv | .csv | 24 | D | A 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 | .csv | 82 | B | Quoted line break inside a cell is flattened to a space; table intact. |
synthetic/csv-semicolon.csv | .csv | 73 | C | Semicolon-separated values are not split: one column containing 'id;name;city'. |
synthetic/csv-utf16.csv | .csv | 101 | A | Table; UTF-16 detected. |
synthetic/csv-utf8-bom.csv | .csv | 101 | A | Table; BOM handled. |
synthetic/data-cp1252.csv | .csv | 79 | C | Table produced but charset guessed wrong: 'café déjà vu' became 'cafķ dķjÓ vu'. Fixed with -c cp1252. |
synthetic/data-shiftjis.csv | .csv | 52 | A | Shift-JIS detected correctly; Japanese text intact. |
synthetic/data.csv | .csv | 146 | A | Markdown table; pipe inside a cell is escaped (\|). |
synthetic/csv-tab.tsv | .tsv | 50 | D | Tab-separated text is echoed unchanged, not converted to a table (.tsv is plain text). |
synthetic/data.json | .json | 117 | D | Passed through unchanged (pretty-printed JSON stays JSON; no fenced code block). |
synthetic/data.xml | .xml | 102 | D | Passed through unchanged as plain text. |
synthetic/feed-atom.xml | .xml | 37 | A | Atom feed: title H1, entries H2, summary text. |
synthetic/feed.xml | .xml | 108 | A | RSS converter: feed title H1, items H2, date line, HTML description converted. |
synthetic/config.yaml | .yaml | 35 | D | Passed through unchanged as plain text (no YAML handling). |
synthetic/config.toml | .toml | 35 | D | Passed through unchanged as plain text. |
CSV becomes a table
| station | rainfall_mm | notes |
| --- | --- | --- |
| Alpha | 412.5 | Battery, low |
| Bravo | 388.0 | OK \| stable |
| Charlie | 451.3 | café || station | rainfall_mm | notes |
|---|---|---|
| Alpha | 412.5 | Battery, low |
| Bravo | 388.0 | OK | stable |
| Charlie | 451.3 | café |
The first row is the header. A pipe inside a cell is escaped (\|), and a line break inside a quoted cell became a space:
| id | note |
| --- | --- |
| 1 | line one line two |
| 2 | has "quotes", commas || id | note |
|---|---|
| 1 | line one line two |
| 2 | has "quotes", commas |
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:
| id;name;city |
| --- |
| 1;Zoë;Zürich |
| 2;Łukasz;Kraków |
| 3;田中;東京 || id;name;city |
|---|
| 1;Zoë;Zürich |
| 2;Łukasz;Kraków |
| 3;田中;東京 |
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.
| station | notes |
| --- | --- |
| Alpha | cafķ dķjÓ vu |
| Bravo | na’ve Ć5 || station | notes |
|---|---|
| Alpha | cafķ dķjÓ vu |
| Bravo | na’ve Ć5 |
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
| Type | What you get |
|---|---|
.json | exit code 0; the file's own text is printed back unchanged |
{
"station": "Alpha",
"readings": [
{
"date": "2026-03-01",
"mm": 412.5
}
],
"ok": true
}{ "station": "Alpha", "readings": [ { "date": "2026-03-01", "mm": 412.5 } ], "ok": true }
The same is true of .tsv, .yaml, .toml and a generic .xml file:
<?xml version="1.0"?>
<stations><station id="1"><name>Alpha</name><mm>412.5</mm></station></stations>
<stations><station><name>Alpha</name><mm>412.5</mm></station></stations>
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).