CSV Column Editor: Insert, Swap and Check Columns
Insert a new column into a CSV, swap two columns, or find rows with missing or extra cells. Free, and it runs entirely in your browser.
What is a CSV column editor?
A CSV column editor changes the columns of a table saved as comma separated text, without opening a spreadsheet. It does three jobs that come up often when you prepare a file for import: add a column, swap two columns, and find the rows that do not have the right number of cells.
Adding a column is handy when a system wants a field your file does not have. Maybe a shop import needs a Status column set to “active” on every row, or you have a separate list of email addresses that belongs next to each name. You choose where the column goes, give it a header, and fill it with nothing, with the same text on every row, or with your own list of values, one per line.
Swapping is for when the columns are in the wrong order. Some importers read columns by position, not by name, so First name and Last name the wrong way round means every customer gets a strange name. Pick the two columns by header and they trade places on every row.
Finding incomplete rows helps when an import fails with a vague error. One row with a missing cell, or an extra comma that splits a value in two, is enough to break it. The tool counts the cells in each row, compares them with the header, and lists every line that does not match, such as Line 5 with 3 columns when 4 were expected. It can also flag empty cells.
The editor understands CSV quoting. A value wrapped in double quotes may hold commas, quotes written twice, or line breaks, and it still counts as one cell. Quoting is kept correct when the file is written back. Everything runs in your browser. Your file is not sent anywhere.
How to use the CSV column editor
- Paste your CSV into Your CSV. A short sample is there so you can try each action first.
- Choose what to do: insert a column, swap two columns, or find incomplete rows.
- To insert, pick where the column goes: at the start, at the end, or after a named column. Type a header, then choose to leave it empty, fill it with the same text, or paste values one per line.
- To swap, pick the two columns from the lists. If your first row is not a header, turn that option off and the columns are listed by number.
- To check, read the list of lines that have too few or too many cells. Turn on the empty cell option if blank values count as missing for you.
- For insert and swap, copy the new table from the Result box with the copy button.
FAQ
Do line numbers count the header row?
Yes. Line numbers are the lines of the text you pasted, so when the first row is a header, the first data row is line 2. A blank line in the middle is listed as an empty line.
What if my value list is shorter than the table?
Rows without a value get the fill text you chose, which is empty by default, so every row keeps the same number of columns.
Can I put the new column in the middle of the table?
Yes. Choose to place it after a column, then pick that column from the list of headers. The new column appears right next to it on every row.
Why does a row with a comma inside quotes not count as extra columns?
Because a comma inside double quotes is part of the value, not a separator. A cell like “Hanoi, Vietnam” is one cell. Only commas outside quotes split columns.
Is there a limit on how many problems it lists?
The list shows the first 200 problems and then tells you how many more there are. Fix those, paste the file again, and the next ones appear.
Is my file stored or uploaded?
No. Every change happens inside the page on your own device. Nothing is uploaded, and the data is gone when you close the tab.