CSV Column Reorderer

Put important columns first.

Use this tool

Input CSV format
Output CSV format

Parsed table

Result

The result appears in this panel after you run the tool.

About this tool

The listed columns move to the front of every row. Columns you leave out stay after them. The result is written from the reordered cells with the output delimiter.

How to use it

  1. Paste a table or open a file.
  2. List column numbers in the order they should appear, starting at 1.
  3. Use Reorder columns.

Limitations

Named columns jump to the front

The list is a prefix, and everything else follows

The input dialect splits rows. You type column numbers starting at one. Those columns are written first, in the order typed. Columns you did not type are written after them, still in their old relative order. This is not a full permutation you spell for every position. Omitting a number does not delete that column. It parks the column in the tail. If deletion is what you wanted, the deleter is the page that drops indexes. If you wanted only the listed columns, the extractor drops the tail.

A repeated number copies the column once per mention at the front, and the tail filter then treats that index as already claimed, so the original position is not also kept. A short row supplies an empty cell for a listed index it does not have. The tail of a short row is whatever cells it actually had, minus the claimed indexes. The output dialect writes the new order. Quotes are decided from the new separator, not remembered from the old file’s quote marks.

Headers move with their columns

When the first row is a header, its cells move with the data under them. The preview still follows the input header flag. The reorder does not rename anything. A header that lands in front stays the header cell of that column. Data rows are reordered with the same indexes, so a value does not stay behind under the wrong name unless the source rows were already ragged in a way the indexes cannot see.

Why the tail surprises people

Users sometimes type 3,1 and expect a file that contains only those two columns. They get column 3, column 1, then column 2, then the rest. Read the tail before you replace a source. The delimiter can change in the same run, which is useful when a spreadsheet export should become comma-separated while a key column moves left. Set the input dialect accurately first. A wrong separator assigns the numbers to the wrong fields, and the new order faithfully preserves that mistake.

Privacy

Your input is processed in your browser and is not uploaded to UtilChain. File names, text, and results are not sent to analytics.