Merge Text and CSV Files

Join a whole folder of TXT, CSV or LOG files into one — in the right order, with only the first header row kept.

100% private — runs entirely in your browser. Your data is processed on your device and never sent to the internet.

The files are read in your browser. Nothing is uploaded and none of them is changed.

About merging text and CSV files

On Windows the one-liner is copy /b *.csv all.csv. It works, and then you open the result and find thirty header rows scattered through the data, the files in the wrong order, and a stray character at the start of row 5000.

That is not a bug in copy. It is copy doing exactly what it was asked: gluing bytes together, with no idea that these are CSV files with headers, or that they were saved in different encodings.

This tool knows. Pick a folder or a handful of files, choose how they should be ordered, and get one clean file.

How to use it

  • Click Choose a folder of text or CSV files, or or choose single files to pick a few by hand
  • Set Only these types to csv or txt if the folder holds other things
  • For CSV, tick Keep only the first header row
  • Check the order in the list — the files are joined top to bottom
  • Press Merge them, then save the result

The four things `copy /b` gets wrong

  • Headers. Thirty exports means thirty header rows. Tick one box and only the first survives — this is the reason most people come looking for a tool
  • Order. *.txt is expanded alphabetically, so file10 comes before file2. Here the digits are compared as numbers, so the order is the one you meant. You can also join oldest first, newest first, or biggest first
  • Line endings. A CRLF file followed by an LF file gives a result some programs read as one enormous line. Every part is normalised to the ending you choose
  • The byte order mark. copy /b glues those together too, so an invisible character lands in the middle of the file and the first column of a row silently stops matching. Every part's mark is stripped, and at most one is written at the start

Encodings

If a folder of exports came out of an old system, the accents will be wrong. Choose what those files really are — Windows-1252 for Western European, Windows-1251 for Cyrillic, Shift-JIS, EUC-KR, GBK or UTF-16 — and everything is converted to UTF-8 on the way out.

Left on Work it out, a byte order mark decides it and UTF-8 is assumed otherwise, which is right for almost every modern file.

The other options

  • Put between files — a separator line written between each part, useful when the parts are log files from different days
  • Write the file name before each part — a ===== report-03.csv ===== banner, so you can still tell where each block came from
  • Drop blank lines — for exports padded with empty rows
  • Include subfolders — off means only the top level

What people use it for

  • Combining a year of monthly CSV exports into one file for a pivot table
  • Joining daily log files into one before searching them
  • Merging chat or email exports split across many files
  • Putting survey or form responses from several files into one sheet
  • Assembling a book or notes written as one file per chapter
  • Building one word list or dataset out of many

Good to know

  • Nothing is uploaded, and none of your files is changed — the merged file is a new one you save
  • Works in every browser, including Firefox and Safari: this tool only ever reads
  • On iPhone, iPad and Android you can pick single files, but not a whole folder — mobile browsers do not allow it
  • Files larger than 64 MB each are skipped, and the number skipped is shown
  • Binary files that get through a filter are joined as text, so keep the type filter honest
  • The saved file is UTF-8 with a byte order mark, so Excel opens it with the accents intact
  • The preview shows the first few thousand characters; the saved file always has everything

Related tools

We add new tools regularly — subscribe on YouTube to be notified when each one goes live.

More tools

View all

Recommended Apps

View all