tsvkit.org
TSV Toolkit
Sample data Say hi →

Split a TSV File

by row count · into N parts · one file per column value · zip download

Break one tab-separated file into many. Split every N rows when something downstream has a row limit, into a fixed number of parts when you're handing work to N people, or grouped by the values in a column — one file per country, per date, per customer. Each part can repeat the header row so every file is independently parseable, and you can grab them one at a time or all at once as a zip.

split
Drop a .tsv file here, or
ready

How to use

  1. Paste or drop the file. Parts appear on the right as soon as it parses.
  2. Pick a mode. Every N rows and into N parts both use the N field; one file per column value uses the Column field instead.
  3. Leave repeat header ticked unless the consumer of these files expects a bare data chunk.
  4. Download individual parts from the list, or Download all (.zip) to get every part in one archive.

Which mode do you want?

Every N rows is for hard limits: an import form that rejects more than 10,000 rows, a spreadsheet that chokes past a million, an API that batches. You get however many parts the arithmetic produces, each with exactly N data rows except the last.

Into N equal parts is for distributing work — four parts for four annotators — and gives you roughly equal sizes rather than a controlled row count.

One file per column value is the useful one for data work: split a sales export by region and get EMEA.tsv, APAC.tsv, US.tsv. Filenames are derived from the value with anything unsafe replaced by a hyphen, and empty values land in empty.tsv. Values are grouped in first-seen order, so the part list mirrors the order the values appear in the file. If a column has hundreds of distinct values you'll get hundreds of files — run value counts first if you're not sure of the cardinality.

About the zip

The archive is built in your browser with no compression (stored entries) — that keeps the code small and the operation instant, at the cost of an archive roughly the size of the original text. Every OS unzip utility reads it. Filenames are stored as UTF-8, so non-Latin column values survive as folder-friendly names.

FAQ

How large a file can it split?

The whole file is held in memory twice over — once as text, once as parsed rows — so the practical ceiling is a few hundred megabytes on a desktop browser, less on mobile. Live re-splitting pauses above roughly 5 MB of pasted text; drop the file instead of pasting and it processes in one go. For genuinely huge exports, split -l 100000 on the command line is the right tool.

Can I control the output filenames?

Only indirectly. Row and part modes name files part-1.tsv, part-2.tsv, and so on; column mode names them after the column value. Rename after downloading if you need a specific scheme.

What happens to ragged rows?

They're carried through as-is — splitting never pads or truncates. If the source file has rows with the wrong number of columns, every part inherits that problem. Run fix ragged rows first if the parts need to be individually valid.

Can I split a file the other way — recombine parts?

Yes, that's merge TSV files. It stacks files on the union of their headers, so parts produced here recombine cleanly even if you edited columns in between.

Privacy

100% client-side. No upload, and the zip is assembled locally too. See the privacy policy.