Skip to main content
L
Loopaloo
Buy Us a Coffee
All ToolsImage ProcessingAudio ProcessingVideo ProcessingDocument & TextPDF ToolsCSV & Data AnalysisConverters & EncodersWeb ToolsMath & ScienceGames
Guides & BlogAboutContact
Buy Us a Coffee
L
Loopaloo

Free online tools for developers, designers, and content creators. Your files are processed in your browser and are never uploaded - no accounts required. A few network utilities (like What's My IP and Currency Converter) call public APIs to do their job and say so on their pages.

support@loopaloo.com

Tool Categories

  • Image Tools
  • Audio Tools
  • Video Tools
  • Document & Text
  • PDF Tools
  • CSV & Data
  • Converters
  • Web Tools
  • Math & Science
  • Games

Company

  • About Us
  • Contact
  • Blog
  • FAQ

Legal

  • Privacy Policy
  • Terms of Service
  • Disclaimer

Support

Buy Us a Coffee

© 2026 Loopaloo. All rights reserved. Built with privacy in mind.

Privacy|Terms|Disclaimer
  1. Home
  2. CSV & Data Analysis
  3. CSV Column Filter
Add to favorites

CSV Column Filter

Keep and reorder chosen columns, with the list built from the widest row so a field beyond the header is not dropped

Rows never leave your deviceMore csv & data analysisJump to full guide

Initializing in your browser…

You might also like

CSV Row Filter

Filter rows with each condition stating its rule: a cell that is not a number does not match a comparison, and an empty cell is not a zero

CSV Column Renamer

Rename columns under a stated convention, with two that would end up with the same name numbered rather than left to collide

CSV Sorter

Sort by any number of columns, with the comparison stated: numbers by value, dates by day, text by a collation you choose

A sample run

A file whose header names three columns and whose second data row has five fields. Two of those fields have no column name, and a tool that builds its list from the header cannot see them at all.

contacts.csv

id,name,email
1,Alice,alice@x.com
2,Bob,bob@x.com,extra-1,extra-2
3,Carol
What CSV Column Filter produces

The column list, and keeping columns 1, 4 and 5

id · name · email · Column 4 (beyond the header) · Column 5 (beyond the header)
2 columns exist only because some rows have more fields than the header names:
columns 4, 5. RFC 4180 section 2.4 asks for one width, and this file has 3.

id,,
1,,
2,extra-1,extra-2
3,,

6 cells carried, 6 written as empty because the row was too short, 7 dropped, 13 in

The previous version built its column list from the width of the header row, so this file had three columns as far as it was concerned and extra-1 and extra-2 could not be selected, previewed or exported. The width is the width of the widest row now. The counts underneath are the other half of the answer: six cells came from the file, six are empty because those rows have no such field (which is a different fact from the file holding an empty value), and six plus seven dropped is the thirteen cells that went in.

Picking Columns, Including the Ones the Header Does Not Name

Choose which columns to keep and what order they come out in. Every cell is carried across as the string it was, and the column list is built from the widest row in the file rather than from the header, so a field that only some rows have is a column you can select rather than one that disappears.

How to use

  1. 1Upload your CSV file, or load the sample
  2. 2Check the columns to keep; each one shows its position and how many rows have a value in it
  3. 3Drag, or use the arrows, to set the order they come out in
  4. 4Read the notes: a file with rows wider than its header says so
  5. 5Apply, check the preview, and download

Key features

  • The column list built from the widest row, so a field beyond the header is selectable rather than silently dropped
  • Columns that exist only in the data marked as beyond the header, with the file's row widths reported
  • Two columns of the same name told apart by their position
  • A column with an empty header labelled by its position rather than renamed
  • Every cell carried across as the string it was: no trimming, no number parsing, no date guessing
  • Cells written as empty because a row was too short counted separately from values that are empty
  • Cells carried plus cells dropped shown against every cell that went in
  • Reordering by dragging or with arrows, and a search box for a file with dozens of columns
  • All, None and Invert for the whole selection at once
  • A live preview of the trimmed and reordered result, computed by the same code as the download
  • RFC 4180 output: CRLF records, minimum quoting, and a UTF-8 byte order mark
  • Single-column CSV files load, instead of being refused as undelimited
  • 200,000 rows described in about 25 milliseconds and projected in about 15

How it works

This is a pure column operation: it changes which columns appear and in what order, and never rewrites a value. No number, date or currency is parsed, so leading zeros, currency symbols and date formats come out as they went in. Measured on 2026-09-02 by reading the download back with Python's csv module and comparing it cell by cell against the selected columns of the input: 81 browser checks and 118 module assertions pass, and every cell in every fixture is identical.

The fault the pass found was in the column list rather than in the copying. The list was built from `data[0].length`, the width of the HEADER ROW. RFC 4180 section 2.4 says every line should have the same number of fields and real files depart from that constantly, so on a file whose header names three columns and whose third row has five fields, the tool offered three columns, dropped the other two, and gave no way to reach them. The same fault turned up in the file comparator in the previous batch. The width is the width of the widest row now, columns that exist only in the data are listed and marked "beyond the header", and the page says how many row widths the file has.

Two columns can share a header name, which is legal CSV and impossible to act on from a list of names. The picker showed two entries both reading "name" with nothing to tell them apart. Each column now carries its position, so they read "name (column 2)" and "name (column 3)", and the page says why.

A row narrower than your selection has no cell for the missing column. Writing an empty string there is reasonable and it is not the same fact as the file holding an empty value, so those cells are counted separately and reported. The counts below the preview add up: cells carried plus cells dropped is every cell that went in.

One premise this pass started from did not survive measurement, and it is recorded because the measurement wins. The projection was written `row[index] || ''`, which looks like a falsy test that would turn a cell holding `0` into an empty string. It does not: every non-empty string is truthy in JavaScript, so `0`, `false` and a single space all survived it, and on a 16 cell fixture built to catch exactly that, 16 of 16 cells were identical. The expression only ever differed from `?? ''` where the cell was absent, which is the padding case above.

A single-column CSV was refused outright, because papaparse reports UndetectableDelimiter for a file with no delimiter in it to detect and every Delimiter-type error was treated as fatal. It loads now. And the download is written by RFC 4180: CRLF records per section 2.1, quoting as a minimum, and a UTF-8 byte order mark so a spreadsheet reads accented and non-Latin headers correctly.

Where this fits a data pipeline

  • Privacy compliance

    Remove sensitive columns before passing data to an external team. Invert the selection when you want everything except a few fields.

  • Preparing an import file

    Trim a CSV down to the exact columns a target system expects, in the exact order it expects them.

  • Rescuing fields a header does not name

    A file whose rows are wider than its header has columns nothing has named. They are listed here and can be selected like any other, which is how you get at data another tool would drop.

  • Reducing file size

    Strip unnecessary columns from a large export before sharing it.

Frequently asked questions

Why does the tool show more columns than my header has?

Because some rows in your file have more fields than the header names them. RFC 4180 section 2.4 asks for one width and files often have several. Those extra columns are real data and are listed as "beyond the header" so you can select them. The previous version built its list from the header alone and dropped them without saying so.

Can I reorder columns at the same time?

Yes. Drag them into the order you want, or use the up and down arrows, and the export follows that order. Reset restores the original order while leaving your checkbox choices alone.

What happens to a row that is narrower than my selection?

The missing cell is written as empty, and the count of those cells is reported separately from cells that really hold an empty value, because they are different facts about your file.

Does it change any of my values?

No. Nothing is trimmed, nothing is parsed as a number or a date, and no value is converted. A cell holding 007, $50, 2024-13-45 or a single space comes out as exactly that string. This was checked by reading the download back with a separate CSV implementation and comparing every cell.

My file has two columns with the same name. Which is which?

They are listed with their positions, as "name (column 2)" and "name (column 3)", and a note says why. Two columns sharing a header is legal CSV, and a list of bare names cannot tell them apart.

Related tools and how they differ

  • CSV Row Filter: Keeps or drops whole ROWS using conditions (24 operators, nested AND/OR groups); use it when you need to filter records by value, not pick columns.
  • CSV Column Renamer: Changes what the columns are CALLED rather than which ones are there, with a naming convention applied across the whole header.

Private by design

Rows and columns are parsed and transformed in memory in your browser. No record ever reaches a server.