# CSV to JSONL / JSON Converter

> CSV to JSONL / JSON Converter is a paid API for AI agents from x402-deployer.x402-deployer.workers.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-13).

Converts CSV, TSV, or spreadsheet data into newline-delimited JSON (JSONL), JSON array, or column-oriented ndarray, with RFC 4180 parsing and automatic type inference

## Facts

- Endpoint: POST https://x402-deployer.x402-deployer.workers.dev/csv-to-jsonl
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 1
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-43c10269
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_sikgM8nM4ltA3F8CgS7Ei

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-deployer-x402-deployer-workers-dev-43c10269 -d '<json body>'
```

Example prompt: Convert this CSV data to newline-delimited JSONL with type inference on, using a comma delimiter and treating the first row as headers — also drop the 'internal_id' column and trim whitespace from all values.

## When to prefer this

Choose this endpoint when you need a lightweight, pure-parser CSV-to-JSON conversion with automatic type inference and no dependency on an external upstream API. Ideal for LLM training data preparation, data pipeline preprocessing, or when you need configurable output formats (JSONL, JSON array, or ndarray) with column manipulation (rename, drop, trim) in a single call.

## Known failure modes

- Malformed CSV that doesn't conform to RFC 4180 may produce parsing errors or misaligned columns
- Specifying a column name to drop or rename that doesn't exist in the headers may return an error or be silently ignored
- Providing non-CSV binary data will likely cause a parse failure
- Missing required body fields (CSV text) will result in a 400-level error
- Type inference ambiguity (e.g. date strings that don't match ISO format) may fall back to string type

## How this service works

CSV to JSON / CSV to JSONL / CSV to NDJSON converter / TSV to JSON / spreadsheet to JSON / data pipeline preprocessor / LLM training-data prep. RFC 4180 parser. Type inference (booleans, integers, floats, ISO dates, null tokens). Configurable delimiter, quote char, header presence, column rename, drop columns, trim whitespace. Outputs newline-delimited JSON (jsonl), a JSON array (json), or column-oriented arrays (ndarray). Pure parser, no upstream API.

## Output

Returns the parsed CSV as either a JSONL string (one JSON object per line), a JSON array of objects, or column-oriented arrays (ndarray), with all values type-inferred as booleans, integers, floats, ISO dates, or nulls as appropriate. The output reflects any column renames, dropped columns, and whitespace trimming specified in the request.

## Example request

```json
{
 "input": {
  "body": {
   "csv": "name,age,email,active\nAlice,30,alice@example.com,true\nBob,25,bob@example.com,false\nCharlie,35,charlie@example.com,true",
   "trim": true,
   "format": "jsonl",
   "delimiter": ",",
   "has_header": true,
   "infer_types": true
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "csv"
     ],
     "properties": {
      "csv": {
       "type": "string",
       "description": "Raw CSV / TSV text. Up to ~1MB recommended."
      },
      "trim": {
       "type": "boolean",
       "description": "Trim leading/trailing whitespace from each field. Default true."
      },
      "format": {
       "enum": [
        "jsonl",
        "json",
        "ndarray"
       ],
       "type": "string",
       "description": "Output shape. 'jsonl' (default, newline-delimited JSON objects), 'json' (single JSON array), 'ndarray' (column-oriented arrays)."
      },
      "rename": {
       "type": "object",
       "description": "Optional column-rename map, e.g. { 'first name': 'first_name', 'DOB': 'date_of_birth' }."
      },
      "delimiter": {
       "type": "string",
       "description": "Field delimiter. Default ','. Use '\\t' for TSV, ';' for European CSV, '|' for pipe-delimited."
      },
      "has_header": {
       "type": "boolean",
       "description": "Whether the first row is the header. Default true. If false, columns are named c1, c2, ..."
      },
      "quote_char": {
       "type": "string",
       "description": "Quote character for fields containing the delimiter or newlines. Default '\"'."
      },
      "infer_types": {
       "type": "boolean",
       "description": "If true (default), parse booleans, integers, floats, ISO-8601 dates, and null tokens. If false, every value stays a string."
      },
      "null_values": {
       "type": "array",
       "description": "Strings to coerce to JSON null. Default ['', 'null', 'NULL', 'NA', 'N/A']."
      },
      "drop_columns": {
       "type": "array",
       "description": "Column names to drop from the output."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "o
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-43c10269/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-deployer.x402-deployer.workers.dev](https://www.zero.xyz/host/x402-deployer.x402-deployer.workers.dev/llms.txt)
