Data tools

CSV to Parquet

Convert a CSV to a Parquet file. Every column is written as text (Parquet BYTE_ARRAY/UTF8), same reasoning as json-csv-convert: CSV has no type system, so a numeric-looking cell is stored as its exact original text, never parsed and reformatted as a number. Quote-aware. A record whose quoted field contains a literal newline stays one record. Runs entirely on your device.

Runs on your device. The file is never uploaded.

CSV to Parquet writes a CSV as a Parquet file of one row group, every column BYTE_ARRAY with the UTF8 annotation. Cells keep the characters they arrived as, so 007 stays 007 rather than becoming a number. A header naming one column twice is refused, since the Arrow readers behind pandas, Polars and DuckDB cannot open the result.

Input

Options

Questions

Are my numbers stored as numbers?

No. Every column is written as text, using Parquet BYTE_ARRAY with the UTF8 annotation. CSV has no type system, so a numeric looking cell is stored as its exact original characters rather than parsed and reformatted. That means 007 stays 007 and a long decimal keeps every digit it had. Cast the columns in whatever reads the file if you need real numeric types.

Why was my file refused for duplicate column names?

Because the header names the same column more than once, and the readers you would open the result with cannot handle that. Parquet allows duplicate field names, but the Arrow based readers used by pandas, Polars, DuckDB and Spark refuse such a file outright. Writing it and reporting success would leave you to hit the problem in another program, so it is refused here, with the duplicate names listed.

Is the output compressed?

No. The writer produces the simplest legal Parquet file: one row group, every column PLAIN encoded and uncompressed, with no statistics. There is no compression option. If you need Snappy or a smaller file, write it with a full Parquet library after this conversion, or gzip the result.

What happens to rows with extra cells?

The extra cells are dropped, and you are told. Exactly as many columns as the header names are written, so anything past that is discarded, and the result reports how many rows were ragged and how many cells went with them. Rows shorter than the header are padded with empty strings.

What if my CSV has no header?

Turn hasHeader off and the columns are named col1, col2 and so on, with the width taken from the widest row in the file, and every row treated as data. With hasHeader on, which is the default, the first row supplies the column names.

Can it read the Parquet back?

Yes, with Parquet to CSV, which reads what this writes and round trips a header only file back to a header only CSV. Both run entirely in your browser with nothing uploaded, and the whole dataset is held in memory during the conversion, so your device sets the size limit.

Related Data tools