CSV to JSON Converter
Paste CSV above to see the JSON.
Paste CSV text and get a clean JSON array of objects, using the first row as the keys. The converter understands quoted fields, so commas, double quotes, and line breaks inside a value are handled correctly. Everything runs in your browser, so your data never leaves your machine. This is the inverse of the JSON to CSV tool.
How to use
- Paste or type your CSV into the CSV input box. The first row is treated as the column headers.
- Watch the JSON output update automatically as you type.
- Wrap any value that contains a comma, quote, or line break in double quotes, and double up quotes inside a quoted field.
- Click Copy to copy the JSON, or Reset to clear both boxes and start again.
Examples
- Input: name,age\nAda,36\nGrace,42 gives [ { "name": "Ada", "age": "36" }, { "name": "Grace", "age": "42" } ]
- Input: name,note\n"Doe, John","hi, there" gives [ { "name": "Doe, John", "note": "hi, there" } ]
- Input: quote\n"She said ""hi""" gives [ { "quote": "She said \"hi\"" } ]
FAQs
- Does the first row have to be the header?
- Yes. The first row names the columns, and every value below it becomes a property on each object using those names.
- How are commas inside a value handled?
- Wrap the value in double quotes. Anything inside the quotes, including commas and line breaks, is kept as a single field.
- How do I include a double quote in a value?
- Double it. Inside a quoted field, write two double quotes to produce one literal quote in the output, following the RFC 4180 convention.
- Are numbers converted to JSON numbers?
- No. Every value is kept as a string so the conversion is lossless and never guesses types. You can cast values afterward if you need real numbers.
- What happens if a row has fewer values than there are columns?
- The missing trailing columns are filled with empty strings. A row with more values than columns is reported as an error so nothing is silently dropped.
- Is my data uploaded anywhere?
- No. The conversion runs entirely in your browser, so the CSV you paste never leaves your device.
Related tools
- JSON to CSV ConverterConvert a JSON array of flat objects into clean CSV in your browser. Header row from all keys, with safe quoting for commas, quotes, and line breaks.
- JSON FormatterFormat, validate, and beautify JSON in your browser. Paste messy JSON, get clean indented output, then copy it back. Free, no signup.
- Query String ParserParse a URL query string into key and value pairs, or build one from pairs. Handles a leading question mark, repeated keys, and encoded values.
- Remove Duplicate LinesRemove duplicate lines from text online. Optional case insensitive matching and whitespace trimming, with a count of removed lines.
- Base64 EncoderEncode text to Base64 or decode Base64 back to text in your browser. Full UTF-8 support and clear errors on invalid input.
- URL EncoderPercent encode and decode text for URLs in your browser. Toggle direction, copy results, and see clear errors on malformed input.