ForHosting KIT · Data & Files

Transform a CSV

Every downstream system wants your data shaped slightly differently — a different column name, a computed total, a split full name — and doing that reshaping by hand in a spreadsheet does not scale past a handful of files. This endpoint applies a set of rules to a CSV in one pass: rename columns, compute new ones from expressions, drop what is unneeded, and reorder what remains.

● StableFree · in your browser
Use it from WebAPIEmailApp soonTelegram soon

Runs in your browser. Free, unlimited — your data never leaves this page.

The reshaping tax nobody budgets for

Data rarely arrives in the shape you need it. A supplier's price list has unit_cost where your system wants unit_price; a marketing export has first_name and last_name split across two columns when your CRM wants one full_name field; a raw export includes a dozen internal columns your import script has to strip before it will even run. None of this is complicated individually, but multiplied across every file, every partner, and every schema change, it becomes a quiet, recurring tax on anyone who touches the data pipeline.

What a transform rule actually does

Call POST /data/transform-csv with your file and a list of rules, and each rule performs one operation: rename a column, compute a new column from an expression referencing existing ones (like price times quantity to produce a line total), drop a column entirely, or reorder the output columns. Rules apply in the order you specify, so a computed column can reference a column renamed by an earlier rule, letting you chain several small operations into one coherent reshape instead of writing a custom script for each step.

Computed columns without a spreadsheet

The most useful transforms are often the simplest arithmetic a spreadsheet formula would do — margin as (price minus cost) divided by price, a full address concatenated from street, city and postal code, a boolean flag derived from a threshold. Expressing that as a rule instead of a formula in cell Z2 means it runs the same way every time, on every row, without a formula reference breaking when someone inserts a column upstream.

Why structure and meaning are separate problems

Renaming and reshaping is a different problem from validating or filtering data, even though spreadsheets tend to blur the two into one tangled set of formulas. Keeping structural transformation as its own explicit step — separate from deciding which rows qualify or what a value means — makes each part of a pipeline easier to reason about and to debug when a downstream system rejects a file: you know immediately whether the shape or the content is at fault.

Composing it into a pipeline

Because the task is asynchronous and returns a task_id immediately, transforming a CSV fits naturally as one stage among several — pull a file, transform its columns to match a target schema, then filter or merge it with another source. Partner integrations, recurring imports and schema migrations all benefit from expressing the reshape as declarative rules rather than a script that has to be rewritten every time a source format changes slightly.

Partner file normalization

Rename a supplier's inconsistent column names to match your internal schema before importing their weekly price list.

Computed business metrics

Add a margin or line-total column computed from existing price and cost fields, without opening the file in a spreadsheet.

Schema migration prep

Reshape an export from a legacy system, renaming and reordering columns, before loading it into a new platform's expected format.

Sensitive column removal

Drop internal-only columns like cost basis or notes from a file before sharing it externally with a partner or client.

What kinds of transformations can this CSV transform api apply?

You can rename columns, compute new columns from expressions on existing ones, drop columns, and reorder the output, all in a single rule set.

Can I create a new column from a calculation?

Yes, computed columns can reference other columns in an expression, such as multiplying price by quantity to produce a total column.

Do transform rules run in a specific order?

Yes, rules apply in the order you list them, so a later rule can reference a column that an earlier rule renamed or computed.

Is there a free tier to test the transform endpoint?

The tool above runs free in your browser. The API is paid — each call draws from your prepaid ForHosting KIT balance: top up from $10.00 (it never expires), pay each request's published price, and a call with no balance returns HTTP 402. No subscription, no tokens, and a failed task is never charged.

Can I remove columns I do not need in the output?

Yes, a drop rule removes any column by name, useful for stripping internal fields before sharing a file externally.

What happens if a transform rule references a column that does not exist?

The task fails with a clear error describing the missing column, retries automatically up to three times, and is never charged on failure.

How do I receive the transformed CSV?

Through a signed webhook, recommended for automated pipelines, or a signed link valid for 24 hours for manual download.

How much does the CSV transform API cost?

$0.002 per request, charged only when the transformation completes successfully.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/data/transform-csv

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.

curl -X POST https://api.kit.forhosting.com/data/transform-csv \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"…"}'
{
  "text": "…"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "data.transform_csv",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_mb25
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →