CSV to JSON, Excel or Parquet: Size and Speed Test
One file, three formats, real numbers. Which output is smallest, and which takes longest?
How we tested. We created one orders file with 100,000 rows and 7 columns. As a CSV it is 6.87 MB. We converted it with the Data Utility converter code in a Node test and measured the size of each result and the time the conversion took, including reading the CSV. The times come from one run on one computer, so treat them as a guide.
The results. CSV to JSON gave 14.76 MB (19.56 MB when pretty-printed) in 0.34 seconds. CSV to Excel (.xlsx) gave 4.41 MB in 1.1 seconds. CSV to Parquet gave 1.84 MB in 0.41 seconds. JSON is more than twice the size of the CSV, because every row repeats every column name. Excel is smaller than CSV because an .xlsx file is already compressed inside, but it is the slowest to write. Parquet is the smallest and also fast.
What happens when you compress them too. With gzip, the CSV drops to 1.41 MB, the JSON to 1.63 MB (1.78 MB pretty-printed), the Parquet file to 1.35 MB and the Excel file to only 4.20 MB, because it is compressed already. So a gzipped JSON or CSV can be nearly as small as Parquet, while a gzipped Excel file hardly changes.
Which one to pick. Use CSV for simple exchange, JSON for apps and APIs, Excel for people who work in spreadsheets, and Parquet for analytics and storage. Do not pretty-print JSON for storage, because it adds about 30 percent for no benefit. All conversions run in your browser, so you can repeat this test on your own file.
Related tool pages
- JSON to CSV Converter: Convert JSON to CSV online for free. Drop a file or paste data, click convert and download. It runs in your browser, so your data is never uploaded.
- CSV to JSON Converter: Convert CSV to JSON online for free. Drop a file or paste data, click convert and download. It runs in your browser, so your data is never uploaded.
- CSV to Parquet Converter: Convert CSV to Parquet online for free. Drop a file or paste data, click convert and download. It runs in your browser, so your data is never uploaded.
- JSON to Parquet Converter: Convert JSON to Parquet online for free. Drop a file or paste data, click convert and download. It runs in your browser, so your data is never uploaded.
- Parquet to CSV Converter: Convert Parquet to CSV online for free. Drop a file or paste data, click convert and download. It runs in your browser, so your data is never uploaded.
- Parquet to JSON Converter: Convert Parquet to JSON online for free. Drop a file or paste data, click convert and download. It runs in your browser, so your data is never uploaded.
How to use the Format Converter: step by step
- Open the Format Converter.
- Drop in your CSV.
- Convert to JSON, Excel and Parquet.
- Compare the downloaded file sizes.
When to use the Format Converter
- Choose a format before exporting a big table
- Estimate storage for a data export
- Explain why a JSON file is so large
- Decide whether to gzip a file
Example
Input: id,name,age 1,Ada,36 2,Alan,41
Output: [{"id":1,"name":"Ada","age":36},{"id":2,"name":"Alan","age":41}]
Frequently asked questions
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: Minified JSON is much smaller than pretty-printed JSON. Turn off Pretty JSON when the file is not for people to read.