Skip to content
Jellykit

CSV Split Column

Split one CSV column into several, on a separator such as a space or dash, or at fixed character widths.

  • Runs on your device
Loading tool

About CSV Split Column

Break a full name into first and last name, a date into its parts, or a fixed-width code into its fields. Choose the column, then split it on a separator or at the widths you list, and get the CSV back with the new columns in place of the old one, or beside it.

With a limit on the number of parts, the last part keeps the rest of the text, so "Lars Erik Berg" split into two parts gives "Lars" and "Erik Berg". Rows with fewer parts get empty cells, so every row keeps the same number of columns.

How it works

  1. The CSV is read according to RFC 4180, so quoted fields containing commas or line breaks are understood. The column can be named by its header or by its position, such as #2.
  2. The separator is matched exactly as typed, spaces included; \t stands for a tab. With "At most this many parts" set to 0, the text is split at every separator.
  3. Fixed widths count characters, not bytes, so accented letters and emoji are never cut in half. Characters beyond the last width go into one more column.
  4. New columns are named after the original with a number (name_1, name_2), unless you list names of your own. The result keeps the input’s delimiter and quotes only what needs quoting.

Questions

Can I split on a pattern, such as any amount of spaces?

No, the separator is matched exactly. Leaving "Trim spaces around parts" on removes stray spaces around each part, which covers most uneven spacing; a run of several separators still produces empty parts.

Why are some of the new cells empty?

Every row gets as many new columns as the row with the most parts. A row with fewer parts is filled out with empty cells, so the table stays rectangular.

Is there a limit?

The CSV can be up to 5 MB, and one split may make at most 500 new columns. A split that would make more is almost always on the wrong separator, so you are told instead.

Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.