Prompt Version Diff

Diff two versions of a prompt to see exactly what changed

Paste an old and new version of a prompt to get a word-level diff with colour-highlighted additions and deletions, plus a summary of how length and structure changed. Runs entirely in your browser. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

Is this a character or word diff?

It is a word-level diff, which reads far better for prose prompts than a raw character diff. Whitespace is normalised so reformatting does not drown out meaningful changes.

Prompt version diff

Prompts rarely change all at once — they drift through dozens of small edits, and any one of them can move behaviour. When you are A/B testing or chasing a regression, the first question is always what exactly changed? This tool answers it with a clean, word-level diff between two prompt versions.

Why diffing prompts is different from diffing code

Code diff tools are designed for line-structured text where indentation and line breaks carry meaning. Prompts are usually prose — paragraphs, run-on instructions, multi-sentence rules. A line-level diff of two prompts that differ by one word in the middle of a paragraph will flag the entire paragraph as changed, which is technically correct but practically useless. You still have to read the whole paragraph to find the actual change.

Word-level diffing solves this. By aligning at the word token level rather than the line level, the diff highlights exactly which words were added, removed, or changed — even in the middle of a long paragraph. This is the right granularity for prompt text.

When this tool is most useful

After a behaviour change. When a model’s output quality shifts and you are not sure why, the diff answers whether the prompt changed and exactly how. Compare the version that worked against the version that did not.

During review. When collaborating on a shared prompt, a diff gives reviewers a precise view of what changed in a new version rather than asking them to re-read the whole prompt.

Confirming a rollback. When you roll a prompt back to a previous version, the diff confirms that the rollback landed correctly and that no unintended changes crept in.

Prompt compression verification. After running a prompt through a length optimizer or trimmer, diff the original against the result to confirm no load-bearing instructions were removed.

How it works

The diff tokenises both versions into words and computes the longest common subsequence — the standard algorithm behind tools like git diff. Words present only in the old version are marked as deletions (struck through, red); words only in the new version are additions (green); shared words stay plain. Whitespace is normalised so that reflowing a paragraph does not register as thousands of changes.

Alongside the highlighted view, a short summary reports the word count of each version and the net change, so you can see at a glance whether an edit tightened or expanded the prompt. All computation happens locally in your browser.

Tips and notes

When debugging a behaviour change, diff the exact two prompt strings your app sent — not your mental model of them. Small things like a removed “only”, a swapped verb, or a deleted example are easy to miss by eye but jump out in the diff. Pair this with the system-prompt linter: diff to see what changed, lint to check whether the change introduced a new structural problem. Keep your prompt versions in source control too — the diff here is for quick comparison, not permanent history.