Free tool
CSV to JSON.
Paste CSV, TSV or a spreadsheet range and get JSON — an array of objects, arrays, a column map or NDJSON. Numbers and booleans come out typed, but ZIP codes, leading-zero IDs and order numbers too long for JavaScript stay strings, and customer.name headers come out nested.
data.csv
197 B3 records × 6 fields
data.json
Shape
Types
Indent
Delimiter
Not everyone who needs this data reads JSON. Publishes it to Comma as a readable table with the JSON folded underneath — one link, private or open to anyone who has it, and reviewers comment on the exact row. Free, no card.
What the converter gets right
- Leading zeros survive. A cell only becomes a JSON number if writing it back gives the same text, so
02139stays"02139", while184.50and1e3become numbers. - Long IDs aren’t rounded. JavaScript numbers are exact only up to 9,007,199,254,740,991. An integer past that — an order number, a snowflake ID — stays a string instead of quietly changing its last digits.
- No column is lost. Blank headers become
column_Nand duplicates get_2,_3, where a naïve converter lets the last one overwrite the rest. - Nested output.
customer.nameandcustomer.zipbecome onecustomerobject — the reverse of how the JSON to table tool flattens nested fields. - Real CSV parsing. Quoted fields per RFC 4180, embedded commas and line breaks, doubled quotes, and comma, tab, semicolon or pipe delimiters detected automatically.
Which shape to pick
- Objects
- Array of objects, one per row, keyed by the header. What almost every API, fixture file and JavaScript chart library expects.
- Arrays
- Array of arrays, header row included. Smallest output, and lossless for CSVs without a meaningful header row.
- Columns
- One object, each header mapped to its column of values. The shape pandas' DataFrame constructor and most charting series take.
- NDJSON
- One compact object per line (JSON Lines). For log pipelines, BigQuery and Elasticsearch bulk loads, and anything that streams records.
Questions
- How do I convert CSV to JSON?
- Paste the CSV into the editor on this page or drop a .csv file onto it. The JSON is generated as you type — an array of objects keyed by the header row by default. Copy it, download a .json file, or switch the shape to arrays, columns or NDJSON. Nothing installs and nothing uploads.
- Does it keep leading zeros in ZIP codes and IDs?
- Yes. Type detection only turns a cell into a JSON number when the number round-trips exactly, so 02139, 007 and phone numbers stay strings. Integers too large to represent exactly in JavaScript (beyond 9,007,199,254,740,991 — long order numbers, Twitter-style IDs) also stay strings instead of being silently rounded.
- Can it create nested JSON from CSV?
- Yes. With “Nest dotted headers” on, a header like customer.name becomes {"customer": {"name": …}}. If a plain customer column also exists, the dotted columns stay flat so neither value overwrites the other.
- What happens with duplicate or empty column headers?
- Empty headers become column_1, column_2 and so on by position, and a repeated header gets a _2, _3 suffix. Most converters let the last duplicate win, which quietly drops a column of data.
- Can I paste from Excel or Google Sheets?
- Yes. A copied spreadsheet range is tab-separated, and the delimiter is detected automatically. Semicolon-separated exports from European Excel locales and pipe-delimited files are detected too.
- What is the difference between JSON and NDJSON output?
- JSON output is one array containing every record. NDJSON (newline-delimited JSON, also called JSON Lines) puts one compact object per line with no enclosing array, which is what log pipelines, BigQuery and Elasticsearch bulk loads, and most streaming tools expect.
- Is my data uploaded anywhere?
- No. Parsing and conversion happen in your browser. The data only leaves your machine if you click “Share as a table” and create a report.
- How do I send the data to someone who doesn't read JSON?
- Click “Share as a table”. The rows are published to Comma as a readable HTML table with the JSON underneath — one link that renders the same for everyone, where reviewers can comment on a specific row. Comma is free.
Related: JSON formatter · JSON to CSV · JSON to HTML table · CSV to HTML table · CSV to chart · YAML to JSON · Excel to HTML table · all free tools