CSV to JSON Converter
Convert CSV to a JSON array of objects. Uses the first row as keys, handles quoted values, and detects common delimiters automatically.
How to use the csv to json converter
Paste CSV on the left. The first row is treated as column headers, and each subsequent row becomes a JSON object. JSON appears live on the right.
Formula & explanation
Each row → object. Keys come from the header row; values are strings (CSV has no native types). Delimiter is auto-detected: comma, semicolon, or tab.
Examples
name,age\nAlice,30\nBob,25 becomes [{"name":"Alice","age":"30"}, {"name":"Bob","age":"25"}]
Frequently asked questions
- Why are numeric values strings in the output?
- CSV has no type information — "30" could be an int, a fixed-width code, or a phone-number prefix. We keep everything as a string so you decide. Parse them with parseInt / parseFloat in your code after.
- How do you detect the delimiter?
- We sample the first few lines and pick whichever of comma, semicolon, or tab appears most frequently. European spreadsheets often default to semicolon — that works too.
- What about quoted strings with commas inside?
- Standard RFC 4180 quoting is honored: double-quoted fields can contain the delimiter and newlines; doubled-quotes inside a quoted field render as a single quote.
Related developer tools tools
- JSON to CSV ConverterConvert JSON arrays to CSV with automatic header detection from object keys. Handles nested values and arbitrary delimiters.
- XML to JSON ConverterConvert XML to JSON for legacy API integration, SOAP responses, and config migration. Handles attributes, namespaces, and text content.
- JSON DiffCompare two JSON values semantically. Ignores key order; shows added, removed, and changed fields with their JSONPath — great for diffing API responses and config files.
- JSON to XML ConverterConvert JSON objects and arrays to well-formed XML. Maps object keys to elements, array items to repeated elements, with optional root wrapper.
- XML to CSV ConverterFlatten repeated XML elements into CSV rows with attributes and child text as columns. Great for opening XML data in Excel or Sheets.
- CSV to XML ConverterConvert CSV rows into XML elements with column headers as tag names. Useful for Excel exports, legacy systems, and ETL pipelines.