{
  "slug": "csv-ragged-row-padder",
  "name": "gizza-ai/csv-ragged-row-padder",
  "version": "0.1.0",
  "title": "CSV Ragged Row Padder — Repair Uneven Rows — gizza.ai",
  "description": "Pad short CSV rows, truncate or flag long rows, and normalize every record to a uniform field count. Paste ragged CSV or TSV and export clean text in your browser.",
  "tags": [
    "csv",
    "data",
    "table",
    "ragged rows",
    "padding",
    "delimiter",
    "cleanup"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/csv-ragged-row-padder/",
    "markdown": "https://gizza.ai/tools/csv-ragged-row-padder/index.md",
    "descriptor": "https://gizza.ai/tools/csv-ragged-row-padder/tool.json",
    "deep_link_example": "https://gizza.ai/tools/csv-ragged-row-padder/?input=name%2Cemail%2Cage%0AAda%2Cada%40example.com%2C37%0AGrace%2Cgrace%40example.com%0ALinus%2Clinus%40example.com%2C54%2Cextra&width=0&width_from=header&long_rows=truncate&pad_value=NULL&header=true&delimiter=auto&drop_empty_rows=true&line_ending=lf&output=csv"
  },
  "cli": "gizza tool csv-ragged-row-padder \"name,email,age\nAda,ada@example.com,37\nGrace,grace@example.com\nLinus,linus@example.com,54,extra\"",
  "tool": {
    "description": "Repair ragged CSV/TSV text whose rows have inconsistent field counts. Short rows are padded with blanks or a chosen value; long rows can be truncated, merged into the last column, flagged in a report, or dropped. The tool can infer width from the header, widest row, or modal row width, sniff comma/tab/semicolon/pipe delimiters, preserve quoting, drop blank rows, generate missing header names, normalize line endings, and return either the repaired CSV or a diagnostic report.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "delimiter": {
          "default": "auto",
          "description": "Input/output delimiter. auto sniffs comma, semicolon, tab, or pipe outside quotes; choose one to force it.",
          "enum": [
            "auto",
            "comma",
            "tab",
            "semicolon",
            "pipe"
          ],
          "type": "string"
        },
        "drop_empty_rows": {
          "default": true,
          "description": "Drop rows whose cells are all blank before measuring widths. Default true.",
          "type": "boolean"
        },
        "header": {
          "default": true,
          "description": "Treat the first row as column names. Short headers are padded with generated column_N names instead of pad_value. Default true.",
          "type": "boolean"
        },
        "input": {
          "description": "CSV/TSV text to repair. Paste the complete table, including the header row if header=true.",
          "type": "string"
        },
        "line_ending": {
          "default": "lf",
          "description": "Output line ending: lf (Unix, default) or crlf (Windows).",
          "enum": [
            "lf",
            "crlf"
          ],
          "type": "string"
        },
        "long_rows": {
          "default": "truncate",
          "description": "How to handle rows wider than the target: truncate extra fields, merge extras into the last column, flag them in a report while leaving them as-is, or drop them.",
          "enum": [
            "truncate",
            "merge",
            "flag",
            "drop"
          ],
          "type": "string"
        },
        "output": {
          "default": "csv",
          "description": "Return the repaired CSV (default) or a plain-text report listing each padded, truncated, merged, flagged, or dropped row.",
          "enum": [
            "csv",
            "report"
          ],
          "type": "string"
        },
        "pad_value": {
          "default": "",
          "description": "Value appended to short data rows until they reach the target width. Empty string means blank CSV cells.",
          "type": "string"
        },
        "width": {
          "default": 0,
          "description": "Target number of fields per row. Use 0 (default) to infer the width from width_from.",
          "maximum": 10000,
          "minimum": 0,
          "type": "integer"
        },
        "width_from": {
          "default": "header",
          "description": "How to infer target width when width=0: header uses the first row, max uses the widest row, mode uses the most common row width.",
          "enum": [
            "header",
            "max",
            "mode"
          ],
          "type": "string"
        }
      },
      "required": [
        "input"
      ],
      "type": "object"
    }
  }
}