Prompt Diff & Compare
Compare two prompts or texts side by side and highlight what changed — additions and deletions, by word or line. Free, runs in your browser.
Prompt Diff & Compare
How to Use Prompt Diff & Compare
Paste your two versions
Drop the earlier prompt into Original (A) and the newer one into Changed (B). They can be system prompts, instructions, drafts, or any two blocks of text you want to compare.
Pick word or line granularity
Choose Word to spot small wording tweaks, or Line to see which whole lines or paragraphs were added or removed. Switch any time — the diff recomputes instantly.
Read the highlighted diff
Text only in B is marked as an addition (green, prefixed +); text only in A is marked as a deletion (red, struck through, prefixed −). Unchanged text stays plain.
Check the change count
The summary shows +X added, −Y removed so you can gauge the size of an edit at a glance. Everything runs in your browser — nothing you paste is uploaded.
Why a Diff Is the Fastest Way to Iterate on a Prompt
Prompts are code, and code deserves version control
A modern prompt — the system prompt behind a Custom GPT, the instructions on a Claude Project, the standing message of an AI agent — is rarely written once and left alone. You ship a first draft, watch how the model behaves, and then tweak: tighten a rule here, soften the tone there, add a guardrail, delete a sentence that confused the output. After three or four rounds of this, your prompt has quietly drifted, and the honest answer to "what actually changed between Tuesday's version and today's?" is usually a shrug. That shrug is expensive. When a prompt suddenly starts producing worse answers, the regression almost always lives in a single edit you made and forgot. Being able to lay two versions side by side and see exactly which words or lines moved turns debugging from guesswork into a five-second read.
This is the same discipline software engineers have used for decades. Nobody reviews a code change by re-reading the whole file; they read the diff — the handful of lines that actually changed — because that is where the risk and the meaning live. Prompts behave identically. A prompt is a behavioural specification written in plain language, and the difference between "always answer in bullet points" and "answer in bullet points" can change every response the model gives. A diff makes those small, high-leverage edits visible instead of letting them hide inside a wall of unchanged text. Treating your prompts as versioned artifacts — keeping the old copy when you change something, and comparing before and after — is the single cheapest habit that separates people who tune prompts deliberately from people who poke at them and hope.
"You cannot improve what you cannot see change. A prompt diff makes every edit legible — and an illegible edit is an untested one."
What the highlights are really telling you
Under the hood this tool computes a longest common subsequence between your two texts — the largest run of tokens (words or lines) that appears, in order, in both. Everything outside that common backbone is either an addition that exists only in the Changed version or a deletion that existed only in the Original. That is the same core algorithm behind the diffs you see in Git, code review tools, and document version history, and it is precise: it finds the minimal set of changes rather than just flagging "these two texts are different". Word granularity is perfect for catching a reworded instruction or a flipped constraint; line granularity is better when you have reorganised whole sections and want to see structural moves without the noise of every shuffled word.
Reading a diff well is a skill worth building. Additions in green tell you what new behaviour you are asking for; deletions in red, struck through, tell you what you have taken away — and removals are where silent regressions hide, because it is easy to delete a guardrail and not notice the model has stopped refusing something it used to refuse. Pair this tool with deliberate versioning: keep a short changelog of why each edit was made, run a diff before you commit to a new version, and you build a feedback loop where every change to a prompt is intentional, visible, and reversible. The same workflow applies far beyond prompts — comparing two drafts of an email, two revisions of a policy, two answers from different models — anywhere you need to know precisely what moved. It all happens locally in your browser, so even sensitive prompts and proprietary text never leave your machine.
10 Facts About Comparing Prompts
A diff shows only what changed between two texts — the fastest way to review an edit.
This tool uses a longest common subsequence algorithm — the same core idea behind Git diffs.
Prompts drift over time; after a few rounds of tuning, few people can recall what actually changed.
Deletions are where silent regressions hide — removing a guardrail rarely announces itself.
Word granularity catches reworded instructions; line granularity reveals structural moves.
The gap between "always answer in bullets" and "answer in bullets" can change every response.
Engineers review code by reading the diff, not the whole file — prompts deserve the same.
The +X / −Y count gives you the size of an edit at a glance before you read a word.
Diffing works on anything — two emails, two policies, two model answers — not just prompts.
This tool runs entirely in your browser — your text is never uploaded or stored.
Frequently Asked Questions
- It compares two blocks of text — typically two versions of a prompt — and highlights exactly what changed. Text added in the Changed (B) version is marked in green, text removed from the Original (A) version is struck through in red, and the summary shows how many additions and deletions there are.
- Word mode compares token by token, so it highlights small wording tweaks within a sentence. Line mode compares whole lines, which is cleaner when you have moved or rewritten entire paragraphs and don't want every shuffled word flagged. Switch between them at any time and the diff recomputes instantly.
- No. The entire diff is computed in your browser with plain JavaScript. Nothing you paste is sent to any model, server, or third party, and nothing is saved — so it's safe for sensitive or proprietary prompts.
- It computes the longest common subsequence (LCS) of the two token arrays using dynamic programming — the largest run of words or lines that appears, in order, in both texts. Anything outside that common backbone is shown as an addition or a deletion. It's the same core technique used by Git and code review tools.
- Prompts drift as you tune them. When a prompt starts producing worse output, the cause is usually a single edit you forgot you made. A diff lets you put the old and new versions side by side and see precisely which words or lines moved, turning regression-hunting from guesswork into a quick read.
- Yes. It works on any two blocks of text — two drafts of an email, two revisions of a policy, two answers from different models, or any before-and-after comparison where you need to see exactly what changed.
- They are the counts of added and removed tokens — words in word mode, lines in line mode. The summary "+X added, −Y removed" gives you the size of an edit at a glance before you read the highlighted detail.
- A standard LCS diff treats a moved block as a deletion in one place and an addition in another, rather than as a single "moved" operation. For most prompt edits — wording changes, added rules, removed lines — this is exactly what you want. If you reorganise large sections, line mode keeps the result easiest to read.
- There's no hard cap, but because the diff uses a dynamic-programming table, very large texts (tens of thousands of tokens) will use more memory and compute. For typical prompts, instructions, and documents it's effectively instant.
- Yes. The diff updates live on every keystroke in either box and whenever you switch between word and line mode, so you see the comparison change in real time as you edit.
- Completely free, with no account or sign-up, and no limit on use. It runs in your browser and collects no data.
Related News
You may be interested in these recent stories from our newsroom.
No related news yet for this tool. Our editorial team publishes new pieces every week.
Browse all news →75 more free tools
Calculators, converters, security tools — no signup.