Universal Data Format Converter API

Convert JSON to CSV, CSV to JSON, XML to JSON, JSON to XML, Excel to JSON, YAML to JSON, and more. One API for JSON, XML, CSV, TSV, Excel, YAML, NDJSON, SQL INSERT, HTML table, ENV, query string, Base64, and PDF. Stateless, 20MB max. Deterministic output.

Subscribe on RapidAPI Plans and quotas: confirm on the live RapidAPI listing (indicative tiers below).

One URL: POST /convert on universal-data-format-converter.p.rapidapi.com — JSON body, raw Content-Type/Accept, or multipart file upload (no base64 required).

What’s new

File conversion. You can now send a file (Excel, CSV, JSON, XML, YAML, etc.) via multipart upload and get back any supported format—JSON, CSV, PDF, Excel, and more. No need to paste or base64-encode: just pick a file, choose an output format, and run. Try Upload file in the playground below.

Want another format? If you need to convert from or to a file type or data format we don’t support yet, add it to the discussions on RapidAPI. We use your feedback to prioritize new conversions.

Why use this API?

Need to convert JSON to CSV for Excel? CSV to JSON for APIs? XML to JSON or JSON to XML for legacy systems? Excel to JSON or YAML to JSON for pipelines? Legacy systems use XML. APIs return JSON. Spreadsheets use CSV and Excel. Data pipelines use YAML, NDJSON, and more. Instead of building custom converters for every integration path, use one endpoint for all supported conversions.

Supported formats

Input: json, xml, csv, tsv, excel, yaml, ndjson, sql-insert, html-table, env, query-string, base64

Output: same as input plus pdf (tabular data only). All formats convert bidirectionally.

JSONXMLCSVTSVExcelYAMLNDJSON SQL INSERTHTML TableENVQuery StringBase64PDF

Use the API to convert between any of these formats. All conversions are bidirectional except PDF (output-only).

  • JSON → CSV, XML, Excel, YAML
  • CSV → JSON, XML, Excel, YAML
  • XML → JSON, CSV, Excel, YAML
  • Excel → JSON, CSV, XML, YAML
  • YAML → JSON, CSV, XML, Excel
  • NDJSON → JSON, CSV, XML
  • Any format → PDF (tabular)

Examples: convert JSON to CSV for spreadsheets, CSV to JSON for APIs, XML to JSON for modern apps, Excel to JSON for data pipelines. Try the playground below.

Request & response schema

Three ways to call the API: raw body (Content-Type + Accept), JSON body (from, to, data), or file upload (multipart).

· · ·

Input & output options (defaults)

Options are nested under options.input.{format} and options.output.{format}. Use the playground below to see and configure options for each format. Only include options you want to override.

Option keys use camelCase — e.g. sql-insertoptions.input.sqlInsert, query-stringoptions.output.queryString.

Go to playground to select from/to format and see all available options with defaults.

Try it in the playground

Select from/to format (or upload a file), configure options, add your RapidAPI key, run, then get code in your language.

Input options (for selected "from" format)

Output options (for selected "to" format)

Get code

Generate code for the request you configured above. Select language and copy.

Download Postman collection (all 156 conversions)

What to expect

Response is JSON, XML, CSV, text, or binary (PDF, Excel) depending on to. Stateless; no data stored. PDF output is tabular only (max 10k rows, 50 cols).

Pricing & tiers (RapidAPI)

The table below is illustrative and matches the tier pattern used across many Precision Solutions Tech listings. Your actual quotas and prices are always on the live RapidAPI page.

Basic

$0/mo

Free tier — monthly quota on listing

Pro

$9.99/mo

Higher monthly quota — see listing

Mega

$99.99/mo

Largest listed tier — see listing

Overage rates and exact request counts are defined only on RapidAPI.

