{
  "slug": "html-diff",
  "name": "gizza-ai/html-diff",
  "version": "0.1.0",
  "title": "HTML Diff — gizza.ai",
  "description": "Compare two HTML snippets by their visible text, ignoring tag and attribute noise.",
  "tags": [
    "html",
    "diff",
    "developer"
  ],
  "category": "text",
  "urls": {
    "page": "https://gizza.ai/tools/html-diff/",
    "markdown": "https://gizza.ai/tools/html-diff/index.md",
    "descriptor": "https://gizza.ai/tools/html-diff/tool.json",
    "deep_link_example": "https://gizza.ai/tools/html-diff/?left=%3Cp%20class%3D%22a%22%3Ethe%20quick%20brown%20fox%3C%2Fp%3E&right=%3Cdiv%3E%3Cspan%3Ethe%20slow%20brown%20fox%3C%2Fspan%3E%3C%2Fdiv%3E&granularity=line&format=unified&ignore_case=true&ignore_whitespace=true&context=3"
  },
  "cli": "gizza tool html-diff '<p class=\"a\">the quick brown fox</p>' 'right=<div><span>the slow brown fox</span></div>'",
  "tool": {
    "description": "Compare two HTML snippets by their visible text only — every tag and attribute is stripped first, so markup differences (classes, ids, inline styles, wrapper elements) are ignored. Diff line-by-line for a classic unified patch or word-by-word for an inline wdiff-style view, and render as text or a structured JSON report with added/removed/changed/unchanged counts. Supports optional case-insensitive and whitespace-normalized matching while preserving original text in the output.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "context": {
          "default": 3,
          "description": "Unchanged context lines around each hunk in unified line output. Default 3.",
          "maximum": 100,
          "minimum": 0,
          "type": "integer"
        },
        "format": {
          "default": "unified",
          "description": "Output format: unified diff/inline text or a structured JSON report.",
          "enum": [
            "unified",
            "json"
          ],
          "type": "string"
        },
        "granularity": {
          "default": "line",
          "description": "Diff granularity: 'line' for patch-style line diffs or 'word' for inline word-level diffs.",
          "enum": [
            "line",
            "word"
          ],
          "type": "string"
        },
        "ignore_case": {
          "default": false,
          "description": "Compare tokens case-insensitively while preserving original text in the output.",
          "type": "boolean"
        },
        "ignore_whitespace": {
          "default": false,
          "description": "Normalize runs of whitespace for matching while preserving original text in the output.",
          "type": "boolean"
        },
        "left": {
          "description": "The original/left HTML to compare.",
          "type": "string"
        },
        "right": {
          "description": "The updated/right HTML to compare.",
          "type": "string"
        }
      },
      "required": [
        "left",
        "right"
      ],
      "type": "object"
    }
  }
}