# CSV to JSON Converter

> CSV to JSON Converter is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-13).

Parses a CSV or TSV (RFC 4180) string into a JSON array of row objects or arrays.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/csv-to-json
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/csv-to-json-converter-b551cc0d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5q4uGOouTaP3PcWFDfnTU

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 csv-to-json-converter-b551cc0d -d '<json body>'
```

Example prompt: Can you convert this CSV data into a JSON array of objects, treating the first row as headers? Here's the CSV: 'name,age,city\nAlice,30,NYC\nBob,25,LA'

## When to prefer this

Choose this endpoint when you need a quick, reliable, paid-per-call CSV/TSV-to-JSON conversion without standing up your own parser. Ideal for agents that receive CSV payloads from external systems or user uploads and need structured JSON for downstream processing. Prefer this over general-purpose code execution when you want a deterministic, schema-safe parse with no runtime dependencies.

## Known failure modes

- Malformed CSV (unclosed quotes, inconsistent column counts) may produce parsing errors or partial output
- Non-RFC-4180 edge cases (e.g. multi-line unquoted fields) may not parse correctly
- Empty input returns empty array or error
- Encoding issues with non-UTF-8 CSV content may corrupt field values

## How this service works

Parse CSV/TSV (RFC 4180) into a JSON array of row objects (or arrays).

## Output

A JSON array where each element represents a row from the input CSV/TSV — either as an object with header-derived keys (if headers are present) or as a plain array of string values per row. Follows RFC 4180 parsing rules including quoted fields and embedded commas.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "csv": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "rows": [
   {
    "age": "30",
    "name": "Alice"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/csv-to-json-converter-b551cc0d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
