How to Split a Column in CSV (First/Last Name Example)

By CSV Editor Team · Last updated: 2026-03-16

Splitting a CSV column is safest when you preserve the original source field, create clearly named destination columns, and only apply the split once you know the delimiter pattern is reasonably consistent. This matters for names, addresses, locations, SKUs, and combined fields that must be separated before import into a CRM, ecommerce platform, or marketing tool.

Quick answer

  1. Duplicate the source column first.
  2. Choose the right delimiter: space, comma, dash, pipe, or another predictable separator.
  3. Create destination headers that match your import schema.
  4. Split the data and review exception rows.
  5. Trim and normalize results before export.

When to split a CSV column

  • A destination system requires separate fields like first_name and last_name.
  • You want to filter or sort on part of a combined value.
  • You need cleaner schema for merging or deduplicating records later.
  • The source data uses a delimiter pattern that is predictable enough to automate.

Step-by-step: split one column into two or more

  1. Open your file in the Online CSV Editor and identify the source field you want to transform.
  2. Duplicate the original column before making changes. This gives you a rollback path if the split logic fails on edge cases.
  3. Decide the delimiter. Examples include space for a two-part name, comma for City, State, or dash forSKU-1234.
  4. Create destination columns such as first_name and last_name or city and state.
  5. Apply the split to the full column.
  6. Review exceptions manually: single-word names, multi-word surnames, suffixes, empty cells, and values without the expected delimiter.
  7. Trim whitespace and normalize any leftover formatting before exporting the final CSV.

Example: splitting a full_name column

A simple input like Jane Doe can split neatly into first_name = Jane and last_name = Doe. But values like Mary Ann Smith, Prince, or João da Silva show why you should never assume every row follows the same two-word pattern.

For operational work, it is often best to automate the common case and then route the outliers into a review bucket rather than forcing every row into a rigid rule.

Common splitting issues and fixes

Inconsistent delimiter usage: some rows may use commas while others use dashes or spaces. Clean the source pattern first.

Extra whitespace: leading and trailing spaces create messy destination values. Trim after splitting.

Name edge cases: people names are rarely as simple as first word plus last word. Keep exception handling realistic.

Overwriting the source field too early: preserve the original column until QA is complete.

Quick QA checklist

  • Original source column preserved
  • Destination headers match the target schema
  • Outlier rows reviewed manually
  • Whitespace and null values handled
  • Export saved as a new file

FAQ

Should I split before or after deduplication?

Split first if your dedupe rules depend on the new fields. If dedupe relies on a stable external ID, you can do that earlier.

Can I split one column into three or more fields?

Yes. Common examples include city/state/ZIP or SKU prefix/category/serial. The main constraint is consistent source formatting.

What if some rows do not contain the delimiter?

Treat them as exceptions. Do not force a split that creates false data just to keep every row in the same pattern.

Related guides

Canonical: https://csveditoronline.com/docs/split-column-in-csv