JSON CSV XML YAML TOML Data Format Converter

Convert text between JSON, JSON Lines, CSV, XML, YAML and TOML in one call. Paste the data, pick the source and target format, get the converted text. Also works as an MCP tool for AI agents.

Run it on Apify · Source on GitHub

Pricing

US$0.002 per data converted. Billed per use through your Apify account; new accounts get free monthly credit.

Example

Input:

{
  "data": "[{\"name\":\"Ann\",\"age\":30},{\"name\":\"Bob\",\"age\":25}]",
  "fromFormat": "json",
  "toFormat": "csv"
}

Output:

{
  "output": "name,age\nAnn,30\nBob,25",
  "fromFormat": "json",
  "toFormat": "csv",
  "records": 2,
  "characters": 22
}

Use it from code (API)

curl -X POST "https://api.apify.com/v2/acts/jmepjrga49xLmKXRF/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
  -d '{"data":"[{\"name\":\"Ann\",\"age\":30},{\"name\":\"Bob\",\"age\":25}]","fromFormat":"json","toFormat":"csv"}'