CSV ↔ JSON Converter
Convert CSV → JSON and JSON → CSV both ways. The parser handles quotes, escapes ("") and commas/line breaks inside quoted fields (basic RFC 4180).
Convert CSV → JSON and JSON → CSV both ways. The parser handles quotes, escapes ("") and commas/line breaks inside quoted fields (basic RFC 4180).
CSV (Comma-Separated Values) and JSON (JavaScript Object Notation) are two ubiquitous formats for exchanging tabular data. Spreadsheets, database exports and reports usually come out as CSV; APIs and configuration files speak JSON. This tool converts between the two both ways, directly in your browser.
The parser follows the essentials of RFC 4180: fields can be wrapped in double
quotes, and inside them commas, line breaks and escaped quotes ("") are
handled correctly. You can choose the delimiter (comma, semicolon
or tab) and indicate whether the first row is the header. With a header, the
result is an array of objects; without one, an array of arrays.
For the reverse path, the JSON needs to be an array: either of objects (the keys become the header columns, merging the keys from every item) or of arrays (each array becomes a row). Values with a comma, quotes or a line break are automatically escaped with double quotes.
No — CSV values are kept as text on purpose, to guarantee that
a round trip (CSV → JSON → CSV) preserves the content exactly, without risking losing leading
zeros (for example, a ZIP code 01000) or rounding large numbers.
If, for example, there are quotes that open but never close, the tool shows a readable error message instead of generating an incorrect result or crashing the page.
Yes. When generating the CSV, the tool gathers the union of all keys in the order they appear; items missing a given key end up with an empty cell.