CSV Viewer & Editor
View and edit CSV files in your browser. Preview, modify data, add/remove rows and columns, export to CSV or JSON without uploading.
About CSV Viewer & Editor
CSV Viewer & Editor is a powerful online tool that lets you view, edit, and manipulate CSV (Comma-Separated Values) files directly in your browser. Load CSV files, modify data in a spreadsheet-like interface, add or remove rows and columns, and export to CSV or JSON format—all without uploading sensitive data to a server.
Why are my CSV columns getting split incorrectly?
The almost universal cause is a delimiter mismatch between the file and the parser. CSV is not a single format — it is a family of comma-, semicolon-, tab- and pipe-separated files. RFC 4180 specifies the comma as the canonical separator, but spreadsheets in regions that use a comma as the decimal mark (most of Europe and Latin America) default to a semicolon to avoid ambiguity, and TSV files use a tab. This editor auto-detects the delimiter by sampling the first few lines and looking for the candidate that yields the most consistent column count, but you can override the choice if the guess is wrong. The second common cause is a field that contains an unescaped delimiter inside a value — wrap such fields in double quotes ("hello, world") and the parser will treat the embedded comma as data.
How do I edit a cell, add a row, or insert a column?
Click any cell to enter edit mode and type the new value; press Enter to commit or Escape to cancel. To add a row, click the plus icon below the last row, or right-click any existing row and choose "Insert row above" or "Insert row below." To add a column, right-click the header of an existing column and choose "Insert column left" or "Insert column right." Headers are editable in the same way — click on the header label to rename it. Deletion follows the same pattern: right-click and choose Delete row or Delete column. The undo button (or Ctrl+Z / Cmd+Z) reverses up to fifty of the most recent edits, and changes are not written back to your source file until you click Download to export the modified CSV.
Why are leading zeros in ZIP codes or product IDs being stripped?
This is the most notorious CSV pitfall and it actually happens in the spreadsheet, not in the file. CSV has no concept of data types — every field is just text — so a column containing 01234 is stored faithfully in the file. The problem appears when a spreadsheet such as Excel opens the CSV and auto-detects 01234 as a number, dropping the leading zero. This editor treats every cell as text by default, so the zero is preserved while you work here. To survive a round trip through Excel, prefix the value with an apostrophe ('01234) or use the Excel "From Text/CSV" import wizard and explicitly mark the column as Text. When exporting back to CSV, this editor never alters numeric-looking strings.
Does this editor handle UTF-8 BOM, Windows line endings, and other encoding quirks?
Yes. The parser strips a leading UTF-8 byte-order mark (EF BB BF) — frequently added by Excel for Windows when you choose "CSV UTF-8" — so it never appears as a phantom character at the start of your first header. It also normalizes line endings: a CSV may end lines with LF (Unix), CRLF (Windows, the RFC 4180 recommendation), or CR (legacy macOS), and all three are accepted and converted to LF in memory. On export you can choose which line ending to write. Character encoding is assumed to be UTF-8; if you paste a file that was saved as Latin-1 or Windows-1252 you will see mojibake (’ for an apostrophe, for example) — re-export from the source as UTF-8 to fix it.

How do I handle fields that contain quotes, commas, or newlines inside them?
RFC 4180 defines a precise quoting rule: any field that contains the delimiter, a double quote, or a line break must be wrapped in double quotes, and any literal double quote inside such a field must be doubled. For example, the value She said "hello, world" becomes "She said ""hello, world""" in the file. This editor follows the rule on both import and export: pasting a value with embedded commas or quotes works transparently, and downloading the CSV produces a strictly compliant file that round-trips through Excel, Google Sheets, Pandas, and PostgreSQL COPY without surprises. Multi-line cells (with embedded newlines) are supported the same way — display them by enabling word wrap if they get tall.
Can I sort, filter, or search across very large CSV files in the browser?
Sorting and column-level filtering work up to roughly 100 000 rows comfortably on a modern laptop; beyond that the table virtualises so only visible rows are rendered, but a full sort still has to touch every cell. Full-text search uses the search box and highlights matches in place. For files in the multi-gigabyte range, browsers will run out of memory before the parser does, so consider converting the file to Parquet or SQLite first and querying that, or use a server-side tool like xsv or Miller (mlr) from the command line. RFC 4180 was designed for interchange, not for analytics, and a CSV larger than a few hundred megabytes is almost always a sign that the wrong format is in use.
How do I deduplicate rows or remove blank lines?
Use the row toolbar above the table. "Remove blank rows" deletes any row whose every cell is empty or whitespace-only — useful after a paste from spreadsheets that include trailing empty rows. "Remove duplicates" compares rows by all columns by default; click the column header(s) you want to use as the deduplication key first to compare only those columns. The first occurrence is kept and later duplicates are dropped. For more advanced cleanups — fuzzy matching, case-insensitive comparison, normalization of phone numbers and email addresses — open our dedicated CSV Cleaner and Data Deduplicator tools, both of which accept the same files and offer additional rules.
What is the practical difference between CSV, TSV, and NDJSON for tabular data?
CSV (RFC 4180) is the lowest common denominator: every cell is text, the schema is implicit in the header row, and quoting rules handle embedded delimiters. TSV (tab-separated) is a stricter relative used by bioinformatics tools and Hadoop pipelines — tabs almost never appear in data, so no quoting is needed and parsing is trivial, but TSV is less forgiving of dirty input. NDJSON (newline-delimited JSON, one JSON object per line) preserves data types, nested structure, and arrays, which CSV cannot represent at all without ad-hoc encoding. Use CSV when you need to hand a file to a non-technical user with Excel, TSV when you control both ends and want fast parsing, and NDJSON when you have nested or typed data and your pipeline can read JSON streams (Spark, BigQuery, jq, DuckDB all do).
