Swap CSV Columns
Select two columns in your CSV data and instantly swap their positions
Pick two columns in any CSV file, hit swap, and the entire dataset rearranges in a second — headers included, quoted fields intact. The tool auto-detects commas, tabs, and semicolons so you don’t have to think about delimiters. And everything runs in your browser. Nothing gets uploaded.
How It Works
The parser splits your CSV line by line, respecting quoted fields so commas inside values don’t cause problems. Once you pick Column A and Column B, every row gets those two values flipped. Headers move with their data. The output re-quotes any field that needs it, keeping the file valid for whatever you’re importing into next.
Examples
Fixing column order for a CRM import
Your export has First Name in column 1 and Email in column 3, but Salesforce expects Email first.
First Name,Age,Email
Alice,30,[email protected]
Bob,25,[email protected]
Email,Age,First Name
[email protected],30,Alice
[email protected],25,Bob
Reordering product data with quoted fields
Product descriptions contain commas, so they’re wrapped in quotes. The tool handles that without breaking anything.
SKU,Description,Price
A100,"Widget, large",29.99
B200,"Gadget, small",14.50
Price,Description,SKU
29.99,"Widget, large",A100
14.50,"Gadget, small",B200
Tab-separated server logs
Auto-detects tabs as the delimiter. Swap Timestamp and IP columns so the IP comes first for your firewall analysis script.
Timestamp IP Status
2024-01-15 192.168.1.5 200
2024-01-15 10.0.0.3 404
IP Timestamp Status
192.168.1.5 2024-01-15 200
10.0.0.3 2024-01-15 404
Who Uses This
Reorder CSV columns to match an API or database import schema without writing a script.
Fix column order in exports before loading them into BI tools like Tableau or Power BI.
Rearrange contact list columns so email platforms accept the upload on the first try.
Align CSV column order with table schemas before running bulk inserts.
Common Mistakes
The tool will warn you if Column A and Column B are identical. Pick two different columns — otherwise there is nothing to swap.
If some rows use commas and others use tabs, the parser picks whichever delimiter appears most often. Clean up inconsistent delimiters before pasting, or the columns won’t line up right.
Headers get swapped too — that’s the correct behavior. But if your first row is actually data and not headers, the column dropdowns will show data values as labels. Not a bug, just something to be aware of.
Technical Details
- Processing: 100% client-side — your data never leaves the browser
- Browser Support: Chrome, Firefox, Safari, Edge
- Delimiters: Auto-detects comma, tab, and semicolon
- Quoted Fields: Handles RFC 4180 quoted values with embedded commas and newlines
- File Size: Limited only by your browser’s memory (tested up to ~50 MB)
Frequently Asked Questions
Does swapping columns change the data inside cells?
No. The cell values stay exactly the same — only their position in each row changes. Quoted fields, numbers, dates, and special characters all come through untouched.
Can I swap more than two columns at once?
One pair at a time. If you need to rearrange three or more columns, run multiple swaps. Each swap takes about a second, so even a few rounds is faster than doing it manually in a spreadsheet.
Is my CSV data sent to a server?
It is not. Everything runs in JavaScript inside your browser tab. No network requests, no server storage, no analytics on your file contents. Close the tab and the data is gone.
What if my CSV uses semicolons instead of commas?
The parser auto-detects the delimiter by scanning the first few rows. Semicolons, tabs, and commas are all supported. The output keeps whichever delimiter your original file used.
Can I use this tool on a phone or tablet?
Yes. The layout adjusts for smaller screens. You can paste CSV data or upload a file from your device. The swap and download buttons work the same way as on desktop.