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.
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.
Two data rows become two JSON objects; the comma in Lin, Mei stays inside one 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.
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 stringsLimit: 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.
CSV does not declare a numeric type. Preserving text avoids losing leading zeros or guessing whether a date, code or number was intended.
Yes. A line break inside a properly quoted field stays inside that value rather than starting a new record.
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.
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.
Published 2026-10-23. Examples are illustrations, not measurements of a service or claims about search rankings.
Validate and format JSON with two-space, four-space or compact output. Preserve numeric tokens, string escapes, key order and duplicate keys as written.
Count UTF-8 bytes, Unicode code points, UTF-16 units, grapheme clusters, lines and whitespace-separated words. Inspect the difference with emoji.
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