Skip to content
All tools

Text Compare (Diff Checker)

Compare two texts and highlight added, removed and changed words; split or unified view, ignore case/whitespace. Free and runs in your browser.

·3 runs ·Developer API ↓
Compares as you type · Ctrl+Enter

Paste two texts to see the differences

Both texts are compared right in your browser — never sent to the server, never stored.

Developer API

Developer API

Free

Call this exact tool from your code over JSON REST — same result as on the web, authenticated with an API key.

Endpoint

POST https://sieutool.net/api/v1/tools/text-diff

Auth: send the X-API-Key header — create a free key in Account → API keys.

  • Rate limit60 requests/min
  • Daily quota1.000 requests/day
  • PriceFree · up to 1 items/request

Request parameters

ParameterTypeDescription
left *stringVăn bản A (gốc) (mỗi dòng 1 mục)
right *stringVăn bản B (mới) (mỗi dòng 1 mục)
ignore_casebooleanBỏ qua hoa thường(default false)
ignore_spacebooleanBỏ qua khoảng trắng(default false)

* required. Send JSON in the body, Content-Type: application/json.

Code examples

curl -X POST 'https://sieutool.net/api/v1/tools/text-diff' \
  -H 'Content-Type: application/json' \
  -H "X-API-Key: $NXP_API_KEY" \
  -d '{"left":"Hợp đồng dịch vụ\nGiá: 1.000.000đ\nThời hạn 6 tháng","right":"Hợp đồng dịch vụ\nGiá: 1.200.000đ\nThời hạn 6 tháng\nGia hạn tự động","ignore_space":true}'

Sample response

{
  "ok": true,
  "tool": "text-diff",
  "version": "1.0.0",
  "data": {
    "identical": false,
    "stats": {
      "added": 2,
      "removed": 1,
      "changed": 1,
      "same": 2
    },
    "rows": [
      {
        "type": "same",
        "a": 1,
        "b": 1,
        "left": "Hợp đồng dịch vụ",
        "right": "Hợp đồng dịch vụ"
      },
      {
        "type": "mod",
        "a": 2,
        "b": 2,
        "left": "Giá: 1.000.000đ",
        "right": "Giá: 1.200.000đ",
        "segs": {
          "left": [
            {
              "t": "=",
              "s": "Giá: 1."
            },
            {
              "t": "-",
              "s": "000"
            },
            {
              "t": "=",
              "s": ".000đ"
            }
          ],
          "right": [
            {
              "t": "=",
              "s": "Giá: 1."
            },
            {
              "t": "+",
              "s": "200"
            },
            {
              "t": "=",
              "s": ".000đ"
            }
          ]
        }
      },
      {
        "type": "same",
        "a": 3,
        "b": 3,
        "left": "Thời hạn 6 tháng",
        "right": "Thời hạn 6 tháng"
      },
      {
        "type": "add",
        "b": 4,
        "right": "Gia hạn tự động"
      }
    ],
    "unified": "  Hợp đồng dịch vụ\n- Giá: 1.000.000đ\n+ Giá: 1.200.000đ\n  Thời hạn 6 tháng\n+ Gia hạn tự động"
  }
}

Try it (live call)

No API key yet? Sign in and create a free key, then paste it below. Create API key
Paste your API key (kept in this page only, never stored) and send a request. Test requests count toward your key's rate limit.

Main error codes

HTTPcodeMeaning
400BAD_INPUT / NO_INPUT / TOO_MANY_UNITS / BAD_NUMBER…Invalid input — the message names the field
401MISSING_API_KEY / INVALID_API_KEY / REVOKED_API_KEYMissing, invalid or revoked API key
429RATE_LIMITED / IP_RATE_LIMITEDPer-minute rate limit exceeded — wait for Retry-After
429DAILY_QUOTA_EXCEEDEDDaily quota used up — the upgrade field suggests a paid plan
429CLUSTER_QUOTA_EXCEEDEDLinked accounts (same device/network) used up the daily quota — the free quota is shared across the group, not multiplied per account
503SERVER_BUSY / TOOL_BUSY / API_DISABLEDServer under heavy load or API paused — wait for Retry-After

Every response carries X-RateLimit-Remaining / X-RateLimit-Remaining-Day; 429/503 errors include Retry-After (seconds).

How to use

Online text compare: paste the old and new versions and instantly see which lines were added or removed and which words changed within a line — handy for contracts, articles, configs or code. Comparison runs in your browser; your text goes nowhere.

  1. Paste the original text into box A and the new text into box B (or click Try an example).
  2. Results appear below: removed lines in red, added lines in green, changed words emphasized. Click Compare or press Ctrl+Enter to re-run.
  3. Switch between split and unified view, toggle "Ignore case"/"Ignore whitespace", and Copy or Download .diff to keep the result.

Frequently asked questions

Lines are compared with the Myers algorithm (the same family as git diff), then words inside changed lines, so even a single accent change is shown.

The web version handles up to 300,000 characters and 20,000 lines per side. If the texts differ by more than 2,500 lines the tool asks you to split them, to keep your browser responsive.

It compares plain text. Open the file, select all (Ctrl+A), copy and paste into the boxes. Formatting (bold, colors, tables) is not compared.

Ignore whitespace treats lines differing only by extra spaces/tabs as equal (common with Word or re-indented code). Ignore case treats "Contract" and "contract" as the same.

No. Both texts are compared in your browser, never sent to the server or stored; the server only records 1 run. With the API the texts are compared in memory, not stored.
  • The tool shows textual differences only; it does not assess the legal meaning of a contract.
All Text tools →
Sends only the tool name, the last error code and your browser type — never what you typed.