CSV ↔ JSON Converter

Convert data from CSV to JSON or from JSON to CSV, processed locally in your browser.

When to use it

Useful for turning a spreadsheet exported as CSV into a JSON array of objects (for use in code or APIs), or the reverse: converting a JSON API response into a CSV spreadsheet.

How it works

For CSV → JSON, the first CSV row is treated as the header (field names). For JSON → CSV, the JSON must be an array of objects; CSV columns are generated from the keys found in those objects. Fields containing a comma, quote or line break are automatically quoted.

Example and format pitfalls

The CSV name,age followed by Ana,30 becomes [{"name":"Ana","age":"30"}]. Note that every CSV value is text, so 30 may arrive as a string and need casting in your code.

Spreadsheets exported from Excel in some regions use a semicolon as the separator and a decimal comma; if the output is one giant column, change the separator in the file before pasting.

JSON to CSV with uneven objects

When some objects have keys that others lack, the column is simply empty on the records without it. Nested objects do not fit naturally in a single cell, so flatten them first if you want useful columns.

Frequently asked questions

Is my data sent to any server?

No — all conversion happens locally in your browser, in JavaScript.

Does the CSV need a header row?

Yes, the first row must contain the field (column) names — they become the keys of each object in the JSON.

What about fields that contain line breaks?

A CSV field may contain line breaks when it is wrapped in quotes, and the converter honors that. A quote inside a field must be doubled (""); if the source file does not follow that rule, the output may shift columns.