Skip to content

Menu

Prompt Diff

Compare two prompts or model outputs word by word, with size and token estimates.

Runs entirely in your browserAIFree, no sign-up
Loading tool

01What is Prompt Diff?

Small prompt edits can change a model's answer in ways that are hard to spot by eye. Prompt Diff puts two texts side by side and marks every word that was added or removed between Version A and Version B. Paste two drafts of a system prompt, two answers from one model, or answers from two models to the same question. The comparison runs at word level. The text is split into runs of non-space characters and runs of whitespace, and a longest common subsequence diff lines them up. That suits prose better than the line diffs used for code. If a sentence gains one adjective, you see that word highlighted, not the whole line. Here's a real case. A says "Return a list of three ideas." and B says "Return a numbered list of five ideas." The inline view shows "numbered" in green, "three" struck through in red and "five" in green. The stats table shows words going from 6 to 7 and characters from 29 to 37. There are two views. Inline shows one merged text with removals struck through in red and additions in green. Side by side shows A with its removals on the left and B with its additions on the right. That is easier on long outputs. The swap button flips A and B if you pasted them the wrong way round. Two options cut noise. Ignore whitespace treats any run of spaces, tabs or line breaks as equal to any other. Ignore case treats words that differ only in capitals as the same, and the merged view shows A's spelling. Under the diff, a table compares words, characters, lines and a token estimate for each side, plus the change. The token figure is characters divided by four, rounded up. That is a rule of thumb for English, not a real tokenizer, so check your provider's tokenizer before trusting it for cost or context limits. The tool also counts lines added and removed using a separate line-level diff. Some honest limits. That line counter can disagree with the word diff. A one-word edit still counts as one line removed and one added. With Ignore whitespace on, rejoining two lines into one shows no word changes but still reports changed lines. Very large inputs, where the two token counts multiplied pass four million, skip the real diff and show all of A removed and all of B added. Everything runs in your browser and nothing is uploaded.

Developers and prompt writers who iterate on prompts and want to see exactly which words changed between two versions or two model answers. The tool runs entirely in your browser, so your data never leaves your device.

02How to use Prompt Diff

  1. Paste the original prompt or output into Version A
  2. Paste the changed text into Version B, and use the swap button if they are the wrong way round
  3. Pick Inline or Side by side
  4. Tick Ignore whitespace or Ignore case if formatting changes are cluttering the diff
  5. Read the stats table and the Lines added and Lines removed counts under it

03Worked examples

Input: A: You are a helpful assistant. B: You are a concise assistant.
Result: You are a [-helpful-]{+concise+} assistant. Words 5 -> 5, Characters 28 -> 28, Tokens 7 -> 7. Lines added 1, removed 1.
[- -] marks removed words and {+ +} added ones here. The diff is word-level, but the line counter counts the whole changed line as one removed and one added.
Input: A: Return a list of three ideas. B: Return a numbered list of five ideas.
Result: Return a {+numbered +}list of [-three-]{+five+} ideas. Words 6 -> 7, Characters 29 -> 37, Tokens 8 -> 10
The added word and its following space are shown together here for readability.
Input: A: Answer in JSON. B: answer in json. Ignore case on
Result: Answer in JSON. (no changes) Lines added 0, removed 0
With Ignore case, matching words show as unchanged and Version A's spelling is displayed.
Input: A: Be brief. B: Be brief. Cite sources.
Result: Be brief.{+ Cite sources.+} Words 2 -> 4, Characters 9 -> 23, Tokens 3 -> 6, Lines 1 -> 2. Lines added 1, removed 0.
Tokens are characters divided by four, rounded up.
Input: A: Reply in English.\nBe short. B: Reply in English. Be short. Ignore whitespace on
Result: Reply in English. Be short. (no word changes) Lines added 1, removed 2
The word diff ignores the double space and the line break, but the line counter still sees two lines become one.

04Common use cases

  • Reviewing exactly what a teammate changed in a production system prompt before you approve the deploy
  • Comparing a model's answer before and after you add one constraint to the prompt
  • Putting two models' answers to the same question next to each other to see where they diverge
  • Checking whether a prompt rewrite made the text longer or shorter in rough token terms
  • Spotting a single changed number or name in generated documentation or a support email
  • Confirming that a reformatted prompt only changed line wrapping, with Ignore whitespace on

05Tips

  • Ignore whitespace hides rewrapping in the word diff, but the line counters still count rejoined lines as changes.
  • Where the API still accepts it (Claude's current version does not), keep temperature low and fixed when comparing model outputs, so the differences come from your prompt edit and not sampling.
  • For very long texts, compare one section at a time. Past the size limit the tool marks everything as removed and added.
  • Treat the chars divided by four token figure as a trend, and use your provider's tokenizer for billing.

06Related concepts

prompt engineering, text diff, tokens, LLM evaluation, longest common subsequence.

Frequently Asked Questions

What is Prompt Diff?

Prompt Diff is a free, browser-based developer tool on AIDToolStack. Compare two prompts or model outputs word by word, with size and token estimates. It requires no installation or sign-up and works entirely in your browser.

Is Prompt Diff free to use?

Yes. No sign-up, no fees and no usage cap.

Does Prompt Diff store my data?

No. It runs in your browser; nothing is uploaded.

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe