CSV to JSON Converter
Convert CSV data into a JSON array of objects.
[
{
"name": "Alice",
"age": "30",
"city": "Paris"
},
{
"name": "Bob",
"age": "25",
"city": "Berlin"
}
]Paste CSV data (with a header row) to convert it into a clean JSON array of objects — handy for APIs, configs and quick data wrangling. Handles quoted fields. Runs locally in your browser.
Formula / method
Examples
[{"name":…},{"name":…}]
kept as one value
How the conversion works
Paste comma-separated data and this tool reads the first row as the column headers, then turns every following row into a JSON object whose keys are those headers and whose values come from the cells. The whole set of rows becomes a JSON array of objects, which is the shape most APIs, JavaScript apps and NoSQL databases expect. The conversion runs locally in your browser, so your data is never uploaded.
Fields wrapped in double quotes are handled so that a value containing a comma is not split by mistake, which is the usual reason a naive conversion goes wrong.
Getting clean results
For a tidy output, make sure the header row is present and that every data row has the same number of columns as there are headers; a missing or extra comma will shift values into the wrong keys. Watch out for stray commas inside unquoted text, and for regional files that use a semicolon as the separator.
Once you have the JSON, the JSON Formatter tool can pretty-print or validate it, which is a good final check before you feed the data into your application.
Where it's used
- Preparing a spreadsheet export for a REST API
- Seeding a NoSQL or JSON-based database from a CSV file
- Converting a data export for use in a JavaScript app
- Transforming a contact or product list for import elsewhere
- Quick, private data wrangling without uploading a file
Real-world examples
- 'name,age,city / Alice,30,Paris' becomes [{"name":"Alice","age":"30","city":"Paris"}]
- A quoted field like "Smith, John" stays as one value instead of splitting
- A 3-column, 50-row export becomes a 50-object JSON array
- The first row is read as the keys for every object that follows
A bit of history
The comma-separated values idea predates personal computers — IBM's Fortran compiler supported comma-delimited input/output as far back as 1972 — but it wasn't formally documented until RFC 4180 registered the 'text/csv' MIME type in 2005.
Did you know?
Because CSV went decades without a formal standard, quoting and delimiter rules still differ between programs — one reason some regional exports use a semicolon instead of a comma.
FAQ
What format does it expect?
Comma-separated values with a header row on top. Fields containing commas should be wrapped in double quotes, the standard CSV convention.