happytails.ai

CSV encoding repair

Open CSV encoding repair on Happytails.ai. This view has the same page content and links, with explicit tool capabilities. Read the processing notes before using a tool.

Tool capabilities

{
  "id": "csv-encoding-repair",
  "category": "data-tools",
  "built": true,
  "requirements": "One nonempty file up to 1,000,000 raw bytes, 10,000 data records, 100 columns and 100,000 data cells. Candidate previews show the first 600 decoded characters. Replacement counts include literal U+FFFD characters already in the file. Mojibake warning patterns can match legitimate text. Comparison alone produces no repaired CSV. Output is capped at 4,000,000 CSV characters.",
  "implementation": {
    "fields": [
      {
        "key": "delimiter",
        "label": "Input CSV separator",
        "value": ",",
        "type": "select",
        "values": [
          ",",
          ";",
          "\t"
        ]
      },
      {
        "key": "encoding",
        "label": "Confirmed source encoding",
        "value": "Compare only",
        "type": "select",
        "values": [
          "Compare only",
          "utf-8",
          "windows-1252",
          "utf-16le",
          "utf-16be",
          "shift_jis"
        ]
      },
      {
        "key": "confirmEncoding",
        "label": "I reviewed the candidate text and confirm this encoding",
        "value": false,
        "type": "checkbox"
      },
      {
        "key": "allowReplacement",
        "label": "Allow replacement characters and possible data loss",
        "value": false,
        "type": "checkbox",
        "help": "Required if the selected decoding has malformed bytes or U+FFFD characters. Replacement counts include any literal U+FFFD characters already present in the source."
      },
      {
        "key": "bom",
        "label": "Add UTF-8 BOM to the exported CSV",
        "value": false,
        "type": "checkbox"
      },
      {
        "key": "exportMode",
        "label": "Spreadsheet formula handling",
        "value": "Protect formulas",
        "type": "select",
        "values": [
          "Protect formulas",
          "Preserve original cells"
        ]
      }
    ],
    "registrationFamily": "csv-preparation",
    "presentation": "metrics",
    "note": "Compare the previews first, then select and confirm the source encoding. The comparison does not identify the correct encoding. Export rewrites the file as quoted UTF-8 CSV; it cannot recover text already lost. Processed on your device. CSV downloads protect spreadsheet formula prefixes by default, which changes affected cells.",
    "files": true,
    "multiple": false,
    "input": false,
    "accept": ".csv,.tsv,.txt,text/csv,text/plain",
    "maxFileBytes": 1000000,
    "experience": {
      "automatic": false,
      "single": false,
      "inputMaxLength": 1000000,
      "inputMode": "text",
      "label": "Raw CSV file",
      "placeholder": "Choose the original file bytes",
      "help": "Compare candidates first. Select and confirm an encoding before creating a UTF-8 CSV. Up to 1,000,000 characters. Review the settings before running.",
      "helpParts": [
        "Compare candidates first. Select and confirm an encoding before creating a UTF-8 CSV.",
        "Up to 1,000,000 characters.",
        "Review the settings before running."
      ],
      "action": null
    },
    "mode": "explicit",
    "interactive": false
  },
  "execution": "Browser interface",
  "api": null,
  "browser_agent": {
    "supported": true,
    "name": "run_current_tool",
    "discovery": "WebMCP on the human page in a supporting browser",
    "verification": "See audit/API-AUDIT.md; availability is not verification"
  }
}

Page guide

Compare raw CSV bytes under several character encodings and explicitly confirm a UTF-8 export after reviewing the text.

How to use CSV encoding repair
  1. Choose a raw CSV file and run Compare only.
  2. Review each candidate preview, replacement count, malformed-byte flag and mojibake warnings.
  3. Select the source encoding, confirm your choice and optionally add a UTF-8 BOM before exporting.

Useful next steps

A preview is not an encoding diagnosis

UTF-8, Windows-1252, UTF-16LE, UTF-16BE and Shift_JIS candidates appear in a fixed order. Counts and BOM information are clues, not a confidence ranking. ASCII and many legacy files are ambiguous. No encoding is selected silently and no mojibake text is automatically rewritten.

Understand conversion and possible loss

The output reparses CSV and writes quoted comma-separated UTF-8 with CRLF records. Parsed cell strings and quoted multiline content are retained before optional formula protection, while original quoting, delimiters and byte layout change. Malformed bytes or U+FFFD replacement characters require a separate explicit possible-loss permission. Previously lost text cannot be reconstructed.

Local processing and exact strings

Processing runs on your device. CSV downloads quote every cell and protect spreadsheet formula prefixes by default, which changes affected strings. Preserve original cells is for trusted machine processing. Import identifiers as text in spreadsheet applications to preserve leading zeros.