Ithy

CSV to JSON converter and JSON to CSV with quoted-field support

Convert a small text data set between comma-separated values and an array of JSON objects. CSV values stay strings, so leading zeros in identifiers are preserved. The reverse conversion supports flat objects and protects spreadsheet formula-like cells.

Free to use, with no sign-in. Inputs and results stay in this page and are not sent with the form. Download a result before leaving; this tool does not save your work.

Enter text or data

Worked result

Two data rows become two JSON objects; the comma in Lin, Mei stays inside one name.

  1. Parse commas and line breaks only outside quoted fields.
  2. Use the first row as unique, nonempty object keys.
  3. Keep each CSV cell as a string rather than guessing a type.

Convert a quoted comma without splitting a name

The CSV header defines name and score. The second name contains a comma, so that entire field is quoted.

Input:
name,score
Ada,8
"Lin, Mei",9

JSON:
[
  {"name": "Ada", "score": "8"},
  {"name": "Lin, Mei", "score": "9"}
]

The string "008" remains "008". Converting it automatically to the number 8 could corrupt an identifier. Explicit type conversion belongs in the consuming data pipeline.

Quoting is part of the format

Within a quoted CSV field, an embedded double quote is represented by two double quotes. A quoted field may contain commas and line breaks. The converter accepts CRLF or LF record endings and rejects unclosed or misplaced quotes.

For JSON-to-CSV conversion, the tool collects the union of object keys in first-seen order. Missing keys and null values become empty cells. Nested objects and arrays are rejected because there is no single implied flattening rule.

CSV field containing a comma, quote or newline → quote the field
Embedded quote inside a quoted field → double it
CSV header → JSON object keys
CSV values → JSON strings

Input limits and common mistakes

Limit: 200,000 input characters, 2,000 data rows and 100 columns. Headers must be unique and nonempty, and all CSV rows must match the header width. JSON input must be an array of flat objects containing strings, finite numbers, booleans or null.

Unsafe integer-valued JSON numbers and nonfinite parsed numbers are rejected in conversion; use strings for exact long identifiers. CSV export prefixes formula-like text cells with an apostrophe, which intentionally changes their text for spreadsheet safety. Missing, null and empty values cannot be distinguished after a CSV round trip.

Questions about csv and json converter

Why are CSV numbers returned as JSON strings?

CSV does not declare a numeric type. Preserving text avoids losing leading zeros or guessing whether a date, code or number was intended.

Will quoted line breaks work?

Yes. A line break inside a properly quoted field stays inside that value rather than starting a new record.

Does JSON-to-CSV preserve every JSON structure?

No. This tool supports flat objects. Nested values are rejected; null and missing fields become empty cells, and formula-like text is protected on export.

Sources and verification

These references explain the formulas or formats. The worked examples above were created for this tool and checked against independent calculations or format round trips. AI-assisted development does not imply a named human expert review.

  • RFC 4180: CSV format — Quoted fields, embedded quotes, header records and row structure; an informational RFC.

Published 2026-10-23. Examples are illustrations, not measurements of a service or claims about search rankings.

Related tools

JSON formatter and validator

Validate and format JSON with two-space, four-space or compact output. Preserve numeric tokens, string escapes, key order and duplicate keys as written.

Text and UTF-8 byte counter

Count UTF-8 bytes, Unicode code points, UTF-16 units, grapheme clusters, lines and whitespace-separated words. Inspect the difference with emoji.

URL encode and decode

Percent-encode a URL component or decode UTF-8 percent escapes. Choose literal-plus or form-plus interpretation explicitly.

All calculators and developer tools · Source-checked guides · How Ithy checks sources