CSV to JSON
Convert CSV data with headers into JSON array.
Convert CSV rows into a JSON array of objects, using the first row as keys. Handy for APIs, config files and quick data migrations.
Loading the interactive tool… This page needs JavaScript to run the CSV to JSON.
How to use CSV to JSON
- Paste the data, code, token, or value you need to inspect.
- Set any format, encoding, or validation options.
- Run the tool and inspect the result or diagnostic output.
- Copy the output into your terminal, editor, API client, or project.
How CSV to JSON works
Paste CSV with a header row and the tool converts each following row into an object keyed by the headers, returning a formatted JSON array. It separates fields at commas, supports double-quoted fields that contain commas, and reads two quotes in a row as one literal quote. All values come out as strings, so 30 stays as the text 30, missing cells become empty strings, and other delimiters such as semicolons are not detected.
Worked example
Input: header name,age then rows Ann,30 and Lee, Jo in quotes,25 → Output: a JSON array with name Ann age 30 and name Lee, Jo age 25, all values as strings.
Common uses
- Turn a spreadsheet export into JSON for an app or test fixture.
- Prepare sample data for an API request.
- Convert a small contact list into structured data.
Best for
- developer workflows
- quick csv to json tasks
- browser-based utility work
Tips for better results
- Validate the output before using it in production code.
- Treat tokens, credentials, and secrets as sensitive even when processing happens locally.
- For large payloads, keep an original copy so you can compare changes.
Frequently asked questions
Does the first row have to be a header?
Yes, the header row provides the property names for each object.
How are quoted values handled?
Fields wrapped in double quotes can contain commas and line breaks and are parsed correctly.
Are numbers converted?
Values are kept as strings unless they are clearly numeric, so check the output types before using them.
Related tools
- JSON to CSV — Convert a JSON array of objects into CSV data.
- JSON to YAML — Convert JSON data into readable YAML.
- JSON to TypeScript — Generate TypeScript interfaces from JSON.
- JSON Diff — Compare two JSON documents and list every difference.
- JSON Formatter — Beautify and validate JSON with indentation.
- JSON Minifier — Remove JSON whitespace for compact payloads.