Free plan

Convert Data

Change a data file from one format to another, such as Excel to CSV
POST
/v1/data/convert

About this tool

Data files come in many formats, like CSV, Excel, JSON, XML, YAML and more. This tool changes your file into the format you pick, keeping the same information. You can also keep only some columns, filter rows, sort them or cut the table to the first rows. Some formats can only be read, not written.
For example, you turn an Excel sheet into a JSON file that a website can use.

How to use it

  1. Choose this tool.
  2. Add your data file with Upload or drag and drop.
  3. Choose the format you want as the result.
  4. If you like, pick the columns to keep, a filter, a sort order or a row limit, then press Generate.
  5. Download the converted file.

What you get back

You get a new file in the format you chose, with your data inside. Download it.
GOOD TO KNOW
to=json returns the parsed data inline ({data}); other targets return a signed download URL. `warnings` lists what the conversion had to do (flattened keys, a fallback encoding, a sheet that was not written). This endpoint does not support async jobs.
TEST IT LIVE

Try Convert Data in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
Data
Plan
Free
Method
POST
Endpoint
/v1/data/convert
Tool ID
data.convert
Authentication
API key
Accepts
XLSX, ODS, MD, HTML, XLS, CSV +9 more
Background jobs
Yes
Usage group
Data
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/data/convert" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'file=@document.pdf' \
  -F 'to=xlsx' \
  -F 'limit=0' \
  -F 'output_bundle=zip'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.data.convert({
    "file": 'document.pdf',
    "to": "xlsx",
    "limit": 0,
    "output_bundle": "zip"
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->data()->convert([
    'file' => 'document.pdf',
    'to' => 'xlsx',
    'limit' => 0,
    'output_bundle' => 'zip',
]);
echo $result->requestId;
FAQ

Frequently asked questions

Convert CSV, TSV, JSON, NDJSON, XML, YAML, TOML, XLSX, ODS, HTML tables, Markdown tables, SQL dumps, SQLite and Parquet files into one another, with column / filter / sort / limit controls.

Convert Data accepts XLSX, ODS, MD, HTML, XLS, CSV, JSON, XML, TSV, NDJSON, YAML, TOML and 3 more. You can send several files in one request.

Convert Data is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/data/convert with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.