Prompt Diff

Compare two prompt versions line by line and see added, removed and changed lines plus the token and character delta — locally.

  • Runs locally in your browser
  • No upload required

Try it

Added lines
2
Removed lines
1
Changed lines
1
Token delta
+5
Character delta
+22
- Answer briefly.
+ Answer in one sentence.
+ Cite sources.

Supported formats

Input
text/plain
Output
text/plain

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

1 added, 1 removed and 1 changed line(s); token delta +2.

How it works

  • Split both prompts into lines with line endings normalized.
  • Compute the line difference with the shared F011 diff engine and refine paired changes at word precision.
  • Estimate tokens on each side with the shared estimator and report the delta.

Methodology

  1. Split both sides into lines with CRLF/CR normalized to LF.
  2. Compute a line-level difference with the Myers (1986) algorithm via the shared F011 engine and refine paired changes at word precision.
  3. Estimate tokens on each side with the shared dependency-free estimator and report the signed delta.

Usage

  1. Paste the earlier prompt and the later prompt.
  2. Read the added, removed and changed line counts.
  3. Read the token and character deltas to see whether the prompt grew or shrank.

Examples

These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.

One changed line

jsonSelect to copy
{
  "before": "Answer briefly.\nUse JSON.",
  "after": "Answer in one sentence.\nUse JSON."
}

An added instruction

jsonSelect to copy
{
  "before": "Summarize the text.",
  "after": "Summarize the text.\nCite sources."
}

Limitations

Track prompt changes deliberately

Prompts drift. Diffing versions before and after an edit shows exactly what changed and how much longer the prompt became, which matters when the context window is a constraint.

Frequently asked questions

Are my prompts uploaded?
No. The comparison runs in your browser; nothing is transmitted.
Is the token delta exact?
No. It is the difference of the labelled token estimates; both sides use the same method, so the direction is meaningful even when the absolute figure is approximate.

Sources

  1. GNU diffutils manual — Free Software Foundation