# CSV ↔ JSON

Canonical: https://herebetools.com/csv-json

Convert between CSV and JSON with type detection

Convert spreadsheet exports and API data between CSV rows and JSON arrays. Text is preserved by default. Choose commas, tabs, pipes, or semicolons, with optional number and boolean conversion.

## Related tools

- [JSON Formatter](https://herebetools.com/json-formatter): Format, validate, minify and sort JSON with tree view
- [JSON → CSV](https://herebetools.com/json-to-csv): Flatten JSON arrays into CSV with configurable delimiters and headers
- [CSV Tools](https://herebetools.com/csv-tools): Validate, reformat, and compare CSV files — delimiter, qualifier, sort, diff
- [JSON Lines Converter](https://herebetools.com/json-lines): Convert JSON arrays to JSON Lines (JSONL/NDJSON) and back with line-specific errors

Tool processing runs in your browser.

## How to use it

1. Choose CSV to JSON or JSON to CSV, then paste your data.
2. Select the delimiter and whether the first row contains column names. Keep type conversion off to preserve text values.
3. Review the output. Duplicate headers, malformed quotes, and mismatched column counts are reported instead of silently dropping values.

## Example

Input:

```text
id,name
001,Ada
002,Grace
```

Output:

```text
[
  {"id":"001","name":"Ada"},
  {"id":"002","name":"Grace"}
]
```

## Behavior and limits

CSV to JSON preserves text by default, including leading zeros. Optional type conversion keeps unsafe integers as strings. When converting JSON objects to CSV, nested objects and arrays become JSON text within their cells. Spreadsheet applications may interpret cell values as formulas; review files before opening them there.

## Sources and specifications

- [RFC 8259 — JSON](https://www.rfc-editor.org/rfc/rfc8259)
- [RFC 4180 — CSV](https://www.rfc-editor.org/rfc/rfc4180)

[Privacy policy](https://herebetools.com/privacy-policy) · [About](https://herebetools.com/facts) · [Topics](https://herebetools.com/topics)
