JSON Dataset to CSV for Machine Learning

Datasets from APIs and scrapers come as JSON. Most training code and tools want a flat table.

Open the JSON to CSV converter

Open the JSON to CSV converter and drop the dataset. A list of records becomes rows and nested objects become columns named by their path, such as user.age. Keep flatten on for nested records.

Check the columns. Records with different fields get a column for every field, with empty cells where a record lacks it, so look at how many blanks each column has with the Data Profiler. Decide whether to fill or drop them before training.

CSV does not store types, so your code must read numbers and dates itself. If you need typed columns, export Parquet instead.

Everything runs in your browser and nothing is uploaded.

Open the JSON to CSV converter

Related tool pages

  • JSON, CSV, Parquet and Excel Converter: Convert between JSON, CSV, Parquet and Excel online for free, one file or a whole folder. It runs in your browser, so nothing is uploaded.
  • CSV to JSON Converter: Convert CSV to JSON in seconds. Drop a file or paste data and download the result. Private: it runs in your browser and nothing is uploaded. Large files too.
  • CSV to Parquet Converter: Convert CSV to Parquet in seconds. Drop a file or paste data and download the result. Private: it runs in your browser and nothing is uploaded. Large files too.
  • JSON to Parquet Converter: Convert JSON to Parquet in seconds. Drop a file or paste data and download the result. Private: it runs in your browser and nothing is uploaded.
  • Parquet to CSV Converter: Convert Parquet to CSV in seconds. Drop a file or paste data and download the result. Private: it runs in your browser and nothing is uploaded. Large files too.
  • Parquet to JSON Converter: Convert Parquet to JSON in seconds. Drop a file and download the result. Private: it runs in your browser and nothing is uploaded. Large files too.

How to use the JSON to CSV converter: step by step

  1. Open the JSON to CSV converter.
  2. Drop the dataset with flatten on.
  3. Profile the columns for blanks.
  4. Download CSV.

When to use the JSON to CSV converter

  • Flatten a scraped dataset
  • Prepare API data for training
  • Check which fields are often missing
  • Share a flat file

Example

Input: [{"id":1,"name":"Ada","age":36},{"id":2,"name":"Alan","age":41}]

Output: id,name,age 1,Ada,36 2,Alan,41

Frequently asked questions

How do I convert JSON to CSV?

Drop your JSON file (or paste the data), check the options, click Convert and download the CSV result.

How big can a file be?

It depends on your device. A few hundred MB usually works.

Which conversions does the Format Converter support?

Any direction between JSON, CSV, Parquet and Excel (.xlsx), for one file or a whole folder. Nested JSON is flattened into columns such as address.city. For Excel, the first sheet is read; old .xls files are not supported.

Why did my number or date change after converting?

Types are detected from the values. Turn off "Detect types" to keep everything as text, which also keeps leading zeros in IDs and phone numbers.

Tip: Look at blanks per column. A field that exists in only some records is easy to miss.