CSV to JSON converter

Turn a CSV file into a JSON array of objects in your browser. Optional type inference, header control, and no upload.

About this converter

Almost every data pipeline eventually needs the same translation: a CSV that came out of a spreadsheet, a database export or a vendor report, turned into the JSON an API, a test fixture or a frontend actually consumes. Writing a one-off script for this is a five minute job you end up doing repeatedly, and the edge cases - quoted commas, embedded newlines, a stray byte order mark at the start of the file - are exactly the ones a quick script gets wrong.

This converter produces a JSON array of objects using the first row as the keys. It follows RFC 4180, so quoted fields containing commas stay intact, doubled quotes inside quoted fields are unescaped correctly, and a UTF-8 BOM left behind by Excel is stripped rather than becoming part of your first key name.

Optional type inference converts numeric strings to numbers and the literals true and false to booleans. That is usually what you want for a test fixture and usually not what you want for data containing zip codes, phone numbers or IDs with leading zeros, so it is off by default.

The conversion happens in your browser. No upload, no server-side copy, no logging - which is the difference between safely converting a customer export and pasting it into a tool whose retention policy you have not read.

Frequently asked questions

Why did my leading zeros disappear?
Type inference converted the value to a number. Turn inference off to keep every value as a string, which is the right choice for zip codes, phone numbers and IDs.
Can it handle newlines inside a field?
Yes, provided the field is quoted as RFC 4180 requires. The newline is preserved inside the string value.
What if my file has no header row?
Turn off the header option and you get an array of arrays instead of an array of objects.

Related converters