โ‡„

CSV JSON Converter tabular

Convert CSV with a header row into a JSON array of objects, and JSON arrays back into CSV.

direction
delimiter
INPUTdata
0 lines 0 chars
1
OUTPUTresult
0 lines 0 chars
1
Tool Guide

What this tool does

CSV stores tabular data separated by commas and opens directly in spreadsheet software, which makes it the usual format when exchanging data with non-developers. Development work, on the other hand, mostly deals in JSON, so conversion between the two comes up often.

This tool treats the first CSV line as a header and uses each column name as a key. One data row becomes one object, and the whole file becomes an array of objects. In the other direction, keys from the JSON array form the header row and each object becomes a line.

When a value contains a comma, a quotation mark, or a line break, CSV wraps it in double quotes and doubles any internal quotes, following RFC 4180. Ignoring that rule shifts columns and misaligns the data.

When to use it

Use it to turn a spreadsheet from another team into JSON test data, to share a query result in a format colleagues can open, or to prepare mock data and review records before a migration.

Input and output examples

Input name,age,city alice,30,seoul bob,25,busan
Output [{"name":"alice","age":"30","city":"seoul"},{"name":"bob","age":"25","city":"busan"}]

The header row becomes keys and each row becomes an object.

Input [{"id":1,"memo":"a,b"}]
Output id,memo 1,"a,b"

A value containing a comma must be quoted so columns stay aligned.

Notes and limitations

CSV carries no type information, so every value converts to a string; convert numbers and booleans afterwards if needed. Values containing commas must be quoted or columns will shift. Spreadsheet software can also silently alter values with leading zeros or very long numbers, so take care with phone numbers, postal codes, and large identifiers. Non-ASCII text that appears corrupted in a spreadsheet is usually a UTF-8 byte order mark issue.

Frequently asked questions

Numbers come out quoted.

CSV has no types, so every field is read as a string. Cast the fields you need after conversion.

Non-ASCII text is corrupted in my spreadsheet.

The file is UTF-8 but the spreadsheet opened it with another encoding. Use the import dialog to select UTF-8, or save with a byte order mark.

Copied