Conversion Tools100% Client-Side

Swap Two TSV Columns

Swap two TSV columns when your data already has the right shape but a pair of fields needs to exchange positions. Enter the two numbers counting from the left. The converter swaps those cells on every row and leaves the rest of the record in place. This is useful for matching the order expected by a spreadsheet or importer while retaining tab separators and the current row order.

Configuration Options
Input
16 chars•2 lines
Output

How to Use the Swap TSV Columns Online

  1. 1Paste the TSV range and count the two positions you need to exchange. Use the heading row to identify the fields if names are present.
  2. 2Enter the numbers under First Column and Second Column. Start counting at 1 and include any blank positions in that count.
  3. 3Review a regular row and any short rows. A missing target position can become an empty field during the swap.
  4. 4Copy the result into the destination after checking that the headings and example values now occupy the expected positions.

Input & Output Examples

Set First Column to 1 and Second Column to 3. The group remains at position 2 and the ID retains its zeros.

Input Sample
name	group	id
Tea	Drinks	007
Expected Output
id	group	name
007	Drinks	Tea

Set First Column to 2 and Second Column to 3. The short row gains an empty field where count was missing.

Input Sample
route	stop	count
A	River	4
B	Lake
Expected Output
route	count	stop
A	4	River
B		Lake

Practical Developer Workflows

  • Match the field order required by a tab-delimited importer that reads positions instead of names.
  • Move a category ahead of its description for review while preserving the rest of the export.
  • Test whether a tab-delimited reader handles reordered headings and correctly associates the data cells.

Zero Server Uploads & Complete Privacy

Runs 100% in your browser; no data is uploaded to any server.

Notice a bug, calculation error, or outdated info?

Let us know directly so our engineering team can fix it.

Frequently Asked Questions

Yes. The numbers can refer to any two positions you intend to exchange. The fields between them stay in place, and the order of the rows also remains the same.

Explore Other Tools

12 suggested tools

View all tools