CSV to JSON Converter
Converts delimited rows into an array of JSON objects keyed by the header row.
Loading the tool…
How to use this tool
- Paste the CSV, or choose a file.
- Decide whether numbers and booleans should become real JSON types.
- Select Convert to JSON, or Convert to JSON Lines for one record per line.
- Copy or download the result.
What csv to json does
CSV carries no type information at all: every field is text, and the difference between the number 42 and the string "42" simply is not recorded. Converting to JSON forces a decision about that. With type inference on, values that look like numbers and booleans become real JSON numbers and booleans, and empty fields become null; with it off, everything stays a string, which is safer for identifiers such as postcodes and product codes that start with a zero.
The header row becomes the object keys, so a file with columns id, name and city produces objects with exactly those three properties in that order. Rows with fewer fields than the header still get every key, with an empty value for the missing ones, which keeps the array uniform and makes it safe to feed into code that expects a consistent shape.