Round Decimals in a CSV

Round the numeric columns of a CSV to any number of decimal places, with the rounding mode you choose — half-up, half-even (banker's), ceil, floor, or truncate. Runs entirely in your browser; nothing is uploaded.

Try:
Rounded CSV

Round the numbers in a CSV, your way

Paste a CSV and this tool rounds its numeric cells to the number of decimal places you choose — locally in your browser, nothing is uploaded. Pick which rounding mode you want and, optionally, which columns to touch:

A first-row header is kept exactly as-is, and any non-numeric cell (text, a $ price, a % value) passes through unchanged.

Worked example

With 2 decimal places, half up, and columns left blank, this input:

name,price,qty
Apple,1.005,3.14159
Pear,2.5,10

becomes:

name,price,qty
Apple,1.01,3.14
Pear,2.5,10

1.005 rounds to 1.01, 3.14159 to 3.14, and 2.5 / 10 already fit in two places so they're unchanged. The name column is text, so it's left alone.

Why 1.005 rounds to 1.01 here (and not in a spreadsheet)

Most tools multiply by 100 and round, but 1.005 can't be stored exactly in binary — it becomes 1.00499999…, so the naive result is 1.00. This tool rounds on the decimal digits you typed, so 1.005 at two places gives the 1.01 you expect.

FAQ

What's the difference between "half up" and "banker's" rounding?

Half up (the default) rounds a trailing 5 away from zero, so 0.5 → 1, 1.5 → 2, 2.5 → 3. Half to even (banker's) rounds a trailing 5 to the nearest even digit, so 0.5 → 0, 1.5 → 2, 2.5 → 2. Banker's rounding is common in finance and statistics because always rounding halves upward biases a running total; sending them to the nearest even value cancels out over many rows.

How do I round only some columns?

Put the columns you want in the Columns box, separated by commas. You can mix header names and 1-based numbersprice, 3 rounds the column named price and the third column. Leave the box blank to round every numeric column. Columns you don't list are copied through untouched.

What happens to text, blank, or currency cells?

Anything that isn't a plain number is left exactly as-is. A header row (when First row is a header is on), a name like Apple, a blank cell, and a formatted value like $12.99 or 4.7% all pass through unchanged — only clean numeric cells get rounded.

Can I keep trailing zeros so every value has the same width?

Yes. Turn on Pad to a fixed number of decimals and every rounded cell shows exactly the number of places you chose — 3 becomes 3.00 and 2.5 becomes 2.50 at two places. With it off, results are shown naturally, dropping trailing zeros (2.50 → 2.5).

Can it read tab- or semicolon-separated files?

Yes. Set the Delimiter to match your file — a single character, or one of comma / tab / semicolon / pipe. The output uses the same delimiter, and quoted fields that contain the delimiter are parsed correctly.

Limits & edge cases

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool round-decimals "name,price,qty
Apple,1.005,3.14159
Pear,2.5,10"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/round-decimals/?data=name%2Cprice%2Cqty%0AApple%2C1.005%2C3.14159%0APear%2C2.5%2C10&decimals=2&mode=half_up&columns=price%2C%203&header=true&delimiter=%2C&trailing_zeros=true

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.