{
  "slug": "percent-decimal-converter",
  "name": "gizza-ai/percent-decimal-converter",
  "version": "0.1.0",
  "title": "Percent Decimal Converter — convert percentages and fractions — gizza.ai",
  "description": "Convert percentage strings like 12.5% to decimal fractions like 0.125, or decimals back to percentages, across a pasted column or delimited table.",
  "tags": [
    "percent to decimal",
    "decimal to percent",
    "percentage converter",
    "basis points",
    "permille",
    "csv percentage"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/percent-decimal-converter/",
    "markdown": "https://gizza.ai/tools/percent-decimal-converter/index.md",
    "descriptor": "https://gizza.ai/tools/percent-decimal-converter/tool.json",
    "deep_link_example": "https://gizza.ai/tools/percent-decimal-converter/?data=rate%0A12.5%25%0A7%25%0A0.5%25&direction=auto&unit=percent&columns=rate%2C4&header=true&delimiter=comma&decimals=-1&trim_zeros=true&suffix=true"
  },
  "cli": "gizza tool percent-decimal-converter \"rate\n12.5%\n7%\n0.5%\"",
  "tool": {
    "description": "Convert a column of percentages to decimal fractions, or decimals to percentages, in one pass over a whole table or a bare one-value-per-line list. direction is 'percent_to_decimal' (12.5% becomes 0.125), 'decimal_to_percent' (0.125 becomes 12.5%), or 'auto' (the default), which decides PER CELL from the marker on the value — anything ending in %, ‰, bp or bps is brought down to a fraction and a bare number is taken up to the percent side, so a mixed column sorts itself out. unit sets how far the point moves: percent (two places), permille (three) or basis_points (four, so 0.25% is 25 bps). The conversion SHIFTS THE DECIMAL POINT on the digits that were typed rather than multiplying a binary float, so 0.1 becomes exactly 10% and not 10.000000000000002%, and 12.345% becomes exactly 0.12345. decimals fixes the precision from 0 to 12 places with zero padding, or -1 (the default) for the exact value; trim_zeros makes that an at-most width by dropping padding; suffix (on by default) appends the %, ‰ or bps symbol. columns is blank for every column or a mix of header names and 1-based indices, header keeps row 1 out of the conversion, and delimiter is comma/tab/semicolon/pipe or any single character. Cells that are not plain numbers — text, blanks, currency, scientific notation — pass through untouched, while surrounding whitespace, non-breaking spaces, a space before the symbol, thousands separators inside a quoted field, and upper- or lower-case bp/bps are all tolerated. Max 5,000,000 bytes. Runs entirely in the sandbox; nothing is uploaded.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "columns": {
          "default": "",
          "description": "Which columns to convert. Blank (the default) means every column, which is what a one-column list wants. Otherwise a comma-separated list of 1-based indices ('2'), header names ('rate') when header is on, or a mix ('rate,4'). Cells in unselected columns are copied through unchanged, so an id or date column beside the rates stays intact.",
          "type": "string"
        },
        "data": {
          "description": "The text to convert: a delimited table, or the commonest case, a bare list with one value per line pasted out of a spreadsheet column. Row order, column count and delimiter are preserved, and CRLF line endings are accepted. Cells that are not plain numbers — text, blanks, currency like $12.99, scientific notation like 1e5 — are copied through untouched rather than mangled. Max 5,000,000 bytes.",
          "type": "string"
        },
        "decimals": {
          "default": -1,
          "description": "Precision: how many digits to keep after the decimal point, 0 to 12, padding with zeros so a column lines up. -1 (the default) is exact mode — the full converted value with no padding and no rounding, which is always possible here because the conversion shifts the decimal point rather than multiplying a float. Rounding is half-away-from-zero, on the digit string, so 0.005 to 0 places is 1%.",
          "maximum": 12,
          "minimum": -1,
          "type": "integer"
        },
        "delimiter": {
          "default": "comma",
          "description": "Field separator for both reading and writing: a name ('comma' — the default, 'tab', 'semicolon', 'pipe') or any single character. A one-value-per-line list has no separator at all, so the default is fine. Use 'semicolon' for a European export where the comma is the decimal mark.",
          "type": "string"
        },
        "direction": {
          "default": "auto",
          "description": "Which way to convert. 'percent_to_decimal' divides by the unit scale, so 12.5% becomes 0.125. 'decimal_to_percent' multiplies, so 0.125 becomes 12.5%. 'auto' (the default) decides per cell from the value itself: a cell carrying a %, ‰, bp or bps marker is already on the percent side and is brought DOWN to a fraction, while a bare number is taken UP to the percent side — so a mixed column sorts itself out in one pass.",
          "enum": [
            "auto",
            "percent_to_decimal",
            "decimal_to_percent"
          ],
          "type": "string"
        },
        "header": {
          "default": true,
          "description": "When true (the default) row 1 is a header: it is never converted, so a column titled 2024 stays 2024 instead of turning into 202400%, and its names can be used in 'columns'. Turn it off for a headerless table or a bare list of numbers — every row is then data and columns must be given as indices.",
          "type": "boolean"
        },
        "suffix": {
          "default": true,
          "description": "Append the unit symbol — %, ‰ or ' bps' — when a value lands on the percent side. On by default, giving 12.5%. Turn it off to get the bare number 12.5, which is what you want when the column heading already says percent or the result feeds another tool. Values converted TO a decimal fraction never get a symbol either way.",
          "type": "boolean"
        },
        "trim_zeros": {
          "default": false,
          "description": "Drop trailing fractional zeros after rounding, which turns 'decimals' into an AT MOST width rather than an exact one: with decimals=4, 50% becomes 0.5 instead of 0.5000, while 33.3333% still becomes 0.3333. Off by default, since padded columns line up. Ignored in exact mode (decimals=-1), which never pads in the first place.",
          "type": "boolean"
        },
        "unit": {
          "default": "percent",
          "description": "The unit on the percent side of the conversion, i.e. how far the decimal point moves. 'percent' (default) is two places, 1 = 100%. 'permille' is three, 1 = 1000‰. 'basis_points' is four, 1 = 10000 bps, the finance convention where a 0.25% rate change is 25 bps. The matching symbol is what 'suffix' appends, and what 'auto' looks for on input.",
          "enum": [
            "percent",
            "permille",
            "basis_points"
          ],
          "type": "string"
        }
      },
      "required": [
        "data"
      ],
      "type": "object"
    }
  }
}