tsvkit.org
TSV Toolkit
Sample data Say hi →

Insert TSV Column

new column at any position · constant value or blank

Put a new column at a specific position rather than at either end — the operation you need when a consumer expects a fixed column layout and you're missing one in the middle. Name it, choose the 1-indexed position it should occupy, and everything from there rightward shifts one place.

insert column
Drop a .tsv file here, or
ready

How to use

  1. Paste or drop the file.
  2. Name the new column and set the position — 3 makes it the third column.
  3. Set the fill value, or leave it blank for an empty placeholder column.
  4. Copy or download.

Inserting shifts everything after it

That's the point, and it's also the risk: anything downstream that reads by position ($4 in awk, a loader with a fixed field map, a script using column indexes) is now reading the wrong field. If you control the consumer, prefer appending and addressing columns by name — it can't break a positional reader because nothing moves.

Insert is the right call when the positional layout is the requirement: a fixed-format import, a file that must match a template someone else defined, or restoring a column that was deleted from the middle.

Related operations

Prepend and append are the same thing at the two ends. To reorder existing columns instead of adding one, extract columns and list them in the order you want. For a computed rather than constant value, combine columns derives one from others and join brings values in from a second file.

FAQ

What if the position is past the last column?

The column is added at the end, which is the same as appending. No error — there's nothing ambiguous about it.

Is the position 0-indexed or 1-indexed?

1-indexed, matching every other column reference on this site: position 1 is the first column.

Can the value vary per row?

No, it's a constant. Fill it afterwards in the grid editor, or with fill empty cells if a forward-fill or a computed default will do.

Can I insert several at once?

One per pass. For a wholesale layout change, extract columns in the desired order is usually fewer steps.

Privacy

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