Reorder CSV Columns
Some import screens and database loaders read columns by position rather than by name. When an export puts email before id, the loader can write addresses into the identifier field without any error message. This tool moves the columns you name to the front, in the order you name them, and leaves every other column behind them in its original sequence.
You list only the columns that need to move. Nothing is removed, and the unlisted columns are not renamed or rearranged among themselves.
Key features
- Listed columns moved to the front in the order you type
- Unlisted columns kept in their original relative order
- Values and row order left untouched
- Clear message for an unknown or repeated column name
About the CSV to CSV with reordered columns format
The output header is the listed columns in the order you typed them, followed by the unlisted columns in their original relative order. Each value travels with its column, and rows keep their sequence. To drop columns instead of moving them, use Remove CSV Columns, since this tool never discards data.
Names are matched against the header row ignoring letter case. A name may be listed only once. Any name that does not match an existing header stops the run.
How it works
The tool resolves every name in your list to a header, builds a new header order from those matches followed by the remaining headers, and rebuilds each record so its values line up with the new order.
Common use cases
- Moving the primary key to the first column before loading a table that expects it there.
- Putting a total column at the far right of a report after the export placed it in the middle.
- Moving the amount column next to the date so a ledger reads left to right.
- Matching the column order of a reference file so the two can be compared row by row by eye.
How to use this tool
- Provide the CSV, pasted or uploaded, with its headers in the first line.
- Type the columns to move first, separated by commas, in the order they should appear.
- Check the first record in the preview to confirm the leading columns.
- Download the file once the leading columns look right.
Example
Input (one record)
id,name,email,plan,city
7,Ada,ada@example.com,pro,LondonOutput with columns plan, id
plan,id,name,email,city
pro,7,Ada,ada@example.com,LondonTips for best results
- A short list is enough. Name the two or three columns that matter and let the rest follow in their original order.
- Scan the header line first, so the order list covers the columns you actually care about.
- When a batch of exports shares one layout, store the order string once and paste it into each run.
Common errors and how to fix them
- Column "plann" was not found. Available columns: id, name, email, plan, city.
- The name has a typo. Compare it with the list in the message and correct the spelling.
- Column "plan" is listed more than once.
- Each column can appear only once in the order list. Remove the repeat; the tool will not guess which position you wanted.
- The column order box is empty.
- Type at least one header name. The remaining columns then follow in their original order.
Frequently asked questions
How do I move a column to the end?
List every other column in the order you want, and leave the target column out. Unlisted columns are appended in their original relative order, so the target lands last.
Does reordering change the row order?
No. Only the columns move. Records stay in the sequence they had in the source file.
For more background on data formats and conversion workflows, read our format guides.