CSV to JSON Converter
Paste any CSV and get a clean JSON array — with type inference for numbers, booleans, and null.
Related Tools
What is CSV to JSON Conversion?
CSV is the lingua franca of data exports — almost every database, spreadsheet app, and analytics tool can produce it. Converting CSV to JSON lets you consume that data in a JavaScript or Python app, feed it to an API, use it as test fixtures, or process it with LLM-based pipelines that expect structured JSON.
This tool uses papaparse with dynamic typing enabled by default — so numeric columns become actual numbers, boolean columns become true/false, and empty cells become null. The delimiter is auto-detected, so you can paste comma, tab, or semicolon-delimited CSV without changing any settings.
Example
Input CSV:
id,name,active,score 1,Alice,true,9.5 2,Bob,false,
Output JSON (dynamic typing on):
[
{ "id": 1, "name": "Alice", "active": true, "score": 9.5 },
{ "id": 2, "name": "Bob", "active": false, "score": null }
]Frequently Asked Questions
- What does 'Dynamic typing' do?
- With dynamic typing enabled, papaparse automatically converts values to their natural JavaScript types: '42' becomes the number 42, 'true' becomes the boolean true, and empty cells become null. Disable it to keep everything as strings — useful when you have IDs that look like numbers but should stay as strings, or dates that shouldn't be converted.
- How does auto delimiter detection work?
- In auto mode, papaparse inspects the first few rows and scores each candidate delimiter (comma, tab, semicolon, pipe) by how consistently it produces the same number of columns across rows. The highest-scoring delimiter is used. This correctly handles the vast majority of CSV files. Switch to a manual delimiter if your data is unusual.
- What happens to empty cells?
- With dynamic typing on, an empty cell in a numeric column becomes null, and an empty cell in a string column becomes an empty string ''. With dynamic typing off, all empty cells are empty strings. In either case the key is always present in the output object — there are no missing keys for empty cells.
- What if my CSV has no header row?
- This tool assumes the first row is a header row (column names). If your CSV has no headers, add a header row before converting, or the first data row will be used as column names. A 'no header' mode is on the roadmap.
- How do I handle quoted fields with commas inside?
- papaparse handles RFC 4180 quoting correctly. A field like "Smith, John" (with quotes) will be parsed as a single value Smith, John — the comma inside the quotes is not treated as a delimiter. The quotes are stripped from the parsed value.
- My numbers have commas as decimal separators (European format). What should I do?
- European CSVs often use semicolons as the delimiter and commas as decimal separators (e.g., 1.234,56). Select Semicolon as the delimiter and disable dynamic typing — then the decimal-comma numbers stay as strings. Convert them manually in your application logic.
- Can I convert the result back to TypeScript types?
- Yes — copy the output JSON and paste it into the JSON to TypeScript or JSON to Zod Schema tools. The inferred types will match the data including nullable fields from empty cells.
About This Tool
CSV to JSON is powered by papaparse, the battle-tested CSV parser used in millions of production JavaScript apps. The auto-detect mode correctly identifies comma, tab, semicolon, and pipe delimiters. Dynamic typing converts columns to their natural types without any configuration. All processing is 100% browser-side — paste spreadsheet exports, database dumps, or analytics CSVs without your data leaving your device.