Staaarter

CSV Cutter

Keeps only the columns you specify (a comma-separated list of 0-based indices and/or exact header names) in the order given, dropping every other column, similar to the Unix `cut` command. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-29
By Staaarter Team
multi-filereshape

Overview

Introduction

A wide CSV export often has far more columns than you actually need for a given task. This tool keeps only the ones you specify, by index or by name, and drops the rest.

It also doubles as a column reordering tool, since the output follows the order you list columns in.

What Is CSV Cutter?

A Unix `cut`-style column selector for CSV: give it a comma-separated list of 0-based column indices and/or exact header names, and it keeps only those columns, in the order given.

Every row (including the header) is trimmed down to just the requested columns.

How CSV Cutter Works

The CSV is parsed and padded to a rectangular grid. Each entry in the column list is resolved to a 0-based index: a purely numeric entry is used directly, and anything else is looked up against the header row's exact text.

Every row is then rebuilt using only the resolved indices, in the order they were requested, and re-serialized to CSV.

When To Use CSV Cutter

Use it to strip a wide export down to just the columns relevant to your current task.

It's also a quick way to reorder a small number of columns without reordering the whole file by hand.

Features

Advantages

  • Accepts either column indices or exact header names, mixed freely in the same request.
  • Doubles as a column-reordering tool, since output order follows the order columns are listed in.
  • Clearly errors out on an unrecognized column name instead of silently dropping it.

Limitations

  • Header names must match exactly, including case and whitespace; there's no fuzzy or partial matching.
  • It can't compute a derived column - it only selects and reorders existing ones.

Examples

Keeping and reordering two columns

Input

id,name,email,active
1,Ada,[email protected],true

Output

email,id
[email protected],1

Requesting "email,id" keeps only those two columns and puts email first, matching the order they were listed in.

Best Practices & Notes

Best Practices

  • Prefer header names over numeric indices when the column order in the source file might change later.
  • Double-check for exact case and spacing when a header-name lookup fails - it's an exact match, not fuzzy.
  • Use this after CSV Cell Filter if you want to both narrow rows and reduce columns in one pipeline.

Developer Notes

Column resolution treats a purely numeric, integer-formatted entry as an index and anything else as a header-name lookup, so a header literally named "3" would need to be referenced positionally instead of by that literal text.

CSV Cutter Use Cases

  • Trimming a wide export down to just the handful of columns a downstream tool needs
  • Reordering a small number of columns without manually rearranging the whole file
  • Extracting a single column's worth of data alongside a unique identifier column

Common Mistakes

  • Expecting a partial or case-insensitive header match; column names must match the header row exactly.
  • Listing a column twice by accident and being surprised by a duplicated column in the output.

Tips

  • List an ID or key column first so the output stays easy to cross-reference with the original file.
  • Use CSV Column Counter first to double-check available column indices before cutting by number.

References

Frequently Asked Questions