CSV to JSON & JSON to CSV Converter

Convert CSV to JSON and JSON to CSV in both directions, in one place, with support for different delimiters and automatic number detection. Also see a visual table preview of the CSV. No sign-up, everything runs locally in your browser.

Convert CSV to JSON

Convert JSON to CSV

View CSV as a table

From CSV to JSON

CSV (Comma-Separated Values) organizes data in rows and columns separated by a delimiter, usually a comma, while JSON represents the same information as a list of objects, one per row, with the column names as keys. When the first row of the CSV is treated as a header, each value in the following rows is matched to the corresponding column name at the same position.

Quoted fields and special characters

When a value needs to contain the delimiter itself, like a comma inside a name ("Smith, John"), the CSV standard requires wrapping that value in double quotes. If the value also has a double quote inside it, it is represented as two double quotes in a row (""). The converter on this page correctly understands that format, including fields with line breaks inside the quotes, in both conversion directions.

From JSON to CSV

To convert an array of JSON objects into CSV, the tool collects every key used in any of the objects and turns them into the header columns. Each object in the array becomes a row, with values placed in the column matching their key. It's common for an API to return objects where not all of them have exactly the same fields; in those cases, the converter builds a complete header and leaves the cell blank on any row that doesn't have that specific key.

Limitations with nested data

CSV is fundamentally a simple, two-dimensional table format, with no native way to represent objects inside objects. If a JSON value is itself an object, it will show up in the cell as generic text (something like "[object Object]"), and if it's an array, the items get joined into a single cell separated by commas. To correctly convert nested data, it's best to flatten the structure first, turning nested fields into their own columns, like "address_city" instead of an "address" object with a "city" property inside.

Choosing the right delimiter

Comma is the international default delimiter, but in countries where the comma is used as the decimal separator, it is common to find CSV files using semicolons instead, to avoid ambiguity with numbers like "3,14". TSV files (Tab-Separated Values), exported by some tools, use a tab instead of a comma or semicolon. If Excel opens everything into a single column when importing the generated CSV, try switching to semicolon, since that's often the default regional setting in those locales.

Converting numbers automatically

By default, every value in a CSV is plain text. The "convert numbers automatically" option identifies values that look like numbers, such as "28" or "3.14", and turns them into actual numbers in the generated JSON, instead of keeping them as quoted text. This is useful when the JSON will be consumed by a program that expects numeric values for calculations.

Frequently asked questions

How does the converter handle fields that contain commas?

Fields with the delimiter inside the value must be wrapped in double quotes in the CSV, and the converter recognizes that correctly in both directions.

What happens if the JSON objects have different keys from each other?

When converting to CSV, the converter collects every key found to build the header, leaving the cell blank wherever a key doesn't exist on that object.

Does the converter work with JSON containing nested objects?

CSV has no native support for nested structures. Nested objects turn into generic text; it's best to flatten the structure before converting.

What is the difference between using a comma, semicolon, or tab as the delimiter?

They are different conventions for separating columns. Semicolon is common where comma is the decimal separator, and tab is used in TSV files.