CSV Column Tool: Delete, Reorder & Swap Columns
Columns
Untick a column to delete it. Use the arrows to change the order. The result updates as you go.
About this tool
Delete the columns you do not need and put the rest in the order you want, using a list of your columns instead of column numbers. Paste CSV or TSV (or open a file), untick the columns to drop and move the others up or down. Swapping two columns is just moving one past the other.
Everything runs in your browser. Your file is never uploaded.
How it works
- The input is read as CSV: items in double quotes may contain the separator, doubled quotes and even line breaks without being split. Quotes are added back in the result only where an item needs them.
- With First row is a header on, the column list shows the header names and a sample value; otherwise the columns are named Column 1, Column 2, and so on. The header row is never treated as data, and it moves with the columns it belongs to.
- Rows with fewer items than the widest row are padded with empty cells, so the result is a full rectangle. Empty lines are dropped.
- A file is read as UTF-8, and a byte order mark at the start is removed. If accented letters or other characters look broken, the file is probably in another encoding such as Windows-1252 or Shift_JIS: open it in a spreadsheet, save it as "CSV UTF-8", and try again.
- The download is UTF-8. Excel on Windows may show non-English characters wrongly when you double-click a UTF-8 file that has no byte order mark, so tick the byte order mark option if you plan to open it that way. Other programs do not need it.
- Files up to 20 MB are accepted, and up to 500 columns.
FAQ
Q. How do I swap two columns?
A. Move one of them past the other with the arrows. For columns that are far apart, move one next to the other first.
Q. Can I keep only a few columns of a very wide file?
A. Click Delete all, then tick only the columns you need. Their order in the list is the order in the result.
Q. Is a TSV file from Excel supported?
A. Yes. Copy cells from Excel and paste them here: pasted cells are tab-separated and are detected automatically.