CSV split column
csv-split-column · version 1.0.0 · CSV & tables · free, no key needed
Split one CSV column on an exact separator into uniquely named columns.
Use when you need to: csv split column · split a csv column by exact separator · expand csv column into named columns.
Decide before calling
Read the versioned contract and the supported scope below. Reuse csv-split-column@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use csv-split-column@1.0.0 for csv split column. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- csv split column
- split a csv column by exact separator
- expand csv column into named columns
Not supported
- regex split
- infer column names
- trim cells
- limit split parts without throwing
- fuzzy matching
- read files
- fetch urls
Behavior
- The first CSV record is the header row. An empty document is rejected; a header-only document yields the replaced headers and zero data rows.
- column must name an existing header exactly. separator is a non-empty literal string of at most 16 UTF-16 code units, never a regular expression.
- Each data cell is split with String.prototype.split(separator). More parts than names.length is rejected; fewer parts are padded with empty strings on the right.
- names is 2 to 16 unique non-empty headers. A name may equal column (in-place replacement) but must not equal any other remaining header.
- The original column is replaced in place by names, in names order. No trimming, case folding, or type coercion is performed.
- The first output header name may not begin with U+FEFF because it is ambiguous with a CSV byte-order mark.
Input
csv(string, required): max length 256000column(string, required): min length 1; max length 256separator(string, required): min length 1; max length 16names(array of string, required): min items 2; max items 16; each min length 1; each max length 256
Output
csv(string, required)
Limits
- max input bytes: 256000
- max data rows: 5000
- max columns: 256
- max header name bytes: 256
- min names: 2
- max names: 16
- max separator chars: 16
- max output bytes: 256000
Example
Request input:
{
"csv": "city,name\nLondon,Ada Lovelace\nParis,Grace Hopper\n",
"column": "name",
"separator": " ",
"names": [
"first",
"last"
]
}
Response:
{
"result": {
"csv": "city,first,last\nLondon,Ada,Lovelace\nParis,Grace,Hopper\n"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "csv-split-column",
"version": "1.0.0",
"input": {
"csv": "city,name\nLondon,Ada Lovelace\nParis,Grace Hopper\n",
"column": "name",
"separator": " ",
"names": [
"first",
"last"
]
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/csv-split-column/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"csv":"city,name\nLondon,Ada Lovelace\nParis,Grace Hopper\n","column":"name","separator":" ","names":["first","last"]}'
The machine-readable contract is at /v1/tools/csv-split-column/versions/1.0.0.
CLI
node cli.mjs run csv-split-column 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- CSV dialect parse: Parse CSV with an explicit dialect into string rows, keeping leading zeros and embedded breaks.
- CSV filter compare: Filter ASCII CSV rows by string/decimal comparison; requires CRLF records, rejects LF-only and non-ASCII input.
- CSV dedupe: Remove duplicate CSV data rows while preserving the first occurrence.
- CSV filter pattern literal: Filter ASCII CSV with literal contains/starts-with; requires CRLF records, rejects LF-only and non-ASCII input.
- CSV merge columns: Join named CSV columns with an exact separator into one column.
- CSV to markdown table: Render ASCII CSV with CRLF records as Markdown; rejects LF-only records and non-ASCII text.