# CSV Column Splitter & Concatenator

Split a CSV column into multiple columns by delimiter, or concatenate columns into one. Header-aware, trim options, exact CSV output, in-browser.

## Run it

- **CLI:** `gizza tool csv-column-split "id,name
1,John Doe
2,Ada Lovelace" 'columns=name'`
- **Web:** https://gizza.ai/tools/csv-column-split/
- **Agents:** machine-readable descriptor (parameters JSON Schema) at https://gizza.ai/tools/csv-column-split/tool.json

## Inputs

- `data` — CSV data _(field)_
- `mode` — Mode _(field)_
- `columns` — Column(s) _(field)_
- `separator` — Cell separator _(field)_
- `names` — Output name(s) _(field)_
- `max_columns` — Max output columns (0 = all) _(field)_
- `keep_source` — Keep source column(s) _(field)_
- `trim` — Trim split values _(field)_
- `has_header` — First row is a header _(field)_
- `delimiter` — CSV delimiter _(field)_

## Output

- Transformed CSV (text)

## Query parameters

Open the tool pre-filled and auto-run via URL:

- `data` — CSV data
- `mode` — Mode
- `columns` — Column(s)
- `separator` — Cell separator
- `names` — Output name(s)
- `max_columns` — Max output columns (0 = all)
- `keep_source` — Keep source column(s)
- `trim` — Trim split values
- `has_header` — First row is a header
- `delimiter` — CSV delimiter

Example: `https://gizza.ai/tools/csv-column-split/?data=id%2Cname%0A1%2CJohn%20Doe%0A2%2CAda%20Lovelace&mode=split&columns=name&separator=space%2C%20comma%2C%20%7C%2C%20or%20custom%20text&names=first%2Clast&max_columns=0&keep_source=true&trim=true&has_header=true&delimiter=%2C`

---

## About this CSV column tool

Use this tool when a CSV field contains multiple pieces of data in one cell, or
when several columns need to become one display field. It works like a browser
version of spreadsheet "Text to Columns" plus the inverse concatenate operation.

For splitting, choose one column by header name (for example `name`) or by
1-based index (for example `2`), choose a literal separator, and optionally name
the generated columns:

```csv
id,name
1,John Doe
2,Ada Lovelace
```

Splitting `name` on a space with output names `first,last` produces:

```csv
id,first,last
1,John,Doe
2,Ada,Lovelace
```

For concatenating, list the source columns in order. Joining `first,last` with a
space and naming the output `name` turns `Ada,Lovelace,36` into
`Ada Lovelace,36`.

### Options and limits

- `max_columns = 0` splits on every occurrence; `max_columns = 2` splits on the
  first occurrence only and leaves the rest of the text in the second output.
- Missing separators are not errors: the original cell goes into the first output
  column and the remaining generated columns are blank.
- `keep_source` keeps the original column(s); otherwise the generated column(s)
  replace them in place.
- The CSV field delimiter can be comma, tab, semicolon, or pipe.
- Splitting uses a literal string separator, not a regex.

Everything runs locally in your browser. Your CSV data is not uploaded.

### FAQ

<details>
<summary>Can I split a full name into first and last columns?</summary>

Yes. Use `mode=split`, set `columns` to your name column, set `separator` to a
space, and set `names` to something like `first,last`. For names with middle
parts, set `max_columns=2` if you want everything after the first space to stay
in the second column.

</details>

<details>
<summary>How do I split only on the first delimiter?</summary>

Set `max_columns` to `2`. For example, splitting `San Jose, CA, USA` on comma
with `max_columns=2` produces `San Jose` and `CA, USA` instead of three columns.

</details>

<details>
<summary>Can I select columns by number instead of header name?</summary>

Yes. Use 1-based column numbers such as `1` or `2`. This is required when
`has_header` is off, and it also works as a fallback when a header name is not
found.

</details>

<details>
<summary>Does the separator support regular expressions?</summary>

No. The separator is a literal string. This keeps the tool predictable for CSV
cleanup tasks and avoids regex escaping surprises.

</details>

## Related tools

- [Change CSV Delimiter](https://gizza.ai/tools/csv-change-delimiter/): Re-save CSV or delimited data with a different separator (comma, tab, semicolon, pipe) with correct requoting — in your browser. Free, private, no upload.
- [CSV Dedupe](https://gizza.ai/tools/csv-dedupe/): Remove duplicate rows from a CSV, keeping the first — optionally keyed on chosen columns. Runs in your browser, nothing is uploaded, free.
- [Amazon Order Analyzer](https://gizza.ai/tools/amazon-order-analyzer/): Paste an Amazon order-history CSV export to summarize total spend by month, top items, and category breakdowns. Browser-only, private, with Markdown or JSON output.
- [Avro to JSON Converter](https://gizza.ai/tools/avro-to-json/): Decode Apache Avro Object Container Files (.avro / OCF) to JSON, NDJSON, or the embedded schema — no .avsc needed, free and private in your browser.
- [Reconcile bank statement and ledger CSVs](https://gizza.ai/tools/bank-statement-reconcile/): Match bank-statement CSV rows to ledger rows by date, signed amount, and fuzzy memo similarity, with unmatched and suggested matches.
