Cast Column Types in Parquet Files Online
Change column data types in Parquet files directly in your browser. Cast text to numbers, dates to timestamps, or any supported type conversion — no upload required.
How to cast Column Types in Parquet files
- Drop your file. Every column is listed with its current type, and each one starts at Keep original.
- For each column you want to change, pick a target type: VARCHAR, INTEGER, BIGINT, FLOAT, DOUBLE, BOOLEAN, DATE or TIMESTAMP.
- Click Apply Casts. The button stays disabled until at least one column has a new type.
- Check the preview for new empty cells. A value that cannot be converted becomes NULL instead of stopping the run.
- Download the result in the same format. Column names and order stay the same.
Your file is processed locally in your browser and is never uploaded. The free limit is 50 MB per file; larger files work if your device has the memory for them.
Worked example
A property portal's listing feed arrives with loose types. Prices include "POA" (price on application), bathrooms were written as decimals, and the garage flag is free text. An analyst needs clean numbers and a true/false column before building a price model.
Input (Parquet)
Parquet file (binary, columnar) — shown as a table with its schema
| listing_id | price | bathrooms | has_garage |
|---|---|---|---|
| L-3301 | 485000 | 1 | yes |
| L-3302 | POA | 2 | no |
| L-3303 | 612500 | 1.5 | Y |
| L-3304 | 349000 | 2.75 | n/a |
Schema: listing_id VARCHAR, price VARCHAR, bathrooms DOUBLE, has_garage VARCHAR
Settings
- listing_id: Keep original
- price: INTEGER
- bathrooms: INTEGER
- has_garage: BOOLEAN
Result
| listing_id | price | bathrooms | has_garage |
|---|---|---|---|
| L-3301 | 485000 | 1 | true |
| L-3302 | NULL | 2 | false |
| L-3303 | 612500 | 2 | true |
| L-3304 | 349000 | 3 | NULL |
"POA" is not a number, so that price becomes NULL. Casting a decimal to INTEGER rounds to the nearest whole number, so 1.5 becomes 2 and 2.75 becomes 3. That loses real information here, and DOUBLE would be the better choice for bathrooms. The BOOLEAN cast understands yes, no and Y, but "n/a" becomes NULL.
Working with Parquet files
Casting a Parquet column changes its physical type in the file you download. DOUBLE to FLOAT halves the space the column needs before compression, but FLOAT keeps only about seven significant digits, so 3.14159265 becomes 3.1415927. BIGINT to INTEGER also saves space, and any value above 2,147,483,647 becomes NULL. Check the maximum of an ID column before narrowing it. Casting VARCHAR to INTEGER, DOUBLE or DATE is the usual fix for a Parquet file whose writer stored every column as text, as some quick CSV-to-Parquet scripts do.
Casting a TIMESTAMP to DATE drops the time of day. Casting a DATE to TIMESTAMP sets it to midnight. Struct and list columns can only usefully become VARCHAR, which turns them into text such as {'city': Dublin, 'zip': D01}. Most readers see that as an ordinary string, not as JSON. Any other target type gives NULL for nested values. Columns you leave at Keep original are copied with their exact Parquet type.
Frequently Asked Questions
Does casting shrink my Parquet file?
It can. Narrower types such as INTEGER instead of BIGINT, or FLOAT instead of DOUBLE, take less space. The whole file is rewritten with fresh compression, so its size can change a little even for columns you did not cast.
Can I cast a Parquet timestamp column to a date?
Yes. Choose DATE for that column. The time part is removed and only the calendar date is kept.
What happens to values that do not fit the new type?
They become NULL. Every changed column is converted with TRY_CAST, so one bad value never stops the run. It also fails silently. Compare null counts before and after, for example with the Validate structure tool, to see how many values were lost.
Does casting a decimal to INTEGER round or truncate?
It rounds to the nearest whole number, so 2.75 becomes 3 and 1.25 becomes 1. Exact halves may round to the even neighbour, so do not rely on how 2.5 is handled. Values above 2,147,483,647 become NULL. Use BIGINT for large IDs.
Which text values become true or false with BOOLEAN?
true, false, t, f, yes, no, y, n, 1 and 0, in any letter case. Anything else, such as "on", "open" or "n/a", becomes NULL.
Related Tools
Fill Empty Values in Parquet Files Online
Fill empty and null values in Parquet files with a custom replacement value, directly in your browser.
Validate Parquet Files Online
Validate Parquet file structure in your browser. Check null counts, distinct values, and data types for every column — no upload required.
Aggregate Parquet Files Online
Group and aggregate Parquet files by any column directly in your browser. Calculate sum, average, min, max, and count for any numeric column — no upload required.
Cast Column Types in CSV Files Online
Change column data types in CSV files directly in your browser. Cast text to numbers, dates to timestamps, or any supported type conversion — no upload required.
Cast Column Types in Excel Files Online
Change column data types in Excel files directly in your browser. Cast text to numbers, dates to timestamps, or any supported type conversion — no upload required.
Cast Column Types in JSON Files Online
Change column data types in JSON files directly in your browser. Cast text to numbers, dates to timestamps, or any supported type conversion — no upload required.
Parquet Viewer Online
View and inspect Parquet files directly in your browser. Browse rows, check column names and data types — no upload required, your data stays on your device.
Convert Parquet to CSV Online
Convert Parquet files to CSV format directly in your browser. No upload required — your data never leaves your device.