CSV Viewer & Editor, Explained
After reading this you will know exactly what a CSV file is byte for byte, why the same file can look different in two programs, and how to sort, filter and extract columns without corrupting your data.
What a CSV file actually is
A CSV file is plain text. Each line is one row. Within a row, fields are separated by a single character, usually a comma. There is no hidden formatting, no cell colors, no formulas. If you open a CSV in a hex viewer you see only the characters you typed plus separators and line endings.
Consider three rows of people with a name, a city and an age:
name,city,ageAda,London,36Grace,New York,41
As raw bytes, the first line is 6E 61 6D 65 2C 63 69 74 79 2C 61 67 65 0A. The 2C bytes are the two commas. The 0A at the end is a line feed, the Unix newline. On Windows you often see 0D 0A instead, a carriage return followed by a line feed. That two-byte ending is the single most common reason a file looks fine in one editor and shows stray characters in another.
The CSV Viewer opens this text as a table so you can read and change it, then writes valid CSV back out. Nothing is uploaded. The parsing runs in your browser.
When to reach for it, and when not
Use a CSV viewer when the file is small enough to hold in memory, roughly up to a few hundred thousand rows, and when you want to inspect, sort, filter or fix a handful of cells by hand. It is the right tool for checking that an export looks correct, deleting a stray column, or pulling out the two columns a colleague asked for.
It is the wrong tool for files of tens of millions of rows, for repeated automated transforms that belong in a script, or for data that is really a spreadsheet with multiple sheets and formulas. If your source is an .xlsx workbook, convert it first with the Excel → CSV Converter, which handles one sheet at a time and strips the workbook machinery.
A CSV carries no type information. The value 007 is four bytes, not the number 7. A viewer that silently converts 007 to 7 or turns 0123456789012 into 1.23457E+11 has damaged your data. Treat every field as text unless you deliberately choose otherwise.
Delimiters, quoting and the RFC 4180 rules
The comma is a convention, not a law. Many European exports use a semicolon because the comma is a decimal separator there. Tab-separated files (TSV) use the tab byte 09. Pipe-separated files use |. The viewer detects the delimiter by counting candidate characters per line and picking the one that gives a consistent column count. You can override the guess.
The hard part is fields that contain the delimiter itself. RFC 4180 solves this with quoting. A field wrapped in double quotes may contain commas, line breaks and quotes. A literal double quote inside a quoted field is written as two double quotes. So the value Smith, "Jr" is stored as:
"Smith, ""Jr"""
Read that carefully. The outer quotes mark the field. The "" pairs each decode to a single ". The comma inside is data, not a separator. A parser that just splits on commas would break this row into two fields and shift every column after it. RFC 4180 parsing is why a proper viewer does not corrupt exports that contain addresses, quotes or multi-line notes.
A worked example with the demo data
Load the demo data with the sample button. It is the three-row table above:
| name | city | age |
|---|---|---|
| Ada | London | 36 |
| Grace | New York | 41 |
Sorting, filtering and extracting
Work through the same three operations you would run on real data.
- Sort by
ageascending. The viewer compares theagecolumn as numbers when every value in it parses as a number. Ada (36) sorts before Grace (41). If even one age were blank or readunknown, the column would fall back to text comparison, where"36"sorts before"41"because3comes before4, which happens to agree here but would not for"9"versus"10". - Filter rows where
citycontainsNew. One row survives: Grace, New York. The header row is never filtered out; it labels the columns. - Extract the
nameandagecolumns and dropcity. The export becomesname,age/Ada,36/Grace,41. Column order in the output follows the order you select, so extractingagethennamewould swap them.
Every step is reversible until you export, because the original file is never overwritten. You download a new file with the changes applied.
Text sort versus numeric sort
Sorting is where CSV surprises people, because a column of digits is still text until something decides to read it as a number. The distinction has a simple rule. Text sorts lexicographically, character by character, left to right. Numbers sort by magnitude.
Here the comparison stops at the first character. The byte for 1 is 0x31 and the byte for 2 is 0x32, so "10" is ranked below "2" even though ten is larger than two. Numeric sort compares the values 10 and 2 and orders them the other way. The viewer picks numeric sort only when the whole column parses as numbers, so one stray non-numeric cell silently flips the entire column back to text ordering. That is worth checking whenever a sort looks wrong.
10 lands first because 1 precedes 2. Under numeric sort the same three values order by magnitude.Common mistakes that corrupt CSV
Most CSV damage happens at the edges, not the middle. Watch for these.
- Leading-zero loss
- ZIP codes, phone numbers and part numbers like
04021become4021when read as numbers. Four bytes turn into three. Keep them as text. - Encoding mismatch
- A name like
Zoëstored as UTF-8 is the bytes5A 6F C3 AB. Read as Latin-1 it displaysZoë. The file is not broken; it is being decoded with the wrong table. Save and read as UTF-8 consistently. - Delimiter clash
- A comma-delimited file that contains commas in a city field like
Washington, D.C.only survives if that field is quoted. Unquoted, it adds a phantom column. - Ragged rows
- If the header has 3 columns but a data row has 4 fields, something upstream failed to quote a delimiter. The viewer flags the mismatch rather than guessing.
- Trailing newline confusion
- A file ending in a bare newline has an empty final line, not an empty final row. Do not read it as a blank record.
Before you edit, sort by each key column once and scan the first and last few rows. Misquoted fields and encoding errors almost always surface at the extremes of a sorted column.
Related tools on this site
Once the table is clean, you often want it in another shape. To turn rows into objects or an array back into rows, use the CSV ↔ JSON Converter. To hide names, emails or IDs before sharing, run the file through the Data Anonymizer, which masks, hashes or fakes selected columns. If your data arrives as a columnar binary file rather than text, the Parquet & Feather Preview opens it without installing Python.
Frequently asked questions
Does my CSV get uploaded anywhere?
No. Parsing, editing and export all run in your browser. The file never leaves your device, which is why very large files depend on your own machine's memory rather than a server.
Why does my file open with the wrong number of columns?
The detected delimiter is probably wrong, or a field contains an unquoted delimiter. Override the delimiter to semicolon, tab or pipe and reopen. If a single row is ragged, look for an unquoted comma or line break in the source.
How do I keep leading zeros on ZIP codes and IDs?
Treat the column as text and never let it be converted to a number. The viewer preserves the exact characters you loaded, so 04021 stays five characters through sort, filter, extract and export.
What is the difference between CSV and TSV?
Only the delimiter. CSV separates fields with a comma (0x2C), TSV with a tab (0x09). TSV rarely needs quoting because tabs seldom appear inside data, but the same RFC 4180 quoting rules still apply when they do.
Can editing a cell break the rest of the file?
No. When you type a comma, quote or line break into a cell, the export re-quotes that field automatically. You edit the value, not the raw text, so the surrounding structure stays valid.