Conversion Tools100% Client-Side

Swap Two CSV Columns

Paste CSV and choose two field positions to exchange across the table. Each row switches the values in those positions, so the headings move with their data when the first row contains column labels. Fields between the two positions stay where they were. This helps when an importer expects two columns in the opposite order or you need to compare the same table under a different field arrangement.

Configuration Options
Input
35 chars•2 lines
Output

How to Use the Swap CSV Columns Online

  1. 1Paste the entire table, then count the two fields you want to exchange from left to right. The first column is 1.
  2. 2Enter their positions under First Column and Second Column. The fields can be adjacent or separated by other columns.
  3. 3Review the output heading row and several data rows. Check whether a short row lacked a field at either position.
  4. 4Copy the reordered CSV and compare the new positions with the field order the destination expects.

Input & Output Examples

Set First Column to 1 and Second Column to 3. Score stays in the middle while site and state exchange positions.

Input Sample
site,score,state
A,12,ready
B,7,queued
Expected Output
state,score,site
ready,12,A
queued,7,B

Set First Column to 1 and Second Column to 2 to exchange adjacent fields.

Input Sample
name,zone
Tea,North
Coffee,South
Expected Output
zone,name
North,Tea
South,Coffee

Practical Developer Workflows

  • Adjust a source export for an importer that has two field positions reversed.
  • Move two headings and their data together without disturbing the fields between them.
  • Set up a test fixture with a changed field order before checking that a CSV reader handles it.

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. Choose any two positions that exist in the table. Only those two selected fields switch in each row. Fields between them keep their positions, which is useful when the destination only needs a pair exchanged.

Explore Other Tools

12 suggested tools

View all tools