Tools › Data
CSV Split & Join
Split a large CSV or other delimited file into smaller files of a set number of rows, each with the header row, or join several back into one. Rows are copied exactly as they are, quoted line breaks included.
About this tool What it's for, how to use it and an example
What it's for
Cut a large CSV, TSV or other delimited file into smaller files with a set number of rows each, repeating the header row at the top of every file, or join several files with the same header back into one. Rows are copied exactly as they are, so quoting, delimiters and fields with line breaks inside quotes come through unchanged.
For example, when an import or a SuccessFactors connector takes no more than a few thousand rows at a time, split the full file here and load the pieces one by one.
How to use it
Set Rows per file (data rows, not counting the header) and whether The first row is a header. Both, and the row end marker, are remembered in this browser.
- Split: choose a file, or drop it on the File to split box, then Split and save (ZIP). The ZIP holds
the pieces, numbered in order, such as
users-01.csv,users-02.csv. - Join: choose two or more files, or drop them on the Files to join box, then Join and save. They’re
joined in name order (
-02after-01,-10after-9), keeping the first file’s header. Files whose header row differs are refused, naming the file.
A row normally ends at a line break that isn’t inside quotes. Connector files that end each row with a marker,
such as !##!, need it in Row end marker; a line break straight after the marker belongs to it.
Example
Save this as users.csv and split it with Rows per file set to 2:
id,name
1,"Smith, Alice"
2,Bob
3,Carol
The ZIP holds users-01.csv with the header and the rows for 1 and 2, and users-02.csv with the header and the
row for 3. Join those two files and you get the original back.
Good to know
Files are read as UTF-8. A byte order mark (BOM) at the start is kept on every file made from it. Rows aren’t checked or changed: a file with a wrong number of fields splits as it is (the Data Validator and Connector Checker check rows). With a row end marker, quotes aren’t taken into account, so the marker mustn’t appear inside a field. Blank lines between rows are dropped.
Split
Join
Private: this tool runs in your browser. Nothing you type, paste or choose leaves this page.
Saved you a few minutes? Say thanks with a coffee.
Something wrong with this tool, or missing from it? Report a bug or suggest a feature.