Codepackr / validators / CSV Viewer

CSV Viewer

Parse CSV content into an interactive, sortable, and searchable table.

Client-Side Execution & Privacy Guarantee

This utility executes 100% locally in your web browser. Your inputs, tokens, queries, and data payloads are never transmitted to any external server or backend.

CSV files are ubiquitous yet fragile. A mismatched delimiter, an unquoted comma, or inconsistent column counts can make a file hard to read in a plain editor. CodePackr's CSV Viewer parses the content locally and presents it as an interactive table you can sort and filter.

The viewer auto-detects common delimiters and handles quoted fields that contain commas or newlines. Once the table is built you can search across all columns, sort by any header, and quickly spot rows that have the wrong number of fields.

Parsing rules and quoting

Fields are separated by the chosen delimiter. A field that contains the delimiter, a quote, or a newline must be enclosed in double quotes. Inside a quoted field a doubled quote represents a literal quote character.

The first row is treated as headers by default. If your file has no header row you can still view the data; columns are then labeled by index. Empty lines are skipped.

Sorting and searching the table

Clicking a column header sorts the visible rows by that column. A second click reverses the order. Sorting is stable and treats numbers as numbers when the entire column consists of numeric values; otherwise it falls back to string comparison.

The search box filters rows that contain the typed text in any cell. The filter is case-insensitive and updates as you type, making it easy to locate a particular identifier or error message.

Detecting structural problems

Rows whose field count differs from the header count are highlighted. This usually indicates a missing quote or an extra delimiter. Examining the raw text of the highlighted row next to the table makes the mistake obvious.

If the auto-detected delimiter produces only one column, try switching to a semicolon, tab, or pipe. Many European exports use semicolons; the viewer lets you override the detection.

When to use this tool

  • You receive a CSV export and want to verify column alignment before importing it.
  • A spreadsheet export looks correct in Excel but fails when parsed by code; the viewer shows the raw field boundaries.
  • You need to sort or search a moderately sized CSV without opening a full spreadsheet application.
  • You are debugging a generator that sometimes emits unquoted commas or inconsistent row lengths.
  • You want a quick visual check that headers match the expected schema.

How to use the CSV Viewer

  1. Paste the CSV content into the input area or drop a .csv file (it is read locally).
  2. Confirm or override the detected delimiter if the table looks wrong.
  3. Review the rendered table and note any highlighted rows with mismatched field counts.
  4. Click column headers to sort and use the search box to filter.
  5. Correct the source text if necessary and re-parse to confirm the fix.
  6. Copy a cleaned version or export the visible rows if the tool provides that option.
  7. Use the verified structure as a reference when writing a parser or import script.

Worked examples

Simple three-column file

Input
name,score,active
Ada,98,true
Grace,87,false
Output
Table with headers name, score, active and two data rows. Sorting by score descending places Ada first.

Standard comma delimiter and a header row produce a clean three-column table.

Quoted field containing a comma

Input
id,description
1,"Hello, world"
2,Simple
Output
Two rows. The description of the first row is the single value Hello, world (comma preserved inside the field).

The surrounding quotes protect the internal comma so it is not treated as a delimiter.

Common mistakes and tips

  • Always check the field-count warning; a single unquoted comma shifts every subsequent column.
  • If numbers sort incorrectly, the column contains at least one non-numeric value and falls back to string order.
  • Large files may be slow to render; filter or split them before pasting if the browser becomes unresponsive.
  • Different tools disagree on whether a trailing delimiter creates an empty final field; compare the raw text with the table.
  • UTF-8 with BOM is handled, but unusual encodings may produce mojibake; re-save the file as UTF-8 if characters look wrong.

Frequently asked questions

Does the viewer support TSV or other delimiters?

Yes. It auto-detects comma, semicolon, tab, and pipe, and you can force any of them.

How are multiline quoted fields handled?

Newlines inside properly quoted fields are preserved and shown inside the cell.

Can I edit cells?

The viewer is primarily for inspection. Edit the source text and re-parse to see changes.

What is the practical size limit?

Tens of thousands of rows are usually fine; hundreds of thousands may exhaust browser memory. Process large files in chunks.

Is the CSV uploaded?

No. Parsing and rendering happen entirely in your browser.