Finding what changed between two config versions
Comparing a working configuration against a broken one usually reduces an outage investigation to a single line. Normalise formatting first so the diff is not swamped by whitespace.
Compares two texts and highlights what changed.
Compares two texts and highlights what changed.
Left: "version: 1" Right: "version: 2"
- version: 1 + version: 2
Removed lines and added lines are shown side-by-side.
Additions/removals are highlighted; unchanged lines are context.
Your input is processed entirely in your browser and never sent to a YAS server.
curl -X POST "https://yas.sh/api/v1/tools/text-diff" \
-H "Content-Type: application/json" \
-d '{"a":"one\ntwo","b":"one\nthree"}'const res = await fetch("https://yas.sh/api/v1/tools/text-diff", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"a": "one\ntwo",
"b": "one\nthree"
}),
});
const data = await res.json();import requests
r = requests.post("https://yas.sh/api/v1/tools/text-diff", json={"a":"one\ntwo","b":"one\nthree"})
data = r.json()| Field | Type | Required | Description |
|---|---|---|---|
| a | string | Yes | Left text (≤ 50 KB) |
| b | string | Yes | Right text (≤ 50 KB) |
{ "slug": "text-diff", "added": 1, "removed": 1, "unchanged": 1, "result": [{ "op": " ", "line": "one" }, ...] }Line-based diff (LCS) between two texts (≤ 2,000 lines each).
400 VALIDATION_ERROR — invalid input or unsupported option.413 PAYLOAD_TOO_LARGE — input exceeds the 64 KB limit.429 RATE_LIMIT_EXCEEDED — rate limit exceeded (60 req/min).The two inputs are split into comparable units — usually lines — and aligned by computing a longest common subsequence. The LCS is the longest ordered sequence of units present in both texts; everything outside it is classified as an insertion in the second text or a deletion from the first. This is the same algorithmic family behind diff(1) and git diff, which is why the output shape is familiar.
Alignment quality depends entirely on the unit you compare. Line-level diffing on a file where one long paragraph changed marks the whole paragraph as replaced; word- or character-level diffing on the same input pinpoints the changed phrase but produces noisy output on code. There is no universally correct granularity, only the one that matches the change you are looking for.
Comparing a working configuration against a broken one usually reduces an outage investigation to a single line. Normalise formatting first so the diff is not swamped by whitespace.
When someone returns a copy of a document rather than suggestions, a diff reconstructs the edit list they did not give you.
Format both payloads with the JSON Formatter first — identical data serialized differently produces a diff full of false positives otherwise.
Diffing exported records against imported ones surfaces truncation, encoding damage and silently dropped rows.
What this tool deliberately does not do, and where it will disagree with other implementations.