Skip to main content
WizTools123
WizTools123
Free Online Tools

Tool Categories


CSV Tools New Tool

Free Online CSV to JSON and JSON to CSV Converter

Turn a CSV export into JSON, or a JSON array of objects into a spreadsheet file. The delimiter is detected and can be overridden, numbers and booleans can become real JSON types, and nested objects are flattened to dotted column names. It runs in your browser.

Free Forever Nothing Uploaded Both directions in one page Runs in your browser
Free Online CSV to JSON and JSON to CSV Converter
Share this tool
Advertisement Slot (Top Banner) Google AdSense Unit • Responsive Banner
CSV & JSON Converter Everything happens in this tab. Nothing you paste is sent anywhere.
Your data
Result
Direction
Reading the CSV
Writing the CSV

Converted.

delimiter - 0 records 0 columns 0 bytes out

Buy Us A Coffee

Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.

Buy Us A Coffee
Sponsored Content (Below Tool) Google AdSense Placement

Why the Delimiter Has to Be Guessed

A file with the wrong separator is not broken, it is just read wrongly.

There is no marker inside a CSV file that says which character separates the fields. The name says comma, but Excel on a machine set to most of Europe writes semicolons, because in those locales the comma is the decimal point. Databases often export tabs, and some logging tools use a pipe because it almost never turns up in real text.

So the separator is worked out by reading the first twenty lines with each candidate and seeing which one gives every line the same number of fields. Counting occurrences alone is not enough, because commas are common inside ordinary prose. If the guess is wrong, the whole file collapses into one very wide column, which is the usual cause of "my CSV is corrupt". Override it with the Delimiter box and it will read correctly.

How to Convert Between CSV and JSON

A few steps, and nothing is uploaded.

1
Paste your data A CSV export or a JSON array of objects. It converts as you type, and nothing leaves your browser.
2
Pick the direction CSV to JSON, or JSON to CSV. The options change to match, because the two directions need different questions answered.
3
Set the details Going to JSON: keys from the header row, real types, NDJSON. Going to CSV: the delimiter, dot flattening and quoting.
4
Copy or download Or press Use as input to send the result back to the left, which is how you check what the round trip cost you.

What to Know About CSV and JSON

Including exactly where the round trip loses something.

The round trip does not always give you back what you started with. JSON has types and nesting; CSV has neither. Going JSON to CSV and back again loses four things in particular. A number becomes the text "42" and only comes back as a number if you turn real types on. A null and an empty string both become an empty cell and are indistinguishable afterwards. A nested object becomes the column address.city, which comes back as a key literally named "address.city" rather than as nesting again. And an array inside a record is written as JSON text in the cell, so it returns as a string, not a list.
A leading zero is left as text on purpose. With real types on, 42 becomes a number and true becomes a boolean, but 007 stays the string "007". Values with leading zeros are nearly always codes: postcodes, account numbers, product references. Turning them into numbers throws away the zeros and quietly corrupts the data, which is exactly what spreadsheets are notorious for doing.
The delimiter is guessed by consistency, not by counting. The first lines are read with a comma, semicolon, tab and pipe in turn, and the winner is the one that gives every line the same field count. That is why a European semicolon file is read correctly here even though the extension says csv. The box lets you override the guess when your file is unusual.
The column list comes from the keys, so a missing key is an empty cell. Going from JSON to CSV, the header is the union of every key across all the records, in the order each was first seen. A record that lacks one of those keys gets an empty cell in that column. There is no way to tell that cell apart from a key that was present and empty, which is a limitation of CSV rather than of this page.

Key Features & Capabilities

What this tool does, and what it deliberately does not.

Both directions CSV to JSON and JSON to CSV on one page, with the right options for each.
Delimiter detection Comma, semicolon, tab or pipe, worked out from your file and overridable.
Types where you want them Numbers and booleans become real JSON types, and codes keep their zeros.
Dotted flattening Nested objects become address.city columns, or JSON text if you prefer.
As you type No run button. The result and the counts update while you edit.
Nothing uploaded Exports usually hold customer data. It is parsed in your tab and stays there.

About the CSV and JSON Converter

CSV and JSON are the two formats data actually arrives in. Spreadsheets, accounting systems and database exports speak CSV; APIs, configuration and anything written this century speak JSON. Moving between them is one of those small jobs that comes up constantly, and the usual answer is either a paid converter that wants your file on its server or a quick script that gets the quoting wrong.

This page does both directions in the browser. Going to JSON it works out the delimiter, uses the header row for keys, and can turn plain text into real numbers and booleans. Going to CSV it takes an array of objects, flattens nested objects into dotted column names, builds the header from the union of all keys, and quotes only the fields that genuinely need it.

The awkward part of a converter like this is not the parsing, it is the honesty. CSV cannot express a type, a null, a nested object or an empty list, so a conversion in that direction always throws something away. Rather than pretend otherwise, the page names each loss and leaves the choices with you, so you can decide whether a dotted column or a JSON string in a cell is the lesser evil for the job in hand.

Frequently Asked Questions

Delimiters, types, nesting and what does not survive the trip.

Because the delimiter being used is not the one in your file. Files written by Excel on a European locale use semicolons rather than commas, and database exports often use tabs. Detection normally catches this, but a file with only one or two lines gives it little to work with. Set the Delimiter box to the character your file actually uses.

Deliberately. A value with a leading zero is almost always a code rather than a quantity: a postcode, an account number, a product reference. Converting it to a number would drop the zeros and silently change your data. Numbers without leading zeros, along with true, false and null, are converted normally.

With flattening on, a nested object becomes dotted column names, so address.city and address.postcode each get their own column. With flattening off, the whole nested value is written into a single cell as JSON text. Arrays are always written as JSON text, because there is no sensible way to spread a list of unknown length across a fixed set of columns.

Yes, turn on NDJSON. Each record is written on its own line with no surrounding array and no commas between records. That is the format log pipelines, BigQuery, Elasticsearch bulk loads and most streaming tools expect, and it lets a consumer process one line at a time instead of loading the whole file into memory.

No. The parsing and writing both happen in your browser using JavaScript on this page, and there is no request to any server. That matters here more than with most tools, because a CSV export is usually a customer list, an order history or a payroll file. You can check in the Network tab, or disconnect and use the page anyway.

Every Other CSV Tool

16 more tools in this set. All free, all in your browser.

Advertisement Slot (Bottom Banner) Google AdSense Unit • Responsive Banner