Split and merge columns

Import Excel/CSV, split, combine and reorder columns, then continue to cleanup.

  • Runs locally
  • Free

Use the tool

Your files are processed in your browser and are not uploaded to a server.

About this tool

Split, merge and reorder table columns: split one column by a separator, merge several in order, or pick and reorder columns, with before/after previews, then export XLSX or CSV.

Typical uses

  • Split “Country-City-District” into three columns
  • Combine first and last names into a full-name column
  • Keep only needed columns in a new order

How to use

  1. Upload CSV/TSV/TXT/XLSX or paste text. Select encoding, delimiter and worksheet; check headings and input preview.

  2. Split one column, merge in selection order, or select and reorder columns. Review before/after previews, export XLSX/CSV or continue to cleanup and deduplication.

Good to know

Text 5 MB, XLSX 10 MB; 20,000 records, 200 columns, 200,000 cells. Literal splitting at every/first/last separator; whitespace is not an empty value. Source columns can be retained. Presets match unique names, or positions without headers; reselect columns and update older presets. XLSX reads cached formula values and exports strings preserving leading zeros; CSV protects formulas by default. Dedupe handoff sends XLSX and the header setting, staged locally only on click.

The three operations on the Load example table

“Load example” fills in a CSV with 4 records and 3 columns. The name column joins first and last name with |; the last row has no first name and no city (∅ marks an empty cell):

namecitycode
Ada|LovelaceLondon001
Mei|ChenShanghai002
LinBeijing003
|Lee∅004

After “Read and preview”, the default operation is “Split a column” with | as the “Literal value separator”. Press “Process and preview” and name is replaced by two columns headed “name 1” and “name 2”. Lin has no |, so the whole value goes into the first column and the second is empty; “|Lee” starts with |, so its first column is empty:

name 1name 2citycode
AdaLovelaceLondon001
MeiChenShanghai002
Lin∅Beijing003
∅Lee∅004

Tick “Keep source columns” and enter Part as the “New heading prefix (optional)”: the original name column stays in front and the new columns are called Part 1 and Part 2:

namePart 1Part 2citycode
Ada|LovelaceAdaLovelaceLondon001
Mei|ChenMeiChenShanghai002
LinLin∅Beijing003
|Lee∅Lee∅004

Switch to “Merge columns”, tick city then code, and use “ / ” as the separator. The merged column replaces the leftmost selected column. With “Merged heading (optional)” left blank, the original headings are joined with the same separator. “Skip empty values (preserve spaces)”, on by default, leaves the last row as plain 004 rather than “ / 004”:

namecity / code
Ada|LovelaceLondon / 001
Mei|ChenShanghai / 002
LinBeijing / 003
|Lee004

Values are merged in the order you ticked the columns, not in table order. Choose code before city, separator “-”, untick skipping, tick “Keep source columns” and enter the heading Key. The new column is appended on the right, and the empty city leaves a trailing “-”:

namecitycodeKey
Ada|LovelaceLondon001001-London
Mei|ChenShanghai002002-Shanghai
LinBeijing003003-Beijing
|Lee∅004004-

“Select and reorder” exports only the chosen columns, in the order of the list (use ↑ ↓ to change it). Picking code first, then name:

codename
001Ada|Lovelace
002Mei|Chen
003Lin
004|Lee

Split rules: every, first or last separator

The separator is matched literally, not as a regular expression, and may be several characters long (up to 100). “Split at” has three choices: every separator, where the row with the most parts decides how many columns appear, or the first or last separator, which always give exactly two columns. The sku column split on “-” (¦ separates the new cells):

ValueEvery separatorFirst separator (two columns)Last separator (two columns)
CN-SH-001CN ¦ SH ¦ 001 ¦ ∅CN ¦ SH-001CN-SH ¦ 001
JP-13-SHIBUYA-7JP ¦ 13 ¦ SHIBUYA ¦ 7JP ¦ 13-SHIBUYA-7JP-13-SHIBUYA ¦ 7
USUS ¦ ∅ ¦ ∅ ¦ ∅US ¦ ∅US ¦ ∅
-NY-∅ ¦ NY ¦ ∅ ¦ ∅∅ ¦ NY--NY ¦ ∅
A--BA ¦ ∅ ¦ B ¦ ∅A ¦ -BA- ¦ B
  • Consecutive separators (A--B) produce an empty cell, and a separator at the start or end (-NY-) produces one empty cell at that end.
  • Shorter rows are padded on the right, which is why “US” becomes US ¦ ∅ ¦ ∅ ¦ ∅ with every separator.
  • If the source heading is empty, the new headings use the column number: Column 1 1, Column 1 2.
  • A timestamp “2024-01-05 10:30” split on “-” gives 2024 ¦ 01 ¦ 05 10:30; the space is not a separator. To split off the time, run a second split on column 3 with the “Space” button.

Quotes, commas and empty values

Reading comes first, splitting second. CSV is read following RFC 4180: a comma inside double quotes is part of the value, and "" stands for one double quote. So “"Chen, Mei"” is read as one cell and is not cut by the “CSV delimiter”. Only a split with “, ” as the value separator then turns it into two columns:

full 1full 2full 3tel
ChenMei∅+86 1
Sato "Ken" Taro∅∅∅
abcx

“Sato "Ken" Taro” contains no “, ”, so it stays whole in the first column. If a quote is never closed (a,b followed by "x,1), reading stops with “Invalid CSV. Check quoting and the delimiter.”.

Empty and blank are different. “Skip empty values (preserve spaces)” skips only cells that are completely empty; a cell holding a space still takes part. Column a holding “␣” and nothing, column b holding x and y, merged with “+”:

SettingRow 1Row 2
Skip empty values (default)␣+xy
Do not skip␣+x+y

Limits, error messages and exports

Reading accepts text up to 5 MB and XLSX up to 10 MB, with at most 20,000 records, 200 columns, 200,000 cells and 32,767 characters per cell. The result has the same limits: a one-column table can be split into at most 200 columns, and in a table of W columns one split can create at most 201 − W new columns, one fewer when the source column is kept.

MessageWhen it appears
A split separator cannot be empty.The split separator is empty. The Process button is also greyed out.
Choose valid columns; splitting requires exactly one. Preset column names must exist uniquely in this table.No column is chosen, several are chosen for a split, or a preset’s column name is missing or duplicated in this table.
Limit: 20,000 rows, 200 columns and 200,000 cells including headers.The table read, or the result, exceeds the row, column or cell limit, for example more than 200 columns after a split.
Invalid CSV. Check quoting and the delimiter.Quotes do not pair up, or the wrong CSV delimiter is selected.
A cell cannot exceed 32,767 characters.A merged cell would exceed 32,767 characters, Excel’s per-cell limit.
Cannot decode using this encoding. Choose the correct encoding and read again.The text file is not in the selected encoding, for example a Windows-1252 file read as UTF-8.
  • “Download XLSX” stores every value as text, so codes like 001 keep their leading zeros. CSV gets a UTF-8 BOM, and “CSV formula protection (prefix dangerous cells with an apostrophe)” is on by default, adding an apostrophe before text that starts with =, +, - or @.
  • “Continue to cleanup and dedupe” hands the result to the table deduplicator as XLSX, together with the “First row contains headings” setting.

Sources

Frequently asked questions

Does whitespace count as an empty value when splitting?

No. Splitting uses the literal separator, at every, the first or the last occurrence.

Can I keep the source column?

Yes, you can retain source columns.

Can I deduplicate afterwards?

Yes. Hand the result to the duplicate-row remover with one click.