What is a CSV to JSON Converter?
CSV and JSON are two ways to write the same table. CSV stores rows as lines and columns as delimiters, which makes it compact and readable but ambiguous — nothing in the file says whether the first line is a header or just data. JSON stores the same table as an array of objects, where every value is explicitly named and typed. Converting between them is mostly about deciding what the columns are called.
The parser here is quote-aware, which is what separates it from splitting a line on commas. A field wrapped in double quotes may contain the delimiter, a line break or a doubled quote standing for a literal one, so a naive split breaks the moment an address or a note contains a comma. This parser reads the file character by character and only treats a delimiter as a delimiter when it is outside quotes.
The reverse direction handles the parts JSON has that CSV does not. Nested objects and arrays cannot become a flat cell, so they are written out as JSON text inside the cell rather than being dropped, and a property that appears in one record but not another still gets a column. Duplicate header names are suffixed so the second one cannot overwrite the first.
How to convert CSV to JSON
- Choose the direction. CSV → JSON turns a table into an array of objects; JSON → CSV flattens the other way.
- Pick the delimiter your file actually uses. Comma is the default, but european exports often use semicolons and copied spreadsheet data comes out tab-separated.
- Paste the data into the left box. For CSV → JSON, leave "First row is the header" on to use the top line as the property names, or turn it off to get an array of arrays.
- Toggle pretty-printing if you want indented JSON, or turn it off to get the most compact form — useful when the output goes straight into a URL or a config file.
- Copy the result, or download it as data.json or data.csv. Nothing is sent anywhere; the conversion runs in the page.
CSV to JSON Converter limits and rules
| Item | Limit |
|---|---|
| Delimiters | Comma, semicolon, tab and pipe |
| Quoted fields | Embedded delimiters, line breaks and doubled quotes are handled |
| Headers | Optional — without them the output is an array of arrays |
| Duplicate header names | Suffixed (name, name_2) rather than overwritten |
| Empty header cell | Named column_1, column_2 and so on by position |
| Nested JSON values | Written as JSON strings inside the cell; CSV has no nested structure |
| JSON input | An object or an array of objects; an array of primitives becomes a single value column |
| Output type | CSV output keeps values as strings — CSV has no numbers, booleans or nulls |
| Not covered | Encoding detection, Excel .xlsx files, delimiter auto-detection and multi-line header rows |
| Pasting from Excel | Choose Tab as the delimiter; Excel copies cells tab-separated and newline-separated |
When to use it
- Turning a CSV exported from a spreadsheet, a CRM or an analytics tool into JSON for a JavaScript app or a test fixture.
- Producing a CSV to open in Excel or Google Sheets from an API response that arrives as JSON.
- Converting a semicolon-separated export from European software, which a comma-splitter would parse as one wide column.
- Cleaning up a file where a field contains commas, line breaks or quotes — the case that breaks naive converters and produces rows with the wrong number of cells.
- Preparing seed data, where a small table is much easier to maintain in a spreadsheet and needs to be committed as JSON.
Is it private?
Everything runs inside your browser. Your text and files are never uploaded, never stored and never seen by anyone else — including me. You can use the tool with the network tab open and watch no request leave the page. Closing the tab erases the input.
Frequently asked questions
No. The parsing and conversion run in JavaScript in your own tab, so the file never leaves your machine. That matters more than usual here, because CSV exports routinely contain customer lists and other personal data.
Almost always an unquoted field containing the delimiter. A note like Smith, John splits into two cells unless it is wrapped in double quotes. Check the offending row for a bare comma, semicolon or tab inside a value, then re-export with quoting enabled.
In CSV → JSON every cell comes through as a string, because CSV itself has no type information — "007" and 7 look identical in the file. Convert the types you need after parsing, or use a JSON schema. Numbers and booleans survive JSON → CSV → JSON only if you cast them back.
Not straight from .xlsx, which is a zip of XML rather than text. Use File → Save As → CSV in Excel, choosing the comma or semicolon delimiter to match your locale, then paste the result here.
They are serialised as JSON text inside the cell. A nested object cannot be a CSV cell, and flattening it into dotted column names would guess at your intent, so the full value is preserved as a string you can parse again later.
Related tools
Written and maintained by Md. Nur Hossain Repon.