# 402utils CSV to JSON Converter

> 402utils CSV to JSON Converter is a paid API for AI agents from 402utils.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-09).

Converts CSV text to JSON using a strict RFC 4180 parser with auto-delimiter detection, header mapping, and error repair for malformed input

## Facts

- Endpoint: POST https://402utils.com/v1/csv-to-json?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-09
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/402utils-csv-to-json-converter-8099fa2e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_895K3rraShRb1_aGuND_x

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 402utils-csv-to-json-converter-8099fa2e -d '<json body>'
```

Example prompt: Can you convert this CSV text to JSON for me? It uses semicolons as delimiters and the first row is headers — here's the data: 'name;age;city\nAlice;30;NYC\nBob;25;LA'

## When to prefer this

Use this endpoint when you need robust RFC 4180-compliant CSV parsing with auto-delimiter detection (comma, semicolon, tab, pipe), proper handling of quoted fields containing commas or line breaks, BOM stripping, and graceful repair of malformed rows. Prefer this over generic CSV parsers when data quality is uncertain and you need error reporting without crashes.

## Known failure modes

- CSV exceeds 5 MB limit — request rejected
- Completely unparseable input with no recoverable structure — errors[] populated but output may be empty
- Invalid delimiter value not in allowed enum — validation error
- Malformed JSON envelope body — parsing error
- Network timeout on large payloads near 5 MB limit

## How this service works

Convert CSV to JSON with a strict RFC 4180 parser: quoted fields, doubled quotes, delimiters and line breaks inside quotes, mixed CRLF/LF, BOM. Auto-detects comma, semicolon, tab or pipe (or set delimiter). First row becomes object keys; headers:false yields string arrays. Ragged rows and unterminated quotes are repaired and reported in errors[], never a crash. All values stay strings. Send raw CSV text or JSON {csv}. Max 5 MB.

## Output

Returns a JSON array of objects (when headers:true) where each row becomes a key-value object with header names as keys, or an array of string arrays (when headers:false). Also returns a null or populated errors[] array describing any repaired issues like ragged rows or unterminated quotes. All values are strings.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "csv": {
   "type": "string",
   "description": "CSV text, max 5 MB UTF-8. A leading BOM is stripped; CRLF and LF row endings may be mixed."
  },
  "headers": {
   "type": "boolean",
   "default": true,
   "description": "true (default): the first record is the header row and rows are objects — duplicate header names get _2/_3 suffixes, empty names become col_<n>. false: rows are string arrays and headers is null."
  },
  "delimiter": {
   "enum": [
    ",",
    ";",
    "\t",
    "|"
   ],
   "type": "string",
   "description": "Field delimiter. Omit to auto-detect from the first 20 records (quote-aware field-count consistency; ties prefer comma)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "rows": [
   {
    "city": "Paris",
    "name": "Dupont, Jean",
    "signup": "2026-05-01"
   },
   {
    "city": "Berlin",
    "name": "Müller, Anna",
    "signup": "2026-06-12"
   }
  ],
  "errors": [],
  "headers": [
   "name",
   "city",
   "signup"
  ],
  "rowCount": 2,
  "delimiter": ";"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/402utils-csv-to-json-converter-8099fa2e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 402utils.com](https://www.zero.xyz/host/402utils.com/llms.txt)
