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
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
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
- Split both sides into lines with CRLF/CR normalized to LF.
- Compute a line-level difference with the Myers (1986) algorithm via the shared F011 engine and refine paired changes at word precision.
- Estimate tokens on each side with the shared dependency-free estimator and report the signed delta.
Usage
- Paste the earlier prompt and the later prompt.
- Read the added, removed and changed line counts.
- 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
{
"before": "Answer briefly.\nUse JSON.",
"after": "Answer in one sentence.\nUse JSON."
}An added instruction
{
"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
- GNU diffutils manual — Free Software Foundation
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.