Frequently Asked Questions

  • On the RapidAPI listing. The pricing section above is indicative only; the live page shows exact plans, request counts, and overage.
  • POST https://universal-data-format-converter.p.rapidapi.com/convert with headers x-rapidapi-key and x-rapidapi-host: universal-data-format-converter.p.rapidapi.com. Use JSON body, raw body with Content-Type/Accept, or multipart/form-data for file upload.
  • Send a POST request with from: "json", to: "csv", and your JSON in the data field. The API returns CSV text. Use the playground above to try it.
  • Send a POST request with from: "csv", to: "json", and your CSV in the data field. Returns a JSON array of objects (one per row).
  • Yes. Use from: "xml" and to: "json". All formats convert bidirectionally except PDF (output-only).
  • Yes. Send Excel as base64 with from: "excel", to: "json". Or upload a file with multipart: send a file part (e.g. .xlsx) and optional to (json, csv, pdf, excel, …). Input format is inferred from the file extension. Try “Upload file” in the playground below.
  • No. Fully stateless. Your data is processed in memory and discarded immediately.
  • Yes. All supported formats convert bidirectionally. PDF is output-only (tabular data).
  • 20MB per request. Requests exceeding this return 413 PAYLOAD_TOO_LARGE.
  • PDF supports tabular data only. Max 10,000 rows, 50 columns, and 500,000 total cells. Exceeding returns 422 INVALID_TRANSFORMATION.
  • Send the file as base64-encoded string in the data field with from: "excel". Or use raw body with Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.
  • UTF-8 by default. UTF-16 is accepted for XML and CSV. Invalid encoding returns 400.
  • Yes. Same input plus same options always produce identical output. Safe for CI/CD and diffing.
  • No. Only SQL INSERT statements can be parsed as input. No SQL is executed. Data is treated as text and converted.
  • Yes. DTD and external entities are disabled. XXE and Billion Laughs attacks are rejected.
  • Yes, with limits. Recursive anchor bombs are prevented. Max alias count is enforced.
  • Unknown input or output options may return 422. Use only documented options under options.input and options.output.
  • Yes. Send raw payload with Content-Type and Accept headers. The API infers format from Content-Type and output from Accept.
  • Yes. Send multipart/form-data with a file part. Use a filename with a known extension (.xlsx, .csv, .json, .xml, .yaml, etc.) so the API can infer input format. Add form fields to (output format), optional options (JSON string), and download=1 to get a file back with a suggested filename. Same /convert endpoint.
  • RFC 4180-style escaping. Values with commas, quotes, or newlines are quoted. You can customize delimiter and quoteChar in input options.
  • For to: "sql-insert", you must provide options.output.sqlInsert.tableName. Dialect (postgres, mysql, sqlite) and batchSize are optional.
  • Malformed input returns 400 with error code INVALID_INPUT and a details message. Unsupported format returns 415 UNSUPPORTED_FORMAT.
  • No. No payload logging. Your data is not stored or written to disk.
  • Yes. The default flatten option uses dot notation (e.g. address.city). Customize with options.output.csv.flattenSeparator.
  • Yes. Set options.output.excel.multiSheetMode to "multi" for multiple sheets. Default is "multi".
  • Only <table> elements. Use options.input.htmlTable.tableIndex to select which table when multiple exist.
  • Yes. Use raw body with Content-Type and Accept headers. Pipe with curl: curl -s URL | curl -X POST -H "Content-Type: text/csv" -H "Accept: application/json" -d @- API_URL.
  • This API does not accept PDF as input. First call the PDF Table Extraction API (POST /extract) with your PDF to get structured JSON (tables with rows). Then pass that JSON to this converter with from: "json" and your desired to format (e.g. csv, excel). Example (JavaScript):
    const key = 'YOUR_RAPIDAPI_KEY';
    
    // 1) Extract tables from PDF
    const form = new FormData();
    form.append('file', pdfFile); // your PDF File object
    const extractRes = await fetch('https://pdf-table-extraction-api.p.rapidapi.com/extract', {
      method: 'POST',
      headers: { 'x-rapidapi-key': key, 'x-rapidapi-host': 'pdf-table-extraction-api.p.rapidapi.com' },
      body: form
    });
    const extracted = await extractRes.json();
    const rows = extracted.tables?.flatMap(t => t.rows ?? []) ?? [];
    
    // 2) Convert JSON to CSV (or excel, xml, etc.)
    const convertRes = await fetch('https://universal-data-format-converter.p.rapidapi.com/convert', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json', 'Accept': 'text/csv', 'x-rapidapi-key': key, 'x-rapidapi-host': 'universal-data-format-converter.p.rapidapi.com' },
      body: JSON.stringify({ from: 'json', to: 'csv', data: rows })
    });
    const csv = await convertRes.text();

We appreciate all suggestions. Share feedback on RapidAPI.