CSV to JSON Converter
Convert a CSV file into a JSON array of objects. Choose the delimiter and whether the first row is a header, then copy or download the result. Everything runs in your browser — nothing is sent to a server.
| Delimiter |
|
|---|---|
| Use first row as header | |
| Pretty-print (with indentation) |
Enter some CSV to see the JSON output here.
How a CSV row maps to a JSON object
| A CSV row | name,age,city |
|---|---|
| The resulting JSON object | {"name": "...", "age": "...", "city": "..."} |
When the first row is used as a header, each subsequent row becomes an object keyed by the header's column names.
Tips
- With "Use first row as header" enabled, the first row's values become the JSON object's keys. Disable it to get generic col1, col2… keys instead.
- If the header has blank or duplicate column names, that column automatically falls back to a col{N} key so no value is lost.
- Pair this with the sister "JSON to CSV" tool to convert back and forth between CSV and JSON as many times as you need.
- Conversion uses an RFC 4180–compliant parser that correctly handles commas, line breaks, and escaped quotes ("") inside quoted cells, so complex CSV files exported from Excel convert correctly too.
FAQ
Side Note — Why APIs prefer JSON over CSV
CSV is great at representing flat, tabular data, but it can't express nested structures like arrays or nested objects. Most REST API responses use JSON precisely because a single record can freely embed arrays and objects — letting complex data structures that CSV simply can't express travel over the wire intact.
CSV still has advantages that are hard to give up: it opens instantly in Excel or a spreadsheet, and one row per record makes it easy for a human to eyeball. In practice, teams settle into "CSV for reporting and spot-checking, JSON for system-to-system integration" — which is exactly why a converter like this one stays useful.
Despite its name — JavaScript Object Notation — JSON is now supported as a standard data format in virtually every language, not just JavaScript. Since Douglas Crockford published the specification in 2001, it was deliberately designed as a minimal, language-independent way to represent data, which is a large part of why it spread so widely.