{
  "slug": "round-decimals",
  "name": "gizza-ai/round-decimals",
  "version": "0.1.0",
  "title": "Round Decimals — Round CSV Number Columns Online — gizza.ai",
  "description": "Round the numeric columns of a CSV to N decimal places in your browser. Pick a rounding mode (half-up, banker's, ceil, floor, truncate). Free, no upload.",
  "tags": [
    "round decimals",
    "round csv columns",
    "round numbers online",
    "bankers rounding",
    "truncate decimals"
  ],
  "category": "utilities",
  "urls": {
    "page": "https://gizza.ai/tools/round-decimals/",
    "markdown": "https://gizza.ai/tools/round-decimals/index.md",
    "descriptor": "https://gizza.ai/tools/round-decimals/tool.json",
    "deep_link_example": "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"
  },
  "cli": "gizza tool round-decimals \"name,price,qty\nApple,1.005,3.14159\nPear,2.5,10\"",
  "tool": {
    "description": "Round the numeric cells of a CSV to a chosen number of decimal places (0–10) using a selectable rounding mode: half_up (away from zero, classical), half_down (toward zero), half_even (banker's), ceil, floor, or truncate. Round every numeric column or a subset chosen by 1-based index and/or header name. A first-row header is kept unrounded. Non-numeric cells (text, currency symbols) pass through unchanged. Rounding is done on the decimal digit string, so 1.005 at 2 places is 1.01. Optionally pad results to a fixed number of decimals.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "columns": {
          "default": "",
          "description": "Comma-separated columns to round: 1-based indices and/or header names (e.g. 'price,3'). Empty rounds every numeric cell in every column. Default empty.",
          "type": "string"
        },
        "data": {
          "description": "The CSV text whose numeric cells should be rounded.",
          "type": "string"
        },
        "decimals": {
          "default": 2,
          "description": "Number of decimal places to keep, 0–10. Default 2.",
          "maximum": 10,
          "minimum": 0,
          "type": "integer"
        },
        "delimiter": {
          "default": ",",
          "description": "Field separator: a single char or 'comma'/'tab'/'semicolon'/'pipe'. Default ','.",
          "type": "string"
        },
        "header": {
          "default": true,
          "description": "Treat the first row as a header: keep it unrounded and allow selecting columns by name. Default true.",
          "type": "boolean"
        },
        "mode": {
          "default": "half_up",
          "description": "Rounding mode. 'half_up' rounds halves away from zero (classical, 2.5→3); 'half_down' rounds halves toward zero (2.5→2); 'half_even' is banker's rounding (2.5→2, 3.5→4); 'ceil' always rounds up; 'floor' always rounds down; 'truncate' drops the extra digits. Default 'half_up'.",
          "enum": [
            "half_up",
            "half_down",
            "half_even",
            "ceil",
            "floor",
            "truncate"
          ],
          "type": "string"
        },
        "trailing_zeros": {
          "default": false,
          "description": "Pad every rounded cell to exactly 'decimals' places (e.g. 3 → 3.00). Default false (natural, no padding).",
          "type": "boolean"
        }
      },
      "required": [
        "data"
      ],
      "type": "object"
    }
  }
}