How to use the CSV editor
The grid works like a small spreadsheet. Click a cell and type to replace it, or press Enter to change what is in it. Tab moves to the next cell. No file at hand? Paste CSV text, or start with an empty table.
- OpenDrop the file, paste the text, or copy cells in Excel and press Ctrl+V in the grid.
- FixSort, find and replace, remove duplicate rows, trim spaces. Click a column letter to see its count, sum and range.
- ExportPick CSV, TSV, JSON, Excel, Markdown, HTML or SQL. Copy the result or download a file.
What a CSV file is
CSV stands for Comma Separated Values. The file is plain text. Each line is one row, and commas split the cells. The first line usually holds the column names. You can read a CSV file in Notepad, and nearly every program that works with data can read and write it.
name,city,joined Anna Smith,Oslo,2024-01-05 "Lee, Sam",Austin,2023-11-30
| name | city | joined |
|---|---|---|
| Anna Smith | Oslo | 2024-01-05 |
| Lee, Sam | Austin | 2023-11-30 |
There is no strict standard. RFC 4180 from 2005 wrote down the common rules, but programs don't have to follow it. The biggest difference is the separator. Excel uses the list separator of your Windows region. Where the decimal sign is a comma, as in Germany or France, that separator is a semicolon. So a file saved in Berlin can open in one column in New York.
The quoting rules
A cell can hold a comma, a quote or even a line break. Then the whole cell goes inside double quotes, and each quote inside it is written twice. So She said "hi" becomes "She said ""hi""". Spaces at the start or end of a cell are only kept inside quotes. If a program wants quotes around every cell, tick "Quote every cell" in Export.
When a program skips one of these rules, the file breaks. A quote without its pair pulls every row after it into one giant cell. If a file looks wrong after opening, look at the first row that went wrong.
Why Excel breaks CSV files
Excel does not open a CSV file as text. It guesses what each cell is and changes it. When you press Save, the changed values go back into the file. These are the common cases:
| What the file has | What Excel shows | How to keep it |
|---|---|---|
| 00420, a postal code or a phone number | 420 | Open through Data, From Text, and set the column to Text |
| MARCH1, SEPT2, 1-2 (gene names, sizes) | 1 March, 2 September, 2 January | Same. In 2020 the human gene naming committee renamed 27 genes because of this. |
| 4111111111111111, a card or account number | 4.11111E+15, and the digits after the 15th turn into zeros | Text column. Excel keeps 15 digits of a number. |
| 2024-01-05 | 1/5/2024 or 05.01.2024, in your region's format | Text column, or accept the new format |
| é, ő, 日本 in a UTF-8 file | é, Å‘ or question marks | Save the file with a byte order mark (BOM). Excel then reads it as UTF-8. |
The byte order mark is three hidden bytes at the start of the file. Excel sees them and reads the file as UTF-8. Most other programs ignore them, but some scripts choke on them and show a strange first column name. The Export panel has a switch for it. Turn it on for Excel, off for everything else.
CSV, TSV or JSON?
| Format | Cells split by | Good for | Watch out |
|---|---|---|---|
| CSV | Comma or semicolon | Excel, databases, nearly every program | Quoting, the regional separator, text encoding |
| TSV | Tab | Pasting into a spreadsheet. Cells rarely hold tabs. | Many programs do not quote at all, so a line break inside a cell breaks the row |
| JSON | Keys and values, no rows | Web apps, scripts, settings files | Bigger file. Numbers and text are different types, so 00420 must be a string. |
The "Copy for Excel or Sheets" button under the grid gives tab separated text, and both programs paste it as cells. To check or reformat a JSON export, open it in the JSON editor.
How to open a CSV file without Excel
Any text editor opens a CSV file, but a grid is easier to read. Drop the file here. The separator and the text encoding are found by themselves, and you can change both in the bar above the grid. For Excel or OpenDocument files, or a workbook with several sheets, use the table editor.
Keyboard shortcuts
| Keys | What they do |
|---|---|
| Arrow keys, Tab | Move to the next cell. Hold Shift to select more cells. |
| Type, Enter or F2 | Typing replaces the cell. Enter and F2 change what is in it. |
| Alt + Enter | A line break inside a cell |
| Delete | Clear the selected cells |
| Ctrl + C, V | Copy and paste cells, also to and from Excel and Google Sheets |
| Ctrl + Z, Y | Undo and redo |
| Ctrl + F | Find and replace |
| Ctrl + K | Every tool in one list. Type to find one. |
| Ctrl + S, O | Save the file, or open one |
Mac users press Cmd where the table says Ctrl. On a phone, tap a cell and change it in the box above the grid.