Round Numbers in CSV Files Online
Round numeric columns in CSV files to any number of decimal places directly in your browser. Set precision per column with a simple slider — no upload required.
How to round Numbers in CSV files
- Drop your file onto the upload area. Every numeric column is listed with its type, ticked, and set to 2 decimal places.
- Untick columns you want to leave alone, such as IDs, or use the All and None links.
- Drag each column's slider to set its decimal places, from 0 to 6. Each column can have its own setting.
- Click Round, check the preview of the first 200 rows, and download the file in the same format.
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 rainfall log from regional weather stations carries GPS coordinates to five decimals and rainfall to three. A public dashboard only needs about 100 m accuracy and one decimal of rain.
Input (CSV)
station,lat,lon,rain_mm
Kelburn,-41.28496,174.76785,12.46
Ohakea,-40.20611,175.38872,0.05
Paraparaumu,-40.90431,174.98556,3.349
Masterton,-40.97512,175.63089,Settings
- lat: 3 decimal places
- lon: 3 decimal places
- rain_mm: 1 decimal place
Result
| station | lat | lon | rain_mm |
|---|---|---|---|
| Kelburn | -41.285 | 174.768 | 12.5 |
| Ohakea | -40.206 | 175.389 | 0.1 |
| Paraparaumu | -40.904 | 174.986 | 3.3 |
| Masterton | -40.975 | 175.631 | NULL |
Each column is rounded to its own number of places. Halves round away from zero, so 0.05 becomes 0.1 and -41.28496 becomes -41.285. Masterton has no reading and stays empty. The station column is text and is not listed. Rounding changes the stored value, not just the display.
Working with CSV files
CSV stores numbers as text, so the columns offered are the ones typed as numbers on load. A column with a stray unit such as "12.5 mm" or a comma decimal such as "12,5" is typed as text and does not appear in the list. Integer columns such as IDs or years are listed and ticked by default. Rounding them to 2 places changes nothing, but untick them to keep the intent clear.
The rounded values are written in their shortest form. A value rounded to 2 places that lands on 12.50 is written as 12.5, and 3.00 is written as 3. The CSV does not pad trailing zeros. If an importer needs a fixed number of decimals, such as an accounting system that expects 12.50, format the column as text in the SQL workspace with printf. Rounding also shrinks the file, since fewer digits are written per value.
Frequently Asked Questions
Why is 12.50 written as 12.5 in my rounded CSV?
Numbers are written in their shortest form, and trailing zeros are not stored. The value is rounded correctly. Use a text format such as printf('%.2f', x) in the SQL workspace if you need fixed decimals.
Why is a numeric-looking CSV column not listed?
It was typed as text on load, usually because of a unit, currency sign, or comma used as the decimal mark. Clean it with Find & Replace and cast it to a number first.
How are halves rounded?
Away from zero. 2.5 rounds to 3 and -2.5 rounds to -3 at 0 places. This matches Excel's ROUND, not the banker's rounding used by some programming languages.
Can I round down, round up, or truncate instead?
No. The tool only does standard rounding. For floor, ceiling or truncation, use the SQL workspace with floor(), ceil() or trunc().
Can I round to the nearest 10 or 100?
No. The slider runs from 0 to 6 decimal places. To round to tens or hundreds, use round(x, -1) or round(x, -2) in the SQL workspace.
Related Tools
Aggregate CSV Files Online
Group and aggregate CSV files by any column directly in your browser. Calculate sum, average, min, max, and count for any numeric column — no upload required.
Bin Column in CSV Files Online
Bucket a numeric column in CSV files into labelled ranges — equal-width bins or custom edges. Runs entirely in your browser.
Normalize Columns in CSV Files Online
Normalize numeric columns in CSV files using min-max scaling (0–1) or z-score standardisation (mean=0, std=1). Adds new columns alongside the originals — no upload required.
Round Numbers in Excel Files Online
Round numeric columns in Excel files to any number of decimal places directly in your browser. Set precision per column with a simple slider — no upload required.
Round Numbers in Parquet Files Online
Round numeric columns in Parquet files to any number of decimal places directly in your browser. Set precision per column with a simple slider — no upload required.
Round Numbers in JSON Files Online
Round numeric columns in JSON files to any number of decimal places directly in your browser. Set precision per column with a simple slider — no upload required.
CSV Viewer Online
View and inspect CSV files directly in your browser. Browse rows, check column names and data types — no upload required, your data stays on your device.
Convert CSV to Parquet Online
Convert CSV files to Parquet format directly in your browser. No upload required — your data never leaves your device.