Skip to content
TypeParser
All tools

CSV to JSON

Parse CSV to JSON with type inference.

beats convertcsv.com edge: Delimiter auto-detect + per-column type inference
input.csv
output.json
delimiter shape
paste CSV to convert
columns
paste CSV to see column types
Guide

About CSV to JSON

Paste CSV (or TSV — it auto-detects) and get JSON. Each column gets a type inferred from its values: number, boolean, date, or string. Output as an array of objects, a columnar object, or NDJSON for streaming pipelines. Header detection is automatic but overridable. Everything runs locally.

Why we still convert CSV

CSV is the data format that refuses to die — every spreadsheet, every legacy export, every data scientist’s first move. JSON is the format your code wants to consume. The conversion is small, fast, and surprisingly subtle: quoting rules, type ambiguity, missing values, BOM handling, line endings. A good converter handles them so you do not have to.

How type inference works

For each column, we sample the values and assign a type:

PatternInferred type
123, 456, -789number
1.5, 2e10, -0.001number
true, false, TRUE, FALSEboolean
2024-01-15, ISO 8601date (string in JSON)
anything elsestring

Mixed-type columns fall back to string. You can override per-column from the type dropdown that appears above the output.

Common workflows

Build mock fixtures from a real export. Export a small slice of production data as CSV, convert here, paste into your test suite. The JSON is type-correct and human-readable.

Hand structured data to a script. Coworker hands you a CSV, your script wants JSON. Fifteen seconds, done. No pandas install, no temporary scripts.

Migrate spreadsheets to documents. Convert each sheet to JSON, push into MongoDB, Firestore, or DynamoDB. NDJSON output is what mongoimport expects.

Round-trip verify. Run JSON → CSV → JSON through both tools, diff the result. If the first and last JSON match, your flattening preserves data.

Output forms

  • Array of objects[{ "name": "Ana", "age": 30 }, ...]. The default for most APIs.
  • Columnar{ "name": [...], "age": [...] }. Compact when columns are big and rows many — fits some analytics workloads.
  • NDJSON — one object per line. The format every streaming ETL accepts.

Frequently asked questions

How is the delimiter detected?
We sample the first few lines and pick whichever character (, ; \\t |) yields the most consistent column count. You can override with the dropdown if the heuristic guesses wrong on edge cases.
Why does my "1234" come out as a number?
Type inference treats columns of all-numeric values as numbers. If you need it as a string (e.g. a zip code with leading zeros), toggle Treat all as strings or quote the values in the CSV.
How does it handle quotes inside fields?
Per RFC 4180. A field starts with ", ends with ", and any embedded quote is doubled (""). The parser handles multi-line fields too — newlines inside quoted strings stay inside the value.
What output formats are available?
Array of objects ([{a:1,b:2},...]), columnar ({a:[1,2],b:[3,4]}), and NDJSON (one JSON object per line, ideal for streaming). Pick whichever matches your downstream consumer.
Can it process big CSVs?
Yes — parsing runs on a Web Worker. Files up to ~50 MB convert in seconds without freezing the page.
My CSV has no header row.
Toggle No header. Columns are emitted as col1, col2, ... or you can paste your own column names.

Related tools

Last updated: 2025-01-15