How to convert CSV to Parquet in your browser
A CSV file stores everything as text. Parquet stores each column with a real type and compresses it, which makes files smaller and faster to query in Spark, DuckDB, Athena, BigQuery and Snowflake. To convert csv to parquet, this page reads the whole CSV, decides a type for each column and writes a Parquet file you can download.
The Example button loads this file:
id,zip,name,joined,last_seen,balance,active,visits,country
1,02134,Ana Souza,2024-01-15,2024-03-01 09:30:00,1250.50,true,12,BR
2,10001,Ben Carter,2024-02-03,2024-03-02T18:05:10Z,0,false,3,US
3,00501,Chloé Martin,2023-11-30,2024-02-28 07:00:00,-87.25,true,40,FR
4,94105,Dev Patel,2024-03-09,,310,true,,IN
5,00000,Eli Cohen,2022-07-21,2024-03-05 23:59:59.250,19999.99,false,7,NAIt is written as these Parquet types: id and visits as 32-bit integers, zip, name and country as text, joined as a date, last_seen as a timestamp, balance as a double and active as a boolean.
Column types you can check and change
Detection reads every non-empty value in a column, not only the first rows, so a stray word on row 90,000 is not missed. A column becomes a boolean when every value is true or false in any capitalisation. It becomes an integer when every value is a whole number without leading zeros, a double when every value is a number, a date when every value is YYYY-MM-DD, and a timestamp when values are dates or date-times such as 2024-03-01 09:30:00 or 2024-03-02T18:05:10Z. Anything else is text.
- Integers use 32 bits when every value fits and 64 bits otherwise. A whole number beyond 64 bits keeps the column as text.
- Timestamps are stored in UTC with millisecond precision. A value without a time zone is read as UTC, and an offset such as +02:00 is converted. Digits beyond milliseconds are cut.
- A type that does not fit its values stops the conversion with the row and the value, for example Row 3, column "a": "x" is not a whole number.
Keep zip codes and IDs with leading zeros
The most common mistake in a CSV to Parquet conversion is turning 02134 into the number 2134. This tool treats a column of digits with a leading zero as an identifier and keeps it as text. In the example, the zip column is marked with a warning and stays Text, so 02134, 00501 and 00000 come out unchanged.
If you set such a column to an integer type yourself, the zeros are dropped, because that is what an integer is. You decide per column.
Missing values: empty cells, NULL and NA
Empty cells always become nulls, in every column type. The word NULL can be read as a null too, and it is on by default. NA and N/A are off by default, because NA is also real text in some data, such as the country code for Namibia. In the example, the country column keeps NA as a value. Turn the option on when NA means missing in your file.
The table shows how many empty cells each column has after these rules, so you can see the effect before you convert.
Compression, row groups and file size
- Snappy is fast and is what most tools write by default.
- Gzip makes smaller files and is slower to read.
- None stores the columns as they are.
- Row group size decides how many rows go in each block. Smaller blocks help tools skip data, larger ones compress a little better.
After conversion the page shows the CSV size, the Parquet size and the percentage. The ratio depends on your data, so it is shown instead of promised. Files with many repeated values shrink the most. A very small file can even grow, because Parquet adds its own footer.
Rows with the wrong number of fields
By default the conversion stops at the first row that has more or fewer fields than the header and tells you its row number, counting the header as row 1. You can instead pad short rows with empty cells and cut long ones, or skip those rows. The footer of the Columns and types table says how many rows were changed or skipped.
Convert CSV to Parquet with pandas or DuckDB
- pandas: pd.read_csv("data.csv").to_parquet("data.parquet")
- DuckDB: COPY (SELECT * FROM read_csv('data.csv')) TO 'data.parquet' (FORMAT PARQUET);
Code is the better choice for very large files and for jobs that repeat. This page covers CSV files up to 100 MB, where you want to see and set the types yourself without installing anything. The result opens in Spark, DuckDB, Athena and any other tool that reads Parquet, and you can check it with Parquet to CSV.
Limits and privacy
The CSV must be UTF-8 text. Only flat tables are written: no nested columns, no partitioned folders and no Excel input. For Excel files, use Excel to JSON first. Conversion runs in your browser and nothing is uploaded. The Privacy Policy has the details.
Related tools
Join several files first with Merge CSV Files. To read the result back as text, use Parquet to CSV. To turn a CSV into a web table, try CSV to HTML Table.