Free plan

Clean Data

Tidy a messy table: spaces, empty rows, repeats and dates
POST
/v1/data/clean

About this tool

This tool cleans a table. It removes extra spaces, empties cells that only say N/A or null, and removes empty rows. It can remove repeated rows, tidy the column names, and turn numbers and dates typed as text into real ones. You pick which clean-ups to do. The cleaned table is a new file.
For example, you tidy a customer list that has extra spaces, blank rows and the same person listed twice.

How to use it

  1. Choose this tool.
  2. Add your table file, such as CSV or Excel.
  3. Choose the clean-ups, such as removing repeated rows or fixing dates.
  4. Press Generate.
  5. Download the cleaned table.

What you get back

You get a new, cleaned table file to download. Your original file stays the same.
GOOD TO KNOW
One file in, one result out. The answer reports how many cells and rows each step changed.
TEST IT LIVE

Try Clean 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/clean
Tool ID
data.clean
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/clean" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'file=@document.pdf' \
  -F 'blank_values=unknown, tbd' \
  -F 'dedupe_on=email' \
  -F 'headers=trim'

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.clean({
    "file": 'document.pdf',
    "blank_values": "unknown, tbd",
    "dedupe_on": "email",
    "headers": "trim"
  });
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()->clean([
    'file' => 'document.pdf',
    'blank_values' => 'unknown, tbd',
    'dedupe_on' => 'email',
    'headers' => 'trim',
]);
echo $result->requestId;
FAQ

Frequently asked questions

Tidy a messy data file: trim extra spaces, empty the cells that only say N/A or null, remove empty rows and repeated rows, tidy the column names, and fix numbers and dates that were typed as text.

Clean 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.

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

Send a POST request to /v1/data/clean 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.