Free online CSV to JSON converter. Paste CSV or add a .csv, .tsv or .txt file, select a delimiter, press Convert and copy the JSON array of objects.
Data tools by OnlinePCApps since 2013
A spreadsheet speaks CSV while an API speaks JSON, so the same data has to cross between the two. The free online CSV to JSON converter turns every row into an object and handles the tricky parts on the way.
A CSV export from a spreadsheet or a database will not load into an API or a document store that wants JSON. Converting CSV to JSON online reads the header row into keys and every row into an object, so the data drops into JSON that fits.
Test fixtures, seed scripts and document stores like MongoDB load JSON, not CSV. The converter turns an export into an array of objects that a seed script or a fixture file takes as it is.
A comma inside a quoted field, a semicolon delimiter or a value that should stay a string trip up a naive split. An RFC 4180 parser reads the quoting correctly, so a name like Smith, John stays one field rather than two.
Paste CSV into the CSV / Tabular Input box, or select Upload to add a .csv, .tsv or .txt file. A spreadsheet export, a database extract or a TSV all work as input.
A Select Delimiter row offers Auto Detect, Comma, Tab, Semicolon and Pipe, and a Custom box takes any other character. Auto Detect is selected first, so most files need no change.
Press Convert. A JSON Output box opens with the delimiter, the header flag and the row count above it, and Copy JSON puts the array on the clipboard. Clear empties the panel.
To convert a CSV file is to move the same data from a table into a tree. The online CSV to JSON converter returns a JSON array of objects.
The header row becomes the keys and every row becomes an object, so the result is an array of objects. The panel runs one direction. To check or tidy the JSON afterward, use the JSON formatter.
Auto Detect is selected first. Comma, Tab, Semicolon and Pipe get a button, and a Custom box takes any other character. A semicolon suits a European locale, a tab suits a TSV export and a pipe suits some legacy files.
Above the JSON Output, a bar lists the delimiter used, whether a header was found and the row count. A Truncated flag appears when the result is cut short. Check the bar before copying the JSON.
The panel has no type switch, and a CSV value starts as text. Open the JSON Output and check that numbers, booleans and IDs like a ZIP code arrived the way the next system expects.
To convert CSV to JSON, to turn a spreadsheet into JSON and to export a CSV as an array of objects all name one task. A search for online CSV to JSON reaches the converter above, and the input stays as it is.
The file decides what the online CSV to JSON converter returns. The cases below run from clean to not on this page.
| The case | Result | What happens and why |
|---|---|---|
| CSV to JSON | array of objects | The header row becomes the keys, and every row becomes an object in one JSON array. |
| JSON to CSV | not on this page | The panel converts one way and has no JSON input. |
| Delimiter | auto or custom | Auto Detect, Comma, Tab, Semicolon and Pipe buttons, plus a Custom box for any other character. |
| Header row | result bar | The panel has no header switch. The result bar shows Header: Yes or No, so the read is visible. |
| Quoting | RFC 4180 | A comma inside a quoted field stays put, and doubled quotes are read. For why a CSV can still break, see Why CSV files break and what they never tell you. |
| Types | check output | The panel has no type switch. Check numbers and booleans in the JSON Output. |
| Output | copy only | Copy JSON puts the array on the clipboard. The panel has no download button, so save the pasted JSON as a .json file. |
| Leading zeros | check output | A ZIP code or a phone number with a leading zero needs a look in the JSON Output before use. |
| Source file | .csv .tsv .txt | Paste the text or select Upload. For a CSV with broken characters, see Character encoding explained and why text arrives broken. |
| Files per run | one | The panel takes one paste or one file at a time. Clear empties it for the next run. |
| Large result | Truncated flag | A Truncated flag appears beside the row count when the result is cut short. |
| Where it runs | on the device | The data is converted in the browser, so nothing is uploaded. |
How CSV Maps to JSON
CSV and JSON hold the same data in two different shapes. CSV is a flat table of rows and columns, the format every spreadsheet and database export speaks, with its rules set by RFC 4180. JSON is a tree of objects and arrays, the format web APIs and config files speak. Going from a CSV file to a JSON array is the tidy direction: the header row becomes the keys, every row becomes an object and the result is an array of those objects. The CSV side follows RFC 4180, so a comma inside a quoted field like Smith, John stays as one value rather than splitting the row, an edge case that a plain split gets wrong. The delimiter is the first choice worth understanding, since a semicolon file or a tab file split on commas lands in a single column. Auto Detect is selected first, and the result bar shows which delimiter was used. Types are the second. A value in CSV is always text, so check a ZIP code, a phone number or any ID with a leading zero in the JSON Output before use. The online converter returns one array per run. The references below define the formats.
Both the online converter and a pipeline convert a CSV file. The trade is between a quick paste and a scriptable, streaming run.
| Point of comparison | This tool This online converter On the device | A data pipeline A local terminal tool |
|---|---|---|
| Where the data goes | Stays in the browser | Stays on the machine |
| Price and caps | Free with no sign-up | Free tier often capped |
| A file of a million rows | Built for one file per run | Streams row by row |
| Reshape and filter | A straight CSV to JSON run | Miller and pandas transform |
| A quick paste and preview | Paste, convert, copy | A script to write first |
A pipeline with a tool like Miller or pandas wins for millions of rows or a conversion that also filters and reshapes the data. The online CSV to JSON converter wins for a quick paste, convert and copy with no install. Online file tools and whether yours uploads goes deeper on where a file goes.
The data is parsed and rewritten inside the browser by a client-side parser, so the work stays on the machine that opened it. Nothing is handed to a server, whichever way the conversion runs.
A CSV or a JSON export often holds real records, customer rows, order data or personal fields never meant for an outside server. A hosted converter would take all of it on upload, needless exposure when the browser can do the conversion locally.
All of these convert a CSV file. They vary on reach, on effort and on where the data goes.
Miller, pandas and PapaParse convert CSV well but need a terminal, a script or a library. A spreadsheet has no JSON export. The online CSV to JSON converter above needs a browser and a paste.
Three pointers lead to a cleaner result from the online converter.
A ZIP code, a phone number or an ID with a leading zero can lose it when read as a number. The panel has no type switch, so check the JSON Output and keep the original CSV for any column where the zero matters.
A name like Smith, John must sit inside double quotes in the CSV, or the comma splits it into two fields. A clean export already does this, and the online CSV to JSON converter reads the quotes.
A file from a European locale often uses a semicolon, and a spreadsheet export can use a tab. Leave Auto Detect on or select the matching button, so an entire row does not land in one column. The result bar shows the delimiter used.
The online CSV to JSON converter takes one paste or one file per run, which suits most everyday data. A file of millions of rows, or a conversion that filters and reshapes as it goes, belongs on the desktop edition or a tool like Miller, and both stream from disk.
A file of a million rows is streamed from disk row by row, past what one paste or upload on this page is built for.
A tool like Miller filters, sorts and reshapes the data as it converts, far past a straight change of format.
A conversion step runs inside an ingest or a build, so a feed is turned automatically with no manual paste.
No sign-up and no cost. Paste CSV into the online converter, select a delimiter and copy the JSON array.