MERGE COLUMNS

Combine two or more columns into one, such as first and last name into a full name or street, city, and state into an address. Pick the columns in order, choose a separator, and skip empty values so you never get doubled separators. A preview shows the first rows before you apply it.

Zero retention: your files never leave this browser. Verify it yourself in DevTools.

Loading the CSV tools.

About Merge CSV columns

How Can You Verify That Your Files Never Leave This Browser?

You do not have to take our word for it. Browser developer tools list every request a page makes, so you can watch 2csv work and confirm that your data is never sent anywhere. The check takes about a minute.

  1. Open your browser developer tools with F12, or Cmd+Option+I on a Mac, and select the Network tab.
  2. Reload the page and let it finish. You will see the page's own files (including the background file parser), its web fonts, and one anonymous page-view request. No file has been chosen yet, so none of them can contain your data.
  3. Click the clear icon in the Network tab so that the log is empty.
  4. Open a CSV file in the Merge CSV columns tool above, run it, and download the result.
  5. Look at the Network tab again. It is still empty. Reading, changing, and saving the file made no request at all. For extra proof, turn on offline mode after the page loads: every tool keeps working.

Your file is read into this tab's memory with the browser's own file reader, parsed and changed by code that is already on the page, and handed back to you as a download. It is never uploaded, never stored in the browser, and gone when you close the tab. The only other request the site can make is the feedback form, and only when you submit it.

The production site also sends a Content-Security-Policy header that tells your browser to refuse connections to anywhere except this site and the anonymous analytics endpoint, so even a bug could not send your data elsewhere.

How Do You Merge Columns?

  1. Pick the columns in the order they should appear. Each choice becomes a chip, so the order is visible.
  2. Type a separator, such as a space, a comma and a space, or a dash.
  3. Name the new column. The default joins the original names with an underscore, such as first_last.
  4. Choose to keep or drop the original columns, check the preview, and apply.

The new column is added to the table, and every other tool and the export bar work on it straight away. Undo keeps the last five changes if the result needs another try.

Why Skip Empty Values?

Skip empty values leaves out blank cells when joining, so the separator is not doubled. Without it, an address with no second line would come out as 12 Main St, , Boston. With it, the same row reads 12 Main St, Boston. The option is on by default because doubled separators are almost never wanted.

What Are Common Column Merges?

  • First name and last name into a full name, with a space.
  • Street, city, state, and ZIP into one address line, with a comma and a space.
  • Year, month, and day into one date, with a dash.
  • A prefix and a number into one ID, such as INV and 1042 into INV-1042.

To reverse a merge later, Split column cuts a column apart at a delimiter. For dates assembled from parts, the column type converter can then turn the result into a clean ISO date.

Is Merging Columns the Same as Merging Files?

No. Merging columns joins values side by side within one file. Stacking several CSV or JSON files into one, one after another, is a different job, handled by 2join. Joining two files on a matching key column, like a database join, is not available in this version of 2csv.

A merged column is plain text, so a merge cannot change the original values; it only copies them into one new cell per row. Keeping the originals until you have checked the result costs nothing, and you can delete them afterwards in the CSV editor.

What Else Can You Do With a CSV Here?

  • CSV viewer: Open a CSV of any size, scroll every row, and see a profile of each column.
  • Sort CSV: Sort rows by one or more columns, as text, numbers, or dates, ascending or descending.
  • Filter CSV: Show only the rows that match an expression such as price > 10 AND state = "NY".
  • CSV validator: Find ragged rows, broken quotes, bad headers, encoding problems, and values of the wrong type.
  • Remove duplicates from CSV: Find and remove duplicate rows, comparing whole rows or only the columns you choose.
  • Trim CSV whitespace: Trim leading and trailing spaces, collapse double spaces, and drop invisible characters and empty rows.
  • Find and replace in CSV: Find text in one column or every column and replace it, with match case, whole cell, and regex options.
  • Remove rows from CSV: Delete rows by number or range, the first or last rows, empty rows, or rows that match a rule.
  • CSV editor: Edit cells, add or delete rows, and add, delete, rename, or move columns.
  • Split CSV column: Split one column into several at a delimiter, such as a full name into first and last.
  • CSV column type converter: Convert a column to clean numbers, ISO dates, true/false, or upper, lower, or title case.
  • CSV to JSON converter: Convert CSV to a JSON array of objects or arrays, or to JSON Lines, with typed values.
  • JSON to CSV converter: Convert a JSON array or JSON Lines to CSV, flattening nested objects into dotted column names.
  • CSV to SQL converter: Turn a CSV into SQL INSERT statements, with an optional CREATE TABLE, for PostgreSQL, MySQL, SQLite, or SQL Server.
  • CSV to TSV converter: Convert a comma-separated file to tab-separated values that paste cleanly into spreadsheets.
  • TSV to CSV converter: Convert a tab-separated file to a standard, properly quoted comma-separated CSV.
  • CSV splitter: Split a large CSV into smaller files of a set number of rows, with the header repeated in each.

All eighteen tools are on the 2csv home page, and once a file is open you can switch between them without reloading it. Part of the 2suite.io privacy-first ecosystem.

Frequently Asked Questions

Can I merge more than two columns?

Yes. Pick as many as you need, in order. The chips show the order and the preview shows the result.

How do I avoid doubled commas when a cell is empty?

Keep Skip empty values on. Blank cells are left out, so the separator only appears between real values.

Can I merge two CSV files here?

Not side by side on a key column. To stack several CSV or JSON files into one, use 2join.

What is the new column called?

By default the original column names joined with an underscore. You can type any name before applying.

Can I change the order of the merged values?

Yes. Values are joined in the order you pick the columns, and the chips show that order. Pick them again in a different order to change it.

Was this helpful?