About the CSV Column Swapper
Imports often fail because two columns are in the wrong order, such as last name before first name or latitude before longitude. This tool swaps the positions of any two columns in a CSV. Paste the file, name the two columns by number or header name, and they trade places in every row, including the header. Everything else stays where it is. Separators for comma, semicolon, tab and pipe files are detected automatically and quoted values are preserved. The swap is made in your browser, and your data is never uploaded.
Updated October 2026
How to use the CSV Column Swapper
- 1Paste your CSV into the box.
- 2Enter the first column to swap, by number or header name.
- 3Enter the second column.
- 4Keep the header option ticked if the first row has names.
- 5Copy the result or download the new CSV.
Why column order matters
Some systems read a CSV by header names, but many read by position. A contacts import that expects email in column 3 will put the wrong data in the wrong field if your file has it in column 2. Swapping two columns is the smallest fix and leaves everything else untouched.
The same quick fix helps with coordinates, where one program wants latitude then longitude and another expects the reverse.
Numbers or names
Header names are easier to remember, and they keep working if you process the same kind of file next month. Numbers start at 1 and are better when two columns share a title. You may use a number for one column and a name for the other.
If the two columns you name are the same, nothing changes and the tool says so.
After swapping
Check the first lines of the result against your target system's sample file. If you still need a different order, you can swap again or reorder with the extractor. Keep your original file in case you need to start over.
Common uses
Swap first name and last name when an export puts them in the opposite order to your import template. Swap latitude and longitude for a mapping tool that expects the other order. Swap debit and credit columns in a bank statement export so that the signs match your accounting software.
In each case the swap affects the header row as well, so the labels stay with their data.
Once swapped, copy the result straight into your import form or download it as a file. If the result is still not what the importer wants, swap another pair, or choose the exact order you need with the column extractor. To drop columns you do not need, use the CSV Column Remover, and the CSV Tools page lists every CSV helper.
Features
- Swap any two columns
- Choose by number or header name
- Header names move with their columns
- Handles quoted values
- Comma, semicolon, tab and pipe files
- Private: nothing is uploaded
Frequently asked questions
How do I swap two columns in a CSV?
Paste the CSV, type the two columns in the two boxes, and copy the result. With the sample, swapping 1 and 2 puts last before first in every row.
Can I swap columns by name?
Yes, if the first row is a header row. Type the header names, such as first and last. The names travel with their columns.
Does it change any other column?
No. Only the two columns you chose trade places, and all other columns keep their position and values.
What if I need to move more than two columns?
Run the swap several times, or use the CSV Column Extractor, which lets you list all the columns in the order you want.
Why swap columns before an import?
Many importers read columns by position, not by name. If the position is wrong, the first name can land in the last name field. Swapping fixes this without opening a spreadsheet.
Is my file sent anywhere?
No. The swap happens in your browser and the CSV stays on your device.