tsvkit.org
TSV Toolkit
Sample data Say hi →

Prepend TSV Column

new first column · constant value or blank

Insert a column at the front of the file, with a name and an optional constant value repeated down every row. The two things this is for: tagging rows with their provenance before merging files, and adding an ID or status column that something downstream expects in first position.

prepend column
Drop a .tsv file here, or
ready

How to use

  1. Paste or drop the file.
  2. Name the new column — it becomes the first header.
  3. Set the fill value, or leave it blank for an empty column you'll populate later.
  4. Copy or download.

The provenance pattern

When you're about to combine several exports with merge, add a constant column to each one first — source = jan, source = feb — and the merged file tells you where every row came from. Without it, that information is gone the moment the files are stacked, and no amount of later analysis recovers it. It's the single most useful habit for anyone who regularly pools data files.

For a sequential counter rather than a constant, add row numbers does that with a configurable start, step, and zero padding.

Position matters less than you think

Most tools address columns by name, so whether a column is first or last rarely matters — append column is the same operation at the other end, and insert column puts one anywhere. Position matters when the consumer is positional: a loader with a fixed column mapping, a naive script using $1, or a human who wants the identifier where they can see it.

FAQ

Can the value differ per row?

No — it's a constant. For per-row values, add the column then fill it in the grid editor, or bring the values in from another file with join.

Can I add several columns at once?

One per pass. Run it repeatedly, or add them at the end with append column and reorder with extract columns.

What if the file has no header?

The name is still written as a new first row, which effectively gives the file a one-column header. Header tools is the better route for a headerless file — it can add a full header row.

Does it renumber anything?

No. Existing columns keep their names and their relative order; they just all shift one position right.

Privacy

100% client-side. No upload. See the privacy policy.