ToolAssay

Compute the diff between two texts (a → b) — no git needed

Compute the diff between two texts (a → b) — no git needed. Returns a standard unified patch (line-oriented in both modes, applies with git apply or patch), added/removed counts, and in word mode a token-level change list for inline highlighting (capped at 2000 entries). CRLF line endings and missing trailing newlines are preserved byte-exactly. Caps: 1 MB UTF-8 per input; pathologically divergent inputs return 422 diff_too_complex.

Answeringour last check, 2026-09-24
1 of 1checks answered this week
22 msmedian answer time
$0.002listed price per call
$0.002price it asked us

Paid test badge: not yet. The checks above are free: we call the tool without paying and read the payment request it sends back. The Verified badge needs paid calls whose answers match the promised output, and nobody can buy a badge.

Endpoint

POST https://402utils.com/v1/diff

CategoryCode and developer
Provider host402utils.com
Networkseip155:8453
Payment schemesexact
Self-reported calls, 30 days1 from 1 payers (the provider's figure, not ours)

Our checks, last 30 days

DayResultHTTPAskedTime
2026-09-24 valid payment request 402$0.002 22 ms

Example input (from the provider)

{
  "body": {
    "a": "name: farm\nprice: 1 USDC\n",
    "b": "name: farm\nprice: 2 USDC\n"
  },
  "bodyType": "json",
  "method": "POST",
  "type": "http"
}

Promised output schema (from the provider)

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "input": {
      "additionalProperties": false,
      "properties": {
        "body": {
          "description": "Two texts to compare, byte-exactly (no line-ending normalization).",
          "properties": {
            "a": {
              "description": "Original text. Max 1 MB UTF-8.",
              "type": "string"
            },
            "b": {
              "description": "New text. Max 1 MB UTF-8.",
              "type": "string"
            },
            "context": {
              "description": "Unchanged context lines around each patch hunk. Default 3.",
              "maximum": 10,
              "minimum": 0,
              "type": "integer"
            },
            "mode": {
              "description": "Granularity of stats/changes. The patch is always a line-oriented unified diff. Default \"line\".",
              "enum": [
                "line",
                "word"
              ],
              "type": "string"
            }
          },
          "required": [
            "a",
            "b"
          ],
          "type": "object"
        },
        "bodyType": {
          "enum": [
            "json",
            "form-data",
            "text"
          ],
          "type": "string"
        },
        "method": {
          "enum": [
            "POST"
          ],
          "type": "string"
        },
        "type": {
          "const": "http",
          "type": "string"
        }
      },
      "required": [
        "type",
        "method",
        "bodyType",
        "body"
      ],
      "type": "object"
    },
    "output": {
      "properties": {
        "example": {
          "description": "Unified patch plus change statistics.",
          "properties": {
            "changes": {
              "description": "Word mode only (omitted when identical): token runs in order, capped at 2000 entries. Unchanged runs have added=removed=false.",
              "items": {
                "properties": {
                  "added": {
                    "type": "boolean"
                  },
                  "removed": {
                    "type": "boolean"
                  },
                  "value": {
                    "description": "Text of the run.",
                    "type": "string"
                  }
                },
                "required": [
                  "value",
                  "added",
                  "removed"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "identical": {
              "description": "True when a and b are identical; patch is then empty.",
              "type": "boolean"
            },
            "mode": {
              "description": "Echo of the requested mode.",
              "enum": [
                "line",
                "word"
              ],
              "type": "string"
            },
            "patch": {
              "description": "Unified diff patch (--- a / +++ b headers). Line-oriented in both modes; empty when identical.",
              "type": "string"
            },
            "stats": {
              "description": "Counts in lines (mode line) or words (mode word).",
              "properties": {
                "added": {
                  "description": "Lines/words added in b.",
                  "type": "integer"
                },
                "removed": {
                  "description": "Lines/words removed from a.",
                  "type": "integer"
                }
              },
              "required": [
                "added",
                "removed"
              ],
              "type": "object"
            },
            "truncated": {
              "description": "Word mode only: true when `changes` was capped at 2000 entries.",
              "type": "boolean"
            }
          },
          "required": [
            "identical",
            "patch",
            "stats",
            "mode"
          ],
          "type": "object"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}

This page as JSON