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).

Direction

What does this tool do?

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.

How CSV is parsed

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.

How JSON becomes CSV

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.

Frequently Asked Questions (FAQ)

Do CSV numbers become numbers in the JSON?

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.

What happens with a malformed CSV?

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.

Can I convert JSON with objects that have different keys?

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.