# TSV to JSON

`tsv-to-json` · version 1.0.0 · YAML, TOML, INI, XML & TSV · free, no key needed

Convert a complete TSV document into an array of string-valued objects.

**Use when you need to: tsv to json · convert tsv to json · parse tsv rows.**

## Supported

- tsv to json
- convert tsv to json
- parse tsv rows

## Not supported

- infer types
- stream rows
- read files
- fetch urls
- json to tsv

## Behavior

- The first TSV record supplies object property names.
- Duplicate and empty header names are rejected.
- Every cell remains a string; numbers, booleans, nulls, and dates are not inferred.
- The whole TSV document is processed in one request and row order is retained.

## Input

- `tsv` (string, required): max length 256000

## Output

- array of object: max items 5000

## Limits

- max input bytes: 256000
- max data rows: 5000
- max columns: 256
- max header name bytes: 256
- max output bytes: 1048576

## Example

Request input:

```json
{
  "tsv": "name\tcity\nAda\tLondon\n"
}
```

Response:

```json
{
  "result": [
    {
      "name": "Ada",
      "city": "London"
    }
  ]
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "tsv-to-json",
  "version": "1.0.0",
  "input": {
    "tsv": "name\tcity\nAda\tLondon\n"
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/tsv-to-json/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"tsv":"name\tcity\nAda\tLondon\n"}'
```

The machine-readable contract is at [/v1/tools/tsv-to-json/versions/1.0.0](/v1/tools/tsv-to-json/versions/1.0.0).

### CLI

```sh
node cli.mjs run tsv-to-json 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [INI to JSON](/tools/ini-to-json): Convert an INI string to a JSON object.
- [JSON to TSV](/tools/json-to-tsv): Convert a JSON array of objects to a TSV string.
- [TOML to JSON](/tools/toml-to-json): Convert a TOML string to a JSON object.
- [XML to JSON](/tools/xml-to-json): Convert an XML string to a JSON object.
- [YAML to JSON](/tools/yaml-to-json): Convert a YAML string to a JSON object or array.
- [JSON to INI](/tools/json-to-ini): Convert JSON data to an INI string.
