The quick answer
Paste CSV with a header row and get a JSON array of objects: one object per data row, keys from the header, numbers and booleans detected automatically. Paste a JSON array and get CSV back, with a header from every key that appears and RFC 4180 quoting where values need it. Both directions run in your browser; nothing uploads.
How to use the converter
Pick the direction
Two mode buttons under the input and output panels: CSV → JSON (the default) and JSON → CSV. The output re-renders the moment you switch, so the same paste converted both ways takes two clicks.
Set the delimiter
The selector under the input offers Comma, Semicolon, Tab and Pipe. The setting governs how the CSV side is parsed; the JSON → CSV direction always writes commas, whatever the selector says.
Paste and read the note
Load example drops a small name-role-city table into the input so the mechanics are visible. After conversion, the note under the output reports the shape, such as 2 records × 3 columns, so a wrong delimiter or a missing header is obvious at a glance.
Copy, download or clear
Copy puts the result on your clipboard; Download saves it as converted.txt, which you rename to .json or .csv as needed; Clear resets the box for the next file.
CSV → JSON: exactly what happens
The first row is the header: each cell becomes a key, trimmed of surrounding spaces. Every following row becomes one JSON object, and each cell is trimmed and then converted by three rules applied in order. A plain number (optional minus, digits, optional decimal) becomes a JSON number. The literal true or false, in any capitalization, becomes a JSON boolean. Everything else stays a string. The result is a JSON array printed with 2-space indentation, ready to paste into code or a fixture.
Input
name,role,city Alice,Engineer,NYC Bob,Designer,LA
Output
[
{
"name": "Alice",
"role": "Engineer",
"city": "NYC"
},
{
"name": "Bob",
"role": "Designer",
"city": "LA"
}
]
Status note: 2 records × 3 columns. All strings, because none of these cells look like numbers or booleans.Quoted cells come through the RFC 4180 parser first: "Austin, TX" is one value even though it contains a comma, and "He said ""hello""" becomes the string He said "hello". The type rules then apply to the unquoted content, so a quoted 41.50 is still the number 41.50. Quotes group; they do not force strings.
JSON → CSV: exactly what happens
Paste an array of objects; a single object is wrapped into a one-row array automatically. The header is the union of every key that appears on any object, in first-seen order, so objects with different shapes still produce one coherent table with blank cells where a key is missing. Each row is written in header order, and any value containing a comma, a double quote or a newline is wrapped in quotes with embedded quotes doubled: exactly the RFC 4180 rules Excel and every database importer expect.
Input
[{"name":"Ada Lovelace","note":"Analytical Engine, 1843","nick":null}]Output
name,note,nick Ada Lovelace,"Analytical Engine, 1843", The note's comma forced quotes around that value; the name needed none (no comma, quote or newline inside); the null became an empty cell; the header came from the union of keys.
Nested objects and arrays are serialized as JSON text inside their cells (a JSON-in-CSV cell), not exploded into extra columns. If your JSON is nested and you want user.name as its own column, the nested JSON to CSV tool flattens with dotted paths, a different transformation with different output, which is why it is a separate page.
The delimiter selector: four files it exists for
- Comma: the RFC 4180 standard and the default of virtually every exporter. Start here, and check the note's column count if anything looks wrong.
- Semicolon: European-locale Excel writes semicolon-delimited CSV because the comma is the decimal separator in those locales. If your file looks one-giant-column, it is probably semicolon-delimited.
- Tab: what you get copying directly from Excel or Google Sheets, and what TSV files are. The tab option makes the paste convert cleanly without first saving a file.
- Pipe: legacy enterprise exports, database dumps and log-adjacent formats, where commas appear inside values too often to trust.
The tell for a wrong delimiter is instant. The record count is right but every row converts into one giant key, or the column count in the note is obviously wrong. One click on the right delimiter fixes it.
The leading-zeros trap (read this before converting ZIP codes)
The number-detection rule that makes 41.50 a number also makes 02134 the number 2134, and 007 the number 7. ZIP codes in the US Northeast, phone numbers without a plus, account IDs, SKU codes with leading zeros: all of them lose their zeros the moment they convert, silently. The same class of loss happens in Excel itself, which is where most people first meet it, and the fix is the same at both stages: identifiers must be text, not numbers.
- Before conversion: if the column is already text in your source (quoted or exported as text), a non-numeric character anywhere in the value keeps it a string here. Pure digits do not stay pure.
- After conversion: re-pad in the JSON, with a quick find for the affected field or a one-line script if the file is large.
- In Excel: open the import wizard (Data → From Text/CSV), set the identifier column to Text before the data loads, and never double-click-open a CSV with ID columns.
This converter treats pure-digit cells as numbers, which is what totals, quantities and prices want and what identifier columns need protection from. Know which columns are which before you paste.
When the JSON is not an array of flat objects
The JSON → CSV direction is built for tabular JSON: an array of objects with scalar values, which is what APIs return for lists and what spreadsheets export. Three shapes it meets, and what happens:
| Input shape | What you get | The better page |
|---|---|---|
| Array of flat objects | A clean table, the designed case | Here |
| Nested objects | JSON text in a cell; header from top-level keys only | Nested JSON to CSV (dotted-path flattening) |
| JSONL / NDJSON (one object per line) | Converts after you join the lines into an array | JSONL to CSV |
| A single object (not an array) | Wrapped into a one-row table automatically | Here |
The round-trip test: what survives CSV → JSON → CSV
Run the round trip on the example table, CSV → JSON → CSV, and inspect both ends. Header names survive (they became JSON keys and become the header again in the same first-seen order). Quoting survives in effect: a value that needed quotes in the original gets them re-added in the final CSV, because the quoting rule is applied on output, not stored from input. Row order survives untouched.
Input
name,location Ada,"London, UK"
Output
CSV → JSON:
[{"name":"Ada","location":"London, UK"}]
The quotes are gone because they were syntax, not data.
JSON → CSV (feed the JSON back):
name,location
Ada,"London, UK"
The quotes return exactly where the grammar requires them. The data made the round trip; only the syntax changed shape to suit each format.What does not round-trip is formatting. Number cells that were strings in the original CSV come back as JSON numbers, and blank cells interchange with empty strings. If you need byte-identical output, convert once and keep the original: the converter's job is faithful data, not faithful bytes.
CSV to JSON Converter vs the alternatives
| Tool | Both directions | Delimiter options | Type inference | Where the data goes |
|---|---|---|---|---|
| Toolzep CSV ⇄ JSON Converter | Yes, one box | Comma, semicolon, tab, pipe | Numbers and booleans | Stays in your browser |
| CSVJSON.com | Yes | Comma, semicolon, tab, pipe | Optional, configurable | Server-side processing |
| ConvertCSV.com | Yes | Several | Options | Server-side |
| TableConvert.com | Many formats | Several | Varies | Server-side |
| Python/pandas (command line) | Both, scripted | Any | Configurable | Local |
The differentiator worth repeating is the last column. The files people convert between CSV and JSON are exactly the files with customer names, email addresses and order histories in them. A browser-side converter cannot log what it never receives, and the offline test proves it on the spot: load the page, disconnect, convert the same file.
Frequently asked questions
How do I convert CSV to JSON?
Paste CSV with a header row, leave the direction on CSV → JSON, and the output panel shows a JSON array of objects, one object per row with keys from the header. The note under the output reports the record and column counts.
Can it convert JSON back to CSV?
Yes. The direction buttons switch the same box to JSON → CSV. Paste an array of objects, and the converter builds the header from the union of all keys and writes one row per object with RFC 4180 quoting where values contain commas, quotes or newlines.
Which delimiter does it support?
Comma (the default), semicolon, tab and pipe, selected under the input. The setting governs how the CSV side is parsed; the JSON → CSV direction always writes commas. Semicolon matters for European Excel exports, tab for spreadsheet copy-paste and TSV files, pipe for legacy logs and database dumps.
How are numbers and booleans converted?
In CSV → JSON, a cell that is a plain number becomes a JSON number (41.50 stays 41.50, not "41.50"), and true or false become JSON booleans. Everything else stays a string. This is also the trap: 007 becomes the number 7, so see the leading-zeros section.
What happens to leading zeros like ZIP 02134?
They become numbers and lose the zeros: 02134 turns into 2134. If your data has ZIP codes, phone numbers, account IDs or product codes, they must stay strings. The workaround is upstream: keep the column text-formatted, or re-add the padding after conversion.
How does it handle commas or quotes inside values?
The parser follows RFC 4180: values containing the delimiter, a double quote or a newline are wrapped in double quotes, and embedded double quotes are doubled ("" for "). A quoted "Austin, TX" stays one value; in the JSON → CSV direction the converter adds that quoting automatically.
What about nested JSON objects?
In JSON → CSV, nested objects are serialized as JSON text inside the cell. If you want nested objects flattened into dotted-path columns (user.name, user.address.city), use the dedicated nested JSON to CSV tool built for that.
Why did Excel destroy my CSV when I opened it?
Excel re-types columns on open: leading zeros vanish, long numbers become scientific notation, dates get reinterpreted. Convert the file here first, in the browser and untouched, or open Excel's import wizard and force text format on identifier columns.
Does the first row have to be a header?
Yes for CSV → JSON, because the first row becomes the JSON keys and should be column names. If your file has no header, add one (name, email, id) before converting; generated keys are worse than real ones.
Is my data uploaded anywhere?
No. Parsing, type conversion and quoting all run in JavaScript on your device. Nothing is transmitted, logged or stored, and the page keeps working offline, which matters because real CSV exports contain customer data.
Sources and further reading
Sources and further reading
- RFC 4180: Common Format and MIME Type for Comma-Separated Values (CSV) Files(rfc-editor.org)
- RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format(rfc-editor.org)
- MDN Web Docs: Working with JSON(developer.mozilla.org)
- W3C: Model tabular data with CSV on the Web(w3.org)
We cite primary sources (standards bodies, government agencies, official documentation) wherever they exist so you can verify every number on this page yourself.