Exchange the position of any two columns in a CSV file.
Runs entirely in your browser.
Swap Two Columns in a CSV File
CSV Input
Output
Input separator: Column A: Column B:
About Swap CSV Columns
Give the two column numbers, counting from 1, and their contents are exchanged for every row including the header. Everything else keeps its position.
This is a common last step before an import that expects a fixed column order - a system wanting last_name, first_name when the export gave them the other way round.
Other CSV Tools
- Change CSV Separator — commas to semicolons, tabs or pipes
- Transpose CSV — swap rows and columns
- Find Incomplete CSV Records — rows with missing or extra fields
- Insert a CSV Column — add a column at any position
- CSV to TSV — and back
- CSV to XML — and back
- CSV to YAML — and back
- TSV to JSON — and back
- JSON to CSV — and back
- CSV Viewer — browse a CSV as a sortable table
- CSV to Markdown — build a Markdown table