CSV to JSON
Paste CSV with a header row to convert each row into a JSON object. Quoted fields are parsed correctly and numbers, booleans and null are auto-detected - all in your browser.
Loading…
About the CSV to JSON converter
This tool reads CSV text whose first line is a header row and turns each remaining line into a JSON object, using the header names as keys. It respects quoted fields, so values that contain commas or line breaks inside quotes are kept intact rather than split. It also tries to infer types: cells that look like numbers, true/false, or null become real JSON numbers, booleans, and null instead of strings.
How to use it
- Paste CSV that starts with a header row of column names.
- The JSON array of objects is produced automatically.
- Check that quoted fields and types parsed as expected.
- Copy the array into your code, fixture, or import script.
A common use case is converting a spreadsheet export into seed data for an app. One caveat: automatic type detection means a value like a ZIP code 01234 may be read as the number 1234, so quote columns that must stay text. The whole conversion runs in your browser, so your CSV is never uploaded.
Frequently asked questions
Does my CSV need a header row?
Yes. The first line is treated as the column names, which become the keys of each JSON object. Without a header the keys would be unknown.
How does it handle commas inside a field?
If a field is wrapped in double quotes, commas and line breaks inside the quotes are treated as part of the value rather than as separators, following standard CSV rules.
Why did a value like 007 turn into 7?
The converter auto-detects numbers, so leading zeros are dropped when a cell looks numeric. To keep codes or IDs as text, wrap those values in quotes in the source CSV.
Is my CSV sent to a server?
No. Parsing happens locally in your browser, so the data never leaves your device.