Developers often receive data as a CSV but need JSON for a website, an app or an API. Converting by hand is slow and easy to get wrong. A converter does it in a second and keeps the structure clean.
How the conversion works
The first row of the CSV is used as the key names. Each following row becomes one object. A file with the headers name and age and two data rows becomes a list of two objects, each with a name and an age.
How to convert
- Open CSV to JSON and choose a file, or paste your CSV.
- Keep First row is the header on if your file has column names.
- Turn on Turn numbers into numbers if you want 30 instead of "30".
- Choose the indent and copy or download the JSON.
Numbers or text?
Prices and quantities are usually better as numbers. IDs, pin codes and phone numbers should stay as text, because leading zeros would be lost. If a column mixes both, leave the option off and convert later in your code.
Checking the result
- Make sure every header is unique, or later columns will overwrite earlier ones.
- Check that commas inside names are wrapped in quotes in the CSV.
- Paste the output into a JSON formatter if you want to validate it further.
Frequently asked questions
What if my file has no header row?
Turn the header option off. The columns are then named Column 1, Column 2 and so on.
Can I download a minified file?
Yes. Choose Minified for the smallest size.
Is my data uploaded?
No. Everything stays in your browser.
Ready to start?
Open CSV to JSON