CSV reorder columns

Reorder, swap, or drop CSV columns to a target order — by name or index. Runs entirely in your browser, no upload.

Reordered CSV

About this tool

CSV reorder columns rearranges a CSV's columns to the exact order you want — and drops the ones you leave out.

Give a target order as a comma-separated list of column names (when the first row is a header) or 1-based indices:

Columns you don't list are dropped. Works with , / tab / ; / | delimiters.

Privacy

Everything runs in your browser via WebAssembly — your CSV is never uploaded. Also available from the gizza CLI and in chat.

Common uses

FAQ

How do I drop columns I don't want?

Just leave them out of the target order. Only the columns you list are kept — so with a name,age,city file, entering name,city returns those two columns and silently drops age. There's no separate "delete column" option; the list is the output schema.

My CSV has no header row — can I still reorder it?

Yes. Untick the header option and address columns by 1-based position instead: 3,1,2 puts the third column first. An index outside the file's width (e.g. 9 in a 2-column file) is rejected with an out-of-range error rather than producing empty columns. When a header is present, each entry is matched against the header names first and only treated as a number if no name matches.

Can I duplicate a column?

Yes — repeat its name or index in the list. name,city,name outputs the name column twice, which is handy when two downstream systems expect the same value under different positions.

Does it only work with commas?

No. The delimiter option accepts comma (default), tab, semicolon, pipe, or any other single character. The same delimiter is used for reading and writing, so a tab-separated file stays tab-separated.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool csv-reorder-columns "name,age,city
Ada,36,London" 'columns=city,name'

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/csv-reorder-columns/?data=name%2Cage%2Ccity%0AAda%2C36%2CLondon&columns=city%2Cname&header=true&delimiter=%2C

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.