CSV to JSON Converter

Convert CSV to JSON or JSON back to CSV — paste your data and get an instant, accurate result.

How to Convert CSV to JSON (and Back)

  1. Choose "CSV → JSON" or "JSON → CSV" with the pill toggle at the top of the tool.
  2. Paste your CSV or JSON data into the input box.
  3. Pick the matching Delimiter (comma, semicolon, tab, or pipe) if your CSV isn't comma-separated.
  4. In CSV → JSON mode, check or uncheck "First row is a header", choose "Array of objects" or "Array of arrays" for the output shape, and toggle "Pretty-print JSON output" as needed.
  5. In JSON → CSV mode, check "Flatten nested objects into columns" if your JSON has nested objects you want split into dot-notation columns.
  6. Click "Convert", then copy the result with "Copy Result".

Frequently Asked Questions

How does it handle commas inside quoted CSV fields?

The parser tracks whether it is currently inside a quoted field and only treats the selected delimiter as a column boundary when it's outside quotes; a doubled quote ("") inside a quoted field is unescaped to a single literal quote, matching standard CSV quoting rules.

What happens if I uncheck "First row is a header"?

Every row, including the first, is treated as data, and the resulting JSON keys are auto-named col1, col2, col3, and so on instead of using your actual header text.

When converting JSON to CSV, where do the column headers come from?

The tool takes the keys of the first object in your JSON array and uses them as the CSV header row. If later objects have different or missing keys, only the ones matching the first object's keys line up correctly, so keep your objects' shapes consistent.

Will values containing commas or quotes come out broken in the CSV output?

No — any field containing the selected delimiter, a quote character, or a newline is automatically wrapped in double quotes, with internal quotes doubled, so it round-trips correctly.

Does JSON to CSV work if my JSON is a single object instead of an array?

Yes — a single JSON object is automatically wrapped into a one-item array before conversion, producing a header row plus one data row.

Can I use a delimiter other than a comma?

Yes — pick Comma, Semicolon, Tab, or Pipe from the Delimiter dropdown; it's used for parsing CSV input in CSV → JSON mode and for generating the output in JSON → CSV mode, so you can work with semicolon- or tab-separated files just as easily as comma-separated ones.

Does the CSV parser handle line breaks inside quoted fields?

Yes — a quoted field can contain a real line break, for example a multi-line address, and it is still read as a single field instead of being split into extra rows, as long as the field starts and ends with matching double quotes.

What does "Flatten nested objects into columns" do?

When checked, nested objects are expanded into separate columns using dot notation, so {"address":{"city":"NYC"}} becomes a column named address.city; when unchecked, nested objects and arrays are kept as a single column containing their raw JSON text.

What's the difference between "Array of objects" and "Array of arrays" output?

"Array of objects" uses your header row as property names, producing objects like {"name":"Alice"}; "Array of arrays" instead returns just the data rows as nested arrays with no keys attached, and if "First row is a header" is checked, that header row is excluded from the output since arrays have no property names to hold it.

Can I get minified JSON instead of pretty-printed?

Yes — uncheck "Pretty-print JSON output" and the result is compact JSON with no extra whitespace, which is smaller to paste elsewhere; leave it checked for indented, human-readable output.