How to convert between JSON, YAML, CSV, TOML and XML with an API

Updated 2026-11-10

Use when an agent must convert data between JSON, YAML, CSV, TOML and XML.

From an MCP client, add https://tanod.dev/mcp and call convert_data; its free daily calls are applied automatically, no key or signup.

POST the document with from and to formats to /v1/convert. It returns the converted text in output.

Request

input is up to 1 MB of UTF-8. from is json, yaml, csv, toml or xml; to is json, yaml, csv or toml. Optional: delimiter for CSV (, ; tab or |) and indent for JSON (0 for compact, default 2).

curl, using the free tier
curl -s -X POST https://tanod.dev/v1/convert \
  -H 'X-Tanod-Free: 1' -H 'content-type: application/json' \
  -d '{"input": "name: Ada\nlangs: [en, fr]\nborn: 1815-12-10\n", "from": "yaml", "to": "toml"}'

Response

Response (example from the API spec, trimmed)
{
  "from": "yaml",
  "to": "toml",
  "output": "name = \"Ada\"\nlangs = [\n    \"en\",\n    \"fr\",\n]\nborn = 1815-12-10\n",
  "output_bytes": 63,
  "source": {
    "library": "PyYAML (libyaml SafeLoader), tomllib / tomli-w, csv, defusedxml",
    "license": "MIT / PSF-2.0"
  }
}

Limits and caveats

No lossy conversions. A conversion that cannot be done faithfully is a 422 (not_tabular, not_representable, multiple_documents or ragged_row) and is not charged.

Types. CSV values stay strings. Dates become ISO strings, or native dates in TOML.

Safe parsing. YAML uses a restricted loader with no Python tags, and alias bombs are refused. XML with DTDs or entities is a 422 xml_forbidden. XML cannot be an output format.

Privacy. Tanod does not log or store the submitted text; it is processed in memory for the answer.

Doing this by hand? Use the free CSV to JSON converter in your browser.

Price and free allowance

USD 0.001 per call, paid in USDC on Base, Polygon, Solana, BNB Chain or Arbitrum with x402. 10 free calls per IP per UTC day with the header X-Tanod-Free: 1. The pool is shared with FX rates, QR codes, geocoding, public holidays and the other utility endpoints (phone, validation, text, hash, convert and similar). MCP tool: convert_data at https://tanod.dev/mcp, where the free tier is automatic.

All endpoints →

Use it from Claude without writing code: in claude.ai or Claude Desktop, add https://tanod.dev/mcp/util?via=convert-data-formats-api as a custom connector (steps), then ask in plain words, for example "Convert this JSON to YAML." The free daily allowance is applied automatically over MCP. Beyond it a call needs an x402 payment, which these clients can make.

Related guides: How to validate JSON against a JSON Schema with an API, How to convert Markdown to sanitized HTML with an API, How to hash text with SHA-256, Keccak-256 and other algorithms via API. Back to tanod.dev or the guide index. Results are automated and heuristic.