CSV to JSON Converter
Turn spreadsheet rows into structured JSON objects.
A spreadsheet export lands in your inbox as rows and columns, and the API you need to feed it into wants an array of objects. That gap is the entire job of this converter: turn each row into {"name": "value"} pairs and each header into a key.
The part nobody warns you about: everything is a string
CSV has no concept of a data type. Every single cell, whether it looks like a number, a date or a boolean, is just text separated by commas. A converter has to guess what 42, true or 2026-09-14 actually mean, and different tools guess differently.
That guessing causes one very specific and very common bug: a product code or postcode written as 01234 gets read as the number 1234 once a converter decides it looks numeric, and the leading zero is gone for good. If any column holds codes rather than quantities, force it to stay a string rather than letting auto-detection run over it.
Commas inside your data and lines that do not end
CSV uses the comma as both the column separator and, inevitably, a character that shows up inside real data — a company name like Smith, Jones & Co being the classic case. The fix defined in RFC 4180 is to wrap that field in double quotes, and to double up any quote mark that appears inside it as "".
A quoted field is also allowed to contain a line break, which means a single logical row can legitimately span several physical lines in the file — a full postal address in one cell is a common example. A correct parser tracks whether it is inside an open quote and ignores newlines until that quote closes; a naive one that just splits on line breaks will shred that row in two.
What a CSV to JSON conversion has to decide
| CSV input | Naive guess | Better handling |
|---|---|---|
01234 | Number 1234 | Keep as string "01234" |
true | String "true" | Boolean true, if the column is consistently boolean |
| (empty cell) | Empty string "" | null, if the schema expects it |
"Smith, Jones" | Split into two fields | One field, quotes stripped |
CSV to JSON questions
Why did my ID numbers lose their leading zeros?
Because the converter treated a text column as numeric. A code like 00452 is not the number 452 with padding; it is a five-character string. Mark that column as text before converting, or the leading zeros will not come back.
What happens to an empty cell?
Most converters turn it into an empty string, which is not the same as null or a missing key. If your downstream code checks for null specifically, you may need to post-process empty strings after conversion.
Does the header row have to match the JSON keys exactly?
Yes, by default the first row supplies the property names verbatim, spaces and all. Clean up header names such as "First Name " before converting if you want tidy keys like first_name in the output.
Can a CSV file represent nested JSON?
Not directly. CSV is flat by design, so a nested structure has to be flattened into dotted column names such as address.city on the way in, and reconstructed into nesting on the way out.
Is my file uploaded anywhere?
Yes. Your file is sent to the server to be converted, but it is not retained once processed. See our privacy policy for details.