Xerobit

CSV Viewer: Parse and View CSV Data as a Table

Paste CSV text into this csv viewer to see it parsed into a table with row and column counts. The parser follows RFC 4180: it handles quoted fields, doubled quotes, embedded commas and newlines, and CRLF line endings. Choose a delimiter or let the tool auto-detect from comma, semicolon, tab or pipe. Toggle the header row and limit the number of rows displayed. Everything runs in your browser; no data is uploaded.

Supports RFC 4180: quoted fields, escaped quotes, embedded commas and newlines.

Auto-detect checks the first few lines for the most consistent delimiter.

When checked, the first parsed row becomes the table header.

Parsed CSV

  • Columns
    3
  • Data rows
    3
  • Header row
    Yes
nameagecity
Alice30New York
Bob25Los Angeles
Carol35Chicago

How to use the csv viewer

  1. Paste your CSV text into the csv viewer input area.
  2. Choose a delimiter or leave it on Auto-detect.
  3. Toggle the header row checkbox if the first row contains column names.
  4. Set a maximum number of rows to display if the file is large.
  5. The table appears instantly with column count, row count, and any ragged-row warnings.

How the parser works

The parser implements RFC 4180. It scans the input character by character, tracking whether it is inside a quoted field. Inside quotes, two consecutive double quotes ("") represent a single literal quote. A field may contain commas, semicolons, tabs, pipes, or newlines when quoted. Line endings can be CRLF, LF, or CR.

For example, the line "A, B","C""D" parses as two fields: A, B and C"D. The comma inside the first field is not a delimiter; the doubled quotes in the second field become one quote.

Delimiter auto-detection

When Auto-detect is selected, the csv viewer examines the first five non-empty lines. It counts occurrences of each candidate delimiter (comma, semicolon, tab, pipe) that appear outside quoted fields. Each delimiter is scored by how many of those lines share the same non-zero count. The highest score wins; if two tie, the one that gives more columns wins, and after that the order of preference is comma, semicolon, tab, pipe.

Auto-detection works best when the sample lines have the same number of columns. If your CSV uses a rare delimiter like a colon, choose it manually from the dropdown.

Ragged rows and column count

CSV files often have rows with different column counts. This viewer reports the maximum column count found across all parsed rows as Columns. Each row in the displayed table is padded with empty cells to match that width so the table renders cleanly.

A note appears under the table when ragged rows are detected, for example: Ragged rows: max 5 columns. This helps you spot missing or extra fields without scrolling through the raw text.

Common use cases

  • Quickly inspect a CSV export from a spreadsheet or database before importing elsewhere.
  • Verify that quoting and escaping are correct after generating CSV programmatically.
  • Check column alignment when converting between delimiters (see the CSV Delimiter Converter).
  • Preview large files by limiting rows to the first 100 or 1000 lines.

Limits and performance

The parser runs in the main thread. The tool stops at about 3 MB of input or 2 million cells and says so, and it shows at most 5000 data rows however high Max rows to show is set. The row limit only limits what is rendered; the entire input is still parsed to compute accurate column counts and detect ragged rows. Blank lines are skipped, and a UTF-8 byte order mark at the start is dropped. If you need to process huge files regularly, consider a streaming parser in your own code.

Empty input returns an error. A max rows value below 1, or one that is not a number, also returns an error.

Worked examples

ExampleInputResult
Simple comma CSVCSV data: name,age,city / Alice,30,New York / Bob,25,Los Angeles / Carol,35,Chicago; Delimiter: auto; First row is header: yes; Max rows to show: 100Columns: 3; Data rows: 3; Header row: Yes
Quoted fields with commasCSV data: "Product","Price","Description" / "Widget A","$19.99","A small, red widget" / "Gadget B","$29.99","A ""large"" blue gadget"; Delimiter: auto; First row is header: yes; Max rows to show: 100Columns: 3; Data rows: 2; Header row: Yes
Semicolon delimiter, no headerCSV data: 1;2;3 / 4;5;6 / 7;8;9; Delimiter: ;; First row is header: no; Max rows to show: 100Columns: 3; Data rows: 3; Header row: No
Embedded newlines in quotesCSV data: id,notes / 1,"Line one / Line two" / 2,"Single line"; Delimiter: auto; First row is header: yes; Max rows to show: 100Columns: 2; Data rows: 2; Header row: Yes
Tab-separated valuesCSV data: col1 col2 col3 / a b c / d e f; Delimiter: auto; First row is header: yes; Max rows to show: 100Columns: 3; Data rows: 2; Header row: Yes

FAQ

Does this csv viewer send my CSV data to a server?

No. All parsing happens in your browser. Nothing is uploaded.

Can I view TSV files with this tool?

Yes. Choose Tab (\t) as the delimiter or leave it on auto-detect; tabs are one of the four candidates.

Why does the column count not match my header row?

The column count is the maximum across all rows. If some data rows have more fields than the header, the count reflects the wider rows, and the note about ragged rows appears.

How are doubled quotes handled?

Inside a quoted field, two double quotes in a row ("") represent a single literal double quote. This follows RFC 4180.

Can I copy the table to a spreadsheet?

Yes. Select the rendered table rows and copy; they paste cleanly into Excel, Google Sheets, or LibreOffice Calc.

What if my CSV uses a delimiter not in the list?

The tool supports comma, semicolon, tab, and pipe. For other delimiters, use the CSV Delimiter Converter to convert to a supported delimiter first.

Does the tool support UTF-8 and special characters?

Yes. The parser works on the Unicode string directly, so any character valid in a JavaScript string is handled, including emoji and non-Latin scripts.