Overview
Introduction
Sometimes you don't want to transform, censor, or encrypt a CSV, you just want to look at it, cleanly, as a real table, with the ability to sort by any column.
CSV Viewer is exactly that: paste a CSV, get a scrollable table with clickable, sortable headers, no spreadsheet program required.
What Is CSV Viewer?
A read-only CSV table viewer with interactive column sorting: click any header to sort ascending, click again for descending, click a third time to return to the original row order.
Unlike most tools in this category, the sort state lives as interactive UI state in the component itself (not a pure export transform), since sorting is something you explore interactively, not a one-shot data conversion.
How CSV Viewer Works
The CSV is parsed once into a header row and a rectangular grid of data rows; clicking a column header applies a numeric-aware comparator (numbers compare numerically, everything else falls back to locale string comparison) to produce a freshly sorted copy of the rows.
The original row order is always kept alongside the sorted view, so cycling back to "original" is exact, not just a re-sort by row index.
When To Use CSV Viewer
Use this whenever you just want a clean, readable look at a CSV's contents without opening a spreadsheet program.
It's especially useful for quickly finding the largest/smallest value in a column, or checking whether a column's values are already sorted, via one click on the header.
Often used alongside CSV Visualizer, CSV Spacer and Custom CSV Creator.
Features
Advantages
- Instant, no-install table preview for any CSV you paste in, entirely client-side.
- Numeric-aware sorting means number columns sort correctly (9 before 10) rather than as text (10 before 9).
- A true three-state cycle (ascending, descending, original) always lets you get back to the untouched row order.
Limitations
- This is a viewer, not an editor, you can't modify individual cell values directly in the table.
- Very wide CSVs with many columns may require horizontal scrolling to see every column at once.
Examples
Best Practices & Notes
Best Practices
- Click a header a third time whenever you want to double-check you're looking at the original, un-sorted data again.
- Use the numeric-aware sort to quickly spot the min/max of a column without scanning the whole table by eye.
- Copy the sorted CSV output if you need the currently-displayed order preserved elsewhere, sorting alone doesn't change your original input.
Developer Notes
Sorting is implemented as a pure `sortCsvRows(rows, columnIndex, direction)` helper that never mutates its input, called from component state that separately tracks the original row order, so the three-state ascending/descending/original cycle is a state-machine over immutable snapshots rather than accumulating destructive in-place sorts.
CSV Viewer Use Cases
- Quickly previewing a CSV's contents in table form without opening a spreadsheet program
- Finding the largest or smallest value in a column with a single header click
- Checking at a glance whether a CSV export is already sorted the way you expect
Common Mistakes
- Expecting sort clicks to modify the underlying data permanently, they only change the display order until you copy the sorted output explicitly.
- Assuming a mixed column (some numeric, some text values) sorts purely numerically, only cells that both parse as numbers get numeric comparison; otherwise it falls back to text comparison for that pair.
Tips
- Use the third click (back to "original") to quickly compare a sorted view against the source order.
- Pair with CSV Visualizer once you've found the column you care about, to turn it into a quick bar chart.