REMOVE ROWS

Delete rows from a CSV the quick way: by row numbers and ranges, the first or last rows, every empty row, rows that match a filter rule, or rows you selected in the grid. The tool shows how many rows will go before anything is removed, and Undo brings them back.

Zero retention: your files never leave this browser. Verify it yourself in DevTools.

Loading the CSV tools.

About Remove rows from CSV

How Can You Verify That Your Files Never Leave This Browser?

You do not have to take our word for it. Browser developer tools list every request a page makes, so you can watch 2csv work and confirm that your data is never sent anywhere. The check takes about a minute.

  1. Open your browser developer tools with F12, or Cmd+Option+I on a Mac, and select the Network tab.
  2. Reload the page and let it finish. You will see the page's own files (including the background file parser), its web fonts, and one anonymous page-view request. No file has been chosen yet, so none of them can contain your data.
  3. Click the clear icon in the Network tab so that the log is empty.
  4. Open a CSV file in the Remove rows from CSV tool above, run it, and download the result.
  5. Look at the Network tab again. It is still empty. Reading, changing, and saving the file made no request at all. For extra proof, turn on offline mode after the page loads: every tool keeps working.

Your file is read into this tab's memory with the browser's own file reader, parsed and changed by code that is already on the page, and handed back to you as a download. It is never uploaded, never stored in the browser, and gone when you close the tab. The only other request the site can make is the feedback form, and only when you submit it.

The production site also sends a Content-Security-Policy header that tells your browser to refuse connections to anywhere except this site and the anonymous analytics endpoint, so even a bug could not send your data elsewhere.

Which Ways Can You Pick Rows to Remove?

  • Row numbers and ranges, such as 1-5, 12, 40-.
  • The first N rows, such as report title lines above the real data.
  • The last N rows, such as totals or footer lines.
  • Every empty row.
  • Rows that match a filter expression.
  • Rows you selected in the grid by clicking row numbers.

In each case the tool shows the number of rows that will be removed before you press the button, so you can catch a range that is wider than you meant.

How Do You Write Row Numbers and Ranges?

Rows count from 1, starting at the first row below the header, so the header itself can never be removed by a number. A range uses a hyphen, and parts are separated by commas. You can mix single rows and ranges in one entry, such as 1-5, 12, 40-.

  1. 12 is row 12, and 1-5 is rows 1 through 5.
  2. 40- runs from row 40 to the end of the table.
  3. last is the final row, and odd or even picks every other row.

How Do You Remove Rows That Match a Rule?

Type a filter expression, such as status = "cancelled" or email is empty, and every row that matches is removed. The expression language is the same one used by Filter CSV, with comparisons, contains, in lists, AND, OR, and NOT. Writing the rule in the filter first lets you look at the matching rows before deleting them.

How Do You Select Rows in the Grid?

Click a row number to select that row, and Shift-click another row number to select the range between them. Selected rows can then be removed here, or in the CSV editor. Undo keeps the last five changes, and Reset to original returns to the file as it was first read.

Removing rows works on one table at a time. Removing duplicate rows has its own tool, Remove duplicates, which shows groups of copies with their row numbers and keeps the first or last of each, so you do not have to find the repeated rows by eye.

What Else Can You Do With a CSV Here?

  • CSV viewer: Open a CSV of any size, scroll every row, and see a profile of each column.
  • Sort CSV: Sort rows by one or more columns, as text, numbers, or dates, ascending or descending.
  • Filter CSV: Show only the rows that match an expression such as price > 10 AND state = "NY".
  • CSV validator: Find ragged rows, broken quotes, bad headers, encoding problems, and values of the wrong type.
  • Remove duplicates from CSV: Find and remove duplicate rows, comparing whole rows or only the columns you choose.
  • Trim CSV whitespace: Trim leading and trailing spaces, collapse double spaces, and drop invisible characters and empty rows.
  • Find and replace in CSV: Find text in one column or every column and replace it, with match case, whole cell, and regex options.
  • CSV editor: Edit cells, add or delete rows, and add, delete, rename, or move columns.
  • Split CSV column: Split one column into several at a delimiter, such as a full name into first and last.
  • Merge CSV columns: Join two or more columns into one with the separator you choose, skipping empty values.
  • CSV column type converter: Convert a column to clean numbers, ISO dates, true/false, or upper, lower, or title case.
  • CSV to JSON converter: Convert CSV to a JSON array of objects or arrays, or to JSON Lines, with typed values.
  • JSON to CSV converter: Convert a JSON array or JSON Lines to CSV, flattening nested objects into dotted column names.
  • CSV to SQL converter: Turn a CSV into SQL INSERT statements, with an optional CREATE TABLE, for PostgreSQL, MySQL, SQLite, or SQL Server.
  • CSV to TSV converter: Convert a comma-separated file to tab-separated values that paste cleanly into spreadsheets.
  • TSV to CSV converter: Convert a tab-separated file to a standard, properly quoted comma-separated CSV.
  • CSV splitter: Split a large CSV into smaller files of a set number of rows, with the header repeated in each.

All eighteen tools are on the 2csv home page, and once a file is open you can switch between them without reloading it. Part of the 2suite.io privacy-first ecosystem.

Frequently Asked Questions

Is row 1 the header?

No. Row numbers count from 1 starting at the first row below the header, so removing row 1 never removes the header.

How do I delete everything after row 1000?

Type 1001- as the range. The count shows how many rows will be removed before you confirm.

Can I remove rows where a column is blank?

Yes. Use a filter expression such as email is empty, and every row with an empty email cell is removed.

Can I get removed rows back?

Yes. Undo restores the last five changes, and Reset to original returns the whole file as first read.

Can I remove every other row?

Yes. Type odd or even as the row list. Rows count from 1 below the header, and the count of rows to be removed is shown before you confirm.

Was this helpful?