prompt-engineering.dev

PromptDiff

Compare two prompt versions side by side, word by word, with the estimated token change.

Line diffs light up a whole paragraph when one word changes. This shows the words that changed, and an estimate of how the token count moved.

Compare two versions

Prompts stay in this request. They are not written to disk, not logged, and not sent to a model.

How it works

  1. Paste the earlier prompt in Before and the revised prompt in After.
  2. Press Compare. The result is rendered on the server and works with JavaScript turned off.
  3. Read the insertions and deletions, then the token estimate. Word and character counts are exact. The token figure is an estimate.

Privacy

PromptDiff does not have accounts, history, or a database. The text in the form exists only in memory while the response is built. It is not written to a file, not written to the log, and not put in the URL.

Questions

Why not a normal diff?

A normal diff is line by line. Prompts are long paragraphs, so a one-word edit highlights the whole line. PromptDiff compares lines first, then words inside the lines that changed.

Are the token numbers exact?

No. They are an offline estimate: about four characters per token for Latin text, and about one token per character for CJK and other non-Latin letters. They are not a tokenizer for any model, and there is no price.

What happens to my prompt?

It is discarded when the response is sent. There is no account and nothing is saved.

How big can a prompt be?

50,000 characters per side. A larger paste is refused, and the message names the side and its length.

Why are some sections not word by word?

If two sections differ by more than the work budget, they are shown as one removal and one insertion so the page stays fast. A note above the panes says so.

Compare two prompts