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.
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 dedupe: Remove duplicate CSV data rows while preserving the first occurrence.
- CSV merge columns: Join named CSV columns with an exact separator into one column.
- CSV filter equals: Keep CSV data rows whose named column equals an exact string.
- CSV group count: Count CSV rows by exact named-column tuples in first-seen order.
- CSV scale integer column: Multiply every data cell in a named CSV column by a canonical integer factor.
- CSV schema check: Validate a CSV document against an ordered column list and per-column string constraints.