CSV to JSON Converter Online — Convert CSV to JSON Array
Convert JSON arrays to CSV — nested flattening · custom delimiter · live preview · Excel download · 100% Free
Converting CSV to JSON makes tabular data accessible to APIs, JavaScript applications and document databases like MongoDB. This converter reads your CSV headers as JSON keys and each row as a JSON object — producing a clean array of objects. Supports comma, semicolon, tab and pipe delimiters, header row detection and type inference (numbers and booleans detected automatically).
What is JSON to CSV Conversion?
JSON to CSV conversion transforms JavaScript Object Notation (JSON) data into Comma Separated Values (CSV) — a flat, plain-text format that can be opened in Microsoft Excel, Google Sheets, LibreOffice Calc, or imported into any database. CalcNation's JSON to CSV converter handles nested objects, arrays, inconsistent keys, and custom delimiters — all 100% in your browser.
Options Explained
Flatten Nested JSON — Converts nested objects to dot-notation columns. E.g. { "address": { "city": "X" } } becomes the column address.city. Flatten Arrays — Expands array items to separate columns: tags[0], tags[1]… Delimiter — Choose comma (standard), semicolon (European Excel), tab (TSV for Excel paste), pipe, or a custom character. Header Row — Toggle whether the first CSV row contains column names.
Frequently Asked Questions
How does CSV to JSON conversion handle data types?
CSV is all text — everything is a string. This converter infers types: numbers (parseable as float/int), booleans (true/false), null (empty cells with null option). Example: "299" → 299 (number), "true" → true (boolean), "" → null or "". Type inference makes the JSON API-ready. Disable inference if you want all values as strings.
Can I convert CSV with multiple header rows to JSON?
Standard CSV has one header row. For multi-row headers (common in financial reports), you need to preprocess: merge header rows into single descriptive names. For example: merge "Q1" and "Revenue" → "Q1_Revenue". This tool handles standard single-header CSVs. For complex spreadsheets, clean in Excel first.
How do I handle CSV files with commas inside field values?
Properly formatted CSV wraps such fields in double quotes: "London, UK","Tata Motors, Ltd.". This parser handles quoted fields correctly. Problem: some exports don't quote properly and data contains unescaped commas. Fix: change delimiter to tab or semicolon, or preprocess the CSV to properly quote problem fields.
What is the best way to convert a large CSV file to JSON?
For large CSVs (above 10MB), browser tools are slow. Use: Node.js: csvtojson npm package (streaming). Python: pandas pd.read_csv("input.csv").to_json("output.json", orient="records"). Command-line: mlr --icsv --ojson cat input.csv > output.json. These handle GBs of CSV data efficiently. Browser tools are for quick one-off conversions.