Paste CSV below and we'll parse itEnter CSV here

Paste CSV to see the parsed rows

What is the CSV Parser?

If you've ever written `line.split(",")` on a CSV file and watched it blow up on a single quoted address containing a comma, you already know why a real parser matters. This tool parses CSV the way the RFC 4180 spec describes fields stay together, `""` inside quotes becomes a literal `"`, and both `\n` and `\r\n` line endings work.

Paste a CSV like `customer_id,order_date,notes` with messy real-world values — embedded commas, newlines inside quotes, stray whitespace — and the parser turns each row into a clean JavaScript object. We flag problems (unterminated quotes, ragged row lengths) instead of silently eating them. The output side mirrors the parsed structure so you can eyeball whether the parse matches what you expected. For streaming-scale work, libraries like Papa Parse and csv.js.org are excellent — this page is for the everyday "does this file parse?" check.

Parsing happens entirely in your browser. Nothing goes to a server. CSV is registered with IANA as `text/csv`, and despite how simple the name sounds, the edge cases are real — this page exists to handle them so you don't have to.

What the Parser Actually Handles

RFC 4180 Quoted Fields

Fields wrapped in double quotes can contain commas, newlines, and escaped `""` sequences. The parser tracks quote state across characters instead of naively splitting on commas.

Per-Column Validation Filters

After parsing, filter any column to sanity-check values. Handy for spotting bad zip codes, malformed dates, or unexpected enum values before you ship the data downstream.

Type Inference

Numeric fields become numbers, `true`/`false` become booleans, and everything else stays as a string. Makes the JSON export directly usable in TypeScript or Python without a second pass.

Parsed JSON Export

Download the parse result as JSON so you can feed it into a script, REST API, or database import without re-parsing anywhere else.

File Upload

Drop a `.csv` or `.txt` file and it loads into the editor. Big files stay in the browser — no upload bar, no server round-trip.

Column Trim

Drop columns you don't need from the parsed output. Useful when the source CSV has 40 columns and your pipeline only cares about 6.

How to Parse a CSV

1

Paste or Upload

Drop your CSV into the left pane. The sample button loads an order-log style CSV with quoted fields, escaped quotes, and an embedded newline so you can see all the edge cases parsed correctly.

2

Watch the Parse Result

The right pane shows each parsed row as a table. If a quote is unterminated or a row has fewer columns than the header, you'll see it immediately. Use the filter inputs to spot-check values.

3

Export Parsed Data

Hit `JSON` to download the parse result as structured JSON, or `Download` to save the cleaned CSV. The JSON output is what most data pipelines actually want.

When You'd Use a Real CSV Parser

ETL and Data Pipelines

Before loading a vendor CSV into Postgres COPY or BigQuery, parse it here to confirm row counts, column alignment, and that nothing has an unterminated quote that will poison the import.

Parsing LLM-Generated CSV

When a language model outputs a CSV table, it often breaks on quote escaping or inconsistent row widths. Paste the output here to see which rows are malformed before you consume them programmatically.

Validating Customer Uploads

If your app accepts CSV uploads, use this page to reproduce a user's failing file locally. The error surface tells you exactly which row broke the parse — much faster than reading your own error logs.

Quick Structural Checks

Does column 3 always hold an ISO date? Does SKU-101 appear in every expected row? Parse and filter in 10 seconds without spinning up a notebook.

CSV Parsing Questions

How does the parser handle quoted fields with commas inside?

It tracks whether the current character is inside a quoted region. Commas inside quotes are treated as literal characters, not delimiters. See RFC 4180 §2 for the formal rules. A value like `"Gift wrap, red ribbon"` parses as one field.

What about escaped double quotes?

Inside a quoted field, two consecutive double quotes (`""`) represent a single literal `"`. So `"Contains ""fragile"" items"` parses to `Contains "fragile" items`. This is the standard RFC 4180 escape.

Does it handle CRLF vs LF line endings?

Yes. We split on `\n` and trim trailing `\r`, so Windows (`\r\n`), Unix (`\n`), and mixed files all parse the same. If a newline appears inside a quoted field, it's preserved as part of the value.

What happens when rows have different column counts?

Missing fields become empty strings in the parsed row, and extra fields are ignored. If you want strict validation, check `row.length === headers.length` on the parsed JSON export — see Wikipedia on CSV basics for why ragged rows happen.

Is the CSV uploaded to a server?

No. Everything parses in your browser with plain JavaScript. Nothing is transmitted. If you need server-side parsing at scale, the IANA text/csv media type is handled by every serious CSV library — node's `csv-parse`, Python's `csv` module, etc.

Will it parse semicolon-separated or tab-separated files?

This page parses comma-separated CSV specifically. For TSV or semicolon-delimited files (common in European locales), swap your delimiter to comma first, or use a parser that lets you configure the delimiter — Papa Parse and most language-native CSV libraries expose that option.

Related CSV Tools

Parsing is step one. When the CSV is clean, these tools do the rest: