devtools.codes

Prompt Diff

RUNS LOCALLY

Compare two versions of a prompt and see which instructions actually changed. The comparison works at word level by default because prompts are prose, not code, and a line diff hides a single changed word inside a whole rewritten paragraph. The token delta shows what the change costs.

Your tool input is processed locally in your browser and is not intentionally uploaded to our servers. Advertising and analytics providers may still process normal page, device, cookie and network information.

How to use it

  1. Paste the version that was working into the left pane, and the version you are testing into the right.
  2. Choose word or line granularity. Word is better for prose; line suits structured instruction lists.
  3. Tick Ignore case if capitalisation changes are noise rather than signal for your comparison.
  4. Read the highlighted result. Additions are marked with a plus, removals with a minus.

A worked example

The example compares two revisions of a short assistant prompt. The second adds a British English instruction mid-sentence and appends a new rule about fabricated citations.

A line diff would mark the whole first paragraph as changed. The word diff isolates the four inserted words, which is the difference between seeing what changed and seeing that something changed.

Press Example in the workspace above to load it.

Questions

Why compare by word rather than by line?

Prompts are usually written as flowing paragraphs. Change three words in a long sentence and a line diff marks the entire line as replaced, which tells you nothing useful. Word granularity isolates the actual edit. Line granularity is still the better choice when your prompt is a list of discrete numbered rules.

How accurate is the token delta?

It is a rough estimate derived from character count, useful for judging whether a change is small or substantial. It is not tokenisation and will not match what any provider counts, so it is labelled an estimate everywhere it appears. Do not budget against it. Real token counts depend on the model, and the same text tokenises differently across providers.

Can I compare things other than prompts?

Yes. Anything prose-shaped works well: system instructions, documentation, model responses, agent instruction files. It is deliberately not a code diff — it does not understand syntax, indentation or moved blocks, so your version control tooling remains the better choice for source files.

Why is there no Compare button?

The comparison updates as you type, so a button would imply the result on screen might be stale when it is not. Everything recalculates locally, and fast enough that waiting for an explicit action would only add a step without adding any information. The same reasoning applies to the Token and Cost Calculator, where the figures are live for exactly the same reason.

Does my input leave the browser?

No. Your tool input is processed locally in your browser and is not intentionally uploaded to our servers. Advertising and analytics providers may still process normal page, device, cookie and network information. Nothing you paste is logged, stored or sent to an analytics event, and there is no account to attach it to.