CSV Viewer & CSV Analyzer
Inspect, edit, validate, and analyze CSV files locally in your browser with a spreadsheet-grade grid. Includes RFC 4180 parsing, delimiter detection, sorting, filtering, search, data quality diagnostics, and bidirectional CSV-to-JSON conversion.
Name,Age,City,Salary Alice Johnson,34,New York,85000 Bob Smith,28,San Francisco,92000 Carol Williams,41,Chicago,78000Ready locally via WebAssembly & JavaScript
| Name | Age | City | Salary | |----------------|-----|---------------|--------| | Alice Johnson | 34 | New York | 85000 | | Bob Smith | 28 | San Francisco | 92000 | | Carol Williams | 41 | Chicago | 78000 |100% Client-Side • Zero Server Upload
Comma-Separated Values (CSV) remains the universal interchange format across databases, ERP platforms, analytics warehouses, and SaaS exports — yet opening a raw CSV in a desktop spreadsheet program is notoriously risky. Excel silently strips leading zeros from postal codes (02138 becomes 2138), truncates 16-digit transaction IDs into scientific notation, and misparses European semicolon-delimited exports into a single unreadable column. The CSV Viewer & CSV Analyzer parses your files directly in browser memory using a strict RFC 4180 state machine, preserving raw cell fidelity while giving you spreadsheet-style sorting, search, inline editing, validation diagnostics, and instant JSON conversion without transmitting proprietary records over the network.
RFC 4180 Tokenization, UTF-8 BOMs, and Delimiter Scoring
Real-world CSV exports rarely consist of simple comma-separated words. Naive line.split(',') parsers shatter the moment a product description contains a comma, an address spans two lines, or a title includes quotation marks. This tool runs a character-by-character finite state machine that honors every edge case in RFC 4180:
- UTF-8 Byte Order Mark (BOM) Stripping: Excel and many Windows reporting tools prepend
0xFEFFto UTF-8 files. If left intact, that invisible prefix corrupts the first header name (turningIDinto\uFEFFID) and breaks downstream key lookups in JavaScript or Python. The parser strips leading BOM bytes automatically before tokenization begins. - Quoted Fields and Doubled Quotes: Entering a double quote toggles quote mode so embedded delimiters and
CRLF/LFline breaks remain inside the active cell rather than splitting columns or rows. Adjacent double quotes ("") inside a quoted string decode cleanly to a single literal". - Heuristic Delimiter Detection: Before parsing, the engine samples the first five non-empty lines and counts unquoted occurrences of
,,;,\t, and|. Candidate separators that produce an identical positive count on every sampled row receive a10xconsistency bonus, reliably separating European semicolon exports and tab-delimited database dumps from standard comma CSVs.
Consider how a single malformed quote breaks naive parsers while RFC 4180 state tracking handles it cleanly:
SKU,Product Name,Notes,Price
PRD-004,"27"" 4K Monitor","Includes HDMI, DP
and USB-C cables",549.99
PRD-012,"34"" Ultrawide Monitor","Ships flat-packed",899.99
Here, 27"" decodes to 27", and the multiline Notes field stays intact as column 3 of row 1 rather than creating a broken extra row.
Delimited and Structured Export Formats Compared
Different downstream consumers impose strict expectations on quoting, whitespace, and schema representation. Use the matrix below to choose the right export target for your pipeline.
| Export Format | MIME Type | Field Separation & Quoting | Schema Fidelity | Best Downstream Use |
|---|---|---|---|---|
CSV (.csv) | text/csv | Comma-separated; RFC 4180 double-quote escaping | Flat string grid; uniform column width | Database COPY, CRM imports, spreadsheets |
TSV (.tsv) | text/tab-separated-values | Tab-separated (\t); quotes only when needed | Flat string grid; fewer comma collisions | Bioinformatics, Unix awk/cut pipelines |
JSON (.json) | application/json | Array of key-value objects indented 2 spaces | Header-mapped keys per record | REST APIs, NoSQL seeds, JS/Python apps |
Pipe TXT (.txt) | text/plain | Space-padded | columns with divider row | Visual fixed-width alignment | Jira tickets, Slack messages, plain-text logs |
Automated Column Profiling, Validation, and Grid Workflows
Loading a file immediately triggers two diagnostic passes alongside the interactive table view.
Type Inference and Anomaly Detection
To profile column homogeneity, the analyzer evaluates every non-empty cell in each column against boolean literals (true, false, yes, no), numeric parsing, and five common calendar date signatures (YYYY-MM-DD, MM/DD/YYYY, MM-DD-YYYY, YYYY/MM/DD, and D Mon YYYY). When at least 80% of non-empty values match a single category, the column is classified accordingly; columns spanning multiple structured types register as mixed, alerting data engineers to dirty entries before ingestion.
Simultaneously, the validator scans for structural defects that break ETL pipelines:
- Ragged row lengths: Rows with fewer fields than the header count emit a
warning(padded with empty strings in the normalized grid), while rows exceeding the header count emit anerrorwith the exact 1-based source line number. - Header integrity: Blank column headers and case-insensitive duplicate header names are flagged immediately so JSON object keys do not silently overwrite each other during conversion.
- Exact duplicate rows: Each row is fingerprinted using a null-byte (
\x00) join key inside a hash set to report exact duplicate records alongside total empty-cell counts and estimated byte size.
Bidirectional JSON Conversion and Companion Tools
Switching to the CSV to JSON or JSON to CSV tabs lets you pivot between tabular and document formats without writing throwaway Python scripts. When converting heterogeneous JSON arrays where optional keys appear only on certain objects, the converter computes the complete key union across all elements so no fields are dropped, while nested objects are stringified safely into cells. If you want to minify, validate, or fold deeply nested JSON outputs afterward, inspect them in the JSON Formatter. Need to publish a cleaned dataset as a responsive web pricing or comparison matrix? Paste the exported CSV directly into the HTML Table Generator. And when reconciling extracted database dumps against the warehouse query that produced them, keep your extraction SQL legible with the SQL Formatter.
Guarding Against CSV Formula Injection on Export
A frequently overlooked vulnerability in web-generated CSV files is CSV Injection (also called Formula or DDE Injection). If an untrusted user enters =HYPERLINK("https://example.com","Click") or +cmd|' /C calc'!A0 into a web form that later gets exported to CSV, opening that spreadsheet in Microsoft Excel or LibreOffice Calc can execute formulas or exfiltrate cell data.
During .csv and .tsv serialization, this tool neutralizes formula injection automatically by inspecting the first character of every field: any value starting with =, +, -, @, \t, or \r is prefixed with a single leading apostrophe (') before RFC 4180 quoting is applied. Keep one practical trade-off in mind: if your dataset contains legitimate negative numbers (such as -42.50) destined for an automated SQL or Python numerical loader rather than Excel, export as JSON or verify your ingest parser strips display prefixes where appropriate.
How to Use CSV Viewer & CSV Analyzer
Upload a local .csv or .tsv file, paste raw text from your clipboard, or load one of the built-in sample datasets to explore the workspace.
Inspect the parsed grid in the Viewer tab, clicking column headers to sort numerically or alphabetically and typing in the filter bar to narrow matching rows.
Use the global search bar with optional case sensitivity to highlight and jump directly to matching cells across large tables.
Double-click any cell to edit its value inline, and press Ctrl+Z or Ctrl+Shift+Z to undo or redo up to 20 revision states.
Open the Analytics and Validation tabs to review inferred column types, empty cell counts, duplicate rows, and line-numbered column-count mismatches.
Switch to CSV to JSON or JSON to CSV for schema conversion, or download the cleaned dataset as CSV, TSV, JSON, or aligned TXT.
Real Examples
Standard CSV Data
A typical CSV file with headers, text, and numeric columns.
Name,Age,City,Salary
Alice Johnson,34,New York,85000
Bob Smith,28,San Francisco,92000
Carol Williams,41,Chicago,78000| Name | Age | City | Salary |
|----------------|-----|---------------|--------|
| Alice Johnson | 34 | New York | 85000 |
| Bob Smith | 28 | San Francisco | 92000 |
| Carol Williams | 41 | Chicago | 78000 |CSV to JSON Conversion
Convert structured CSV data into a JSON array of objects.
id,product,price,stock
1,Laptop,999.99,45
2,Keyboard,79.99,200
3,Monitor,349.50,78[
{ "id": "1", "product": "Laptop", "price": "999.99", "stock": "45" },
{ "id": "2", "product": "Keyboard", "price": "79.99", "stock": "200" },
{ "id": "3", "product": "Monitor", "price": "349.50", "stock": "78" }
]Frequently Asked Questions
Why does this CSV Viewer preserve leading zeros and ISO dates that Excel corrupts?
Which delimiters and line endings can the parser auto-detect?
How does the tool protect exported CSV files against spreadsheet formula injection?
Can I convert nested or inconsistent JSON arrays into a flat CSV table?
Are sensitive financial or HR CSV files uploaded to a remote server?
Key Features
- RFC 4180 state-machine CSV parser handling quoted fields, doubled-quote escapes, multiline cell values, and UTF-8 BOM stripping
- Automatic delimiter detection across comma, semicolon, tab, and pipe-separated datasets
- Interactive spreadsheet grid with double-click inline cell editing, 20-step Undo/Redo history, natural numeric sorting, and column visibility toggles
- Case-sensitive global cell search with match cycling and real-time row filtering
- Automated data quality validator and analytics dashboard reporting column types, empty cells, duplicate rows, and ragged column-count errors
- Bidirectional CSV-to-JSON and JSON-to-CSV conversion plus formula-safe export to CSV, TSV, JSON, and pipe-delimited TXT
Common Use Cases
- Auditing Stripe billing exports, bank ledgers, or CRM dumps without Excel silently reformatting account numbers or timestamps
- Diagnosing malformed rows, missing column headers, and duplicate records before running a PostgreSQL COPY or Snowflake bulk load
- Converting raw API JSON responses into clean CSV spreadsheets for finance, operations, or marketing stakeholders
- Transforming tabular product catalogs or configuration matrices into structured JSON arrays for frontend seed files
- Quickly editing individual cell values and filtering subsets of European semicolon-delimited CSV exports
- Inspecting server-generated tab-separated logs and exporting clean ASCII pipe tables for engineering tickets
Related Tools
Explore More Tools in This Category
View All Developer & Utility ToolsBase64 Encoder — Text, File & Data URI Encoding Tool
Encode and decode UTF-8 text, JSON payloads, images, and binary files using RFC 4648 standard or URL-safe Base64url with instant Data URI output and live byte-expansion metrics, 100% client-side.
Base64 Decode Tool
Decode standard RFC 4648 and URL-safe Base64 strings into readable UTF-8 text, formatted JSON, or downloadable images with automatic magic-byte sniffing directly inside your browser.
URL Encoder & Decoder Tool
Percent-encode full URIs, individual query parameters, and multi-byte UTF-8 text using RFC 3986 and JavaScript encodeURI/encodeURIComponent rules with an interactive query string builder.
URL Decoder Tool
Unescape percent-encoded URLs and query strings back into readable UTF-8 text, inspect and edit key-value parameters visually, and diagnose malformed or double-encoded sequences locally in your browser.
JWT Decoder Tool
Inspect JSON Web Tokens locally in real time. Decode Base64url headers and payload claims, evaluate Unix exp/iat/nbf timelines, and flag risky signing algorithms without sending tokens over the network.
Hash Generator Tool
Compute MD5, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, SHA3-256, and SHA3-512 cryptographic digests simultaneously for text or local files directly inside your browser.
MD5 Generator Tool
Compute 128-bit MD5 checksums for UTF-8 strings and large local files with 2 MB chunked browser streaming, live hash verification, and zero server uploads.
SHA256 Generator Tool
Generate FIPS 180-4 SHA-256 digests for text and local files entirely in your browser using hardware-accelerated Web Crypto APIs, hybrid chunked streaming, and instant hash comparison.