{
  "slug": "data-format-sniffer",
  "name": "gizza-ai/data-format-sniffer",
  "version": "0.1.0",
  "title": "Data Format Sniffer — Detect CSV, TSV, JSON, XML and Delimiters — gizza.ai",
  "description": "Paste a data sample and find out what it is: CSV, TSV, JSON, JSON Lines, XML, HTML, fixed-width or binary, plus delimiter, quote char, encoding and column types.",
  "tags": [
    "csv",
    "delimiter",
    "detection",
    "tsv",
    "json",
    "encoding",
    "data format",
    "sniffer"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/data-format-sniffer/",
    "markdown": "https://gizza.ai/tools/data-format-sniffer/index.md",
    "descriptor": "https://gizza.ai/tools/data-format-sniffer/tool.json",
    "deep_link_example": "https://gizza.ai/tools/data-format-sniffer/?data=name%2Cage%2Ccity%2Cjoined%0AAda%2C36%2CLondon%2C1815-12-10%0AAlan%2C41%2CWilmslow%2C1912-06-23&input_form=text&sample_lines=100&extra_delimiters=%5E%23&comment_prefix=%23&detect_types=true&preview_rows=5&output=report"
  },
  "cli": "gizza tool data-format-sniffer \"name,age,city,joined\nAda,36,London,1815-12-10\nAlan,41,Wilmslow,1912-06-23\"",
  "tool": {
    "description": "Identify what a pasted data sample actually is. Detects CSV, TSV, semicolon/pipe/custom-delimited text, JSON, JSON Lines, XML, HTML, Markdown tables, fixed-width text and marker-led YAML, plus binary containers (Parquet, Avro, SQLite, ZIP, gzip, zstd) from their magic bytes when the sample is pasted as base64 or hex. Reports a confidence score, the character encoding (BOM or statistical detection over real bytes), line endings, the winning delimiter with a per-candidate score table, the quote character, whether a header row is present, column count, per-column types and a parsed preview. Returns an aligned report or JSON.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "comment_prefix": {
          "default": "",
          "description": "Ignore sampled lines that start with this prefix, e.g. # or //. Empty by default because a leading # is often real data.",
          "type": "string"
        },
        "data": {
          "description": "The data sample to identify. Paste the text itself (CSV, TSV, JSON, JSON Lines, XML, HTML, a Markdown table, fixed-width text, …), or paste raw bytes as base64/hex and set input_form so encodings and binary containers can be detected. Capped at 1 MiB after decoding.",
          "type": "string"
        },
        "detect_types": {
          "default": true,
          "description": "Infer a type per column (null, boolean, integer, float, time, date, datetime, text) and use a first-row type mismatch to decide whether a header row is present. Default true.",
          "type": "boolean"
        },
        "extra_delimiters": {
          "default": "",
          "description": "Extra single-character delimiters to try in addition to the built-in candidates comma, tab, semicolon, pipe, colon, tilde and space. Pass them with no separator, e.g. ^# for caret and hash. Quote characters and newlines are rejected.",
          "type": "string"
        },
        "input_form": {
          "default": "text",
          "description": "How to read data: text (already-decoded characters, the default), base64 (standard or URL-safe, padding optional), or hex (two digits per byte; spaces, colons, dashes and a 0x prefix are ignored). Use base64 or hex to detect the original byte encoding or a binary container such as Parquet, Avro, SQLite, ZIP, gzip or zstd.",
          "enum": [
            "text",
            "base64",
            "hex"
          ],
          "type": "string"
        },
        "output": {
          "default": "report",
          "description": "Output format: report is an aligned human-readable summary, json is a machine-readable object with the same fields (format, confidence, encoding, delimiter, columns, column_types, delimiter_scores, preview, notes). Default report.",
          "enum": [
            "report",
            "json"
          ],
          "type": "string"
        },
        "preview_rows": {
          "default": 5,
          "description": "How many parsed rows to show in the preview table. 0 hides the preview. Default 5, maximum 50.",
          "maximum": 50,
          "minimum": 0,
          "type": "integer"
        },
        "sample_lines": {
          "default": 100,
          "description": "How many leading lines to analyse for structure, delimiter and column types. Default 100, maximum 10000. The whole input is still used for the byte count, line count and whole-document JSON check.",
          "maximum": 10000,
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "data"
      ],
      "type": "object"
    }
  }
}