Merge CSV files into one
Several files in, one file out, columns matched by name.
- Matches columns by name
- Any number of files
- Reports column mismatches
- Nothing uploaded
1.Add the files
CSV or TSV. Several at once, or a few at a time.
Why it exists
Merging CSVs by hand goes wrong in one specific way: the files agree on what the columns mean but not on what order they are in, and a naive concatenation silently shifts every value one column left. This matches columns by name, tells you which files were missing which, and fills the gaps with blanks rather than with the wrong data.
What it does
- Takes any number of CSV or TSV files and stacks their rows into one.
- Aligns columns by header name, not by position, so column order can differ between files.
- Names every column that is missing from at least one file, before you commit to the merge.
- Optionally adds a `source_file` column so you can tell afterwards where a row came from.
- Downloads the result as a single CSV.
What it will not silently do
It will not drop a column that only some files have, and it will not guess that two differently-named columns mean the same thing. Both of those are decisions, and it asks rather than assuming.
Questions
- What happens if the files have different columns?
- Every column from every file appears in the result. A row from a file that did not have a given column gets an empty value there. The mismatched columns are listed before you merge, so nothing about it is a surprise.
- Does column order have to match?
- No. Columns are matched by header name. This is the difference that matters: concatenating files by position when the order differs corrupts every row, quietly.
- How many files can I merge?
- As many as the tab has memory for. The practical limit is total size rather than file count.
The longer answer
This page does the job. The guide explains it — including the parts a tool cannot decide for you.
How to merge multiple CSV files into oneConcatenation matches columns by position, so one file with a different header order quietly ruins the result. Here is how to merge by name, and verify it.The other tools
- Open a CSV file onlineDrop a file in. It opens in your browser, and it stays there.Open it
- Run SQL on a CSV fileReal SQL, on your file, without installing a database.Open it
- Remove duplicate rows from a CSVDuplicates on the columns you say identify a row.Open it
- Compare two CSV filesAdded, removed, changed, matched on a key rather than line by line.Open it
- Convert a CSV to PDFA CSV, laid out as a readable table, saved as a PDF.Open it
- Convert a CSV to ExcelA real .xlsx, with nothing in it changed on the way.Open it
- Convert a CSV to JSONEvery row an object, every header a key.Open it
- Convert JSON to CSVA tree, flattened into a table you can open anywhere.Open it
- Convert Excel to CSVEvery sheet of a workbook, out as clean UTF-8 CSV.Open it
- Split a CSV fileOne file too big to use, as several that are not.Open it
- Clean up a messy CSVGermany, germany and “Germany ” become one value again.Open it
- Convert a CSV to SQL INSERT statementsA CSV in, a .sql script any database will run.Open it
- Format and validate JSONValid JSON, pretty. Broken JSON, located and mostly fixed.Open it
- View JSON as a tree or a graphThe shape of a JSON document, before you read a line of it.Open it
- Turn a Markdown outline into a mind mapType a list. See a map.Open it
- Make a printable 30-day challenge trackerThirty boxes per habit, on paper, where you will see them.Open it
- Reverse a videoPlay it backwards, sound and all, without uploading it.Open it