Prompt Diff (Compare two prompt versions + token delta)
Compare two versions of a prompt line by line and see the token delta between them — so you know exactly what changed and whether an edit made the prompt cheaper or more expensive. 100% local.
Last updated:
CommentsPaste two versions of a prompt and see them diffed line by line, plus the token delta between them — so you know both what changed and whether the edit made the prompt cheaper or more expensive. 100% local.
| 1 | − | You are a helpful assistant. Answer the user's question. | |
| 1 | + | You are an expert assistant. Answer the user's question accurately, citing sources where possible. | |
| 2 | 2 | ||
| 3 | − | Be concise. | |
| 3 | + | Be concise but complete. If unsure, say so rather than guessing. |
Compares two prompt versions line by line and shows the token delta, so you can see exactly what changed and whether an edit made the prompt cheaper or more expensive. 100% local.
What is Prompt Diff?
Prompt engineering is iterative: you tweak wording, add an instruction, drop an example, and re-test. A plain text diff shows what changed, but for prompts the number that matters is tokens — every added line costs money and latency on every call. This tool combines a line-level diff (added / removed / unchanged) with a token estimate of each version and the delta between them, so you can see at a glance that 'version B is clearer but +42 tokens per request' and decide if the trade-off is worth it.
How to diff two prompts
- 1Paste the original prompt as A and the revised one as B.
- 2Review the highlighted line changes.
- 3Check the token delta to see the cost impact of the edit.
Key Concepts
- Token delta
- The change in estimated tokens between the two versions.
Frequently Asked Questions
How is this different from a plain text diff?
In addition to line-level added/removed highlighting, it estimates the token count of each version and shows the delta — the metric that actually affects your API cost and latency.
Is my prompt uploaded?
No. Both the diff and the token estimate run entirely in your browser.
Try Next
Text Chunker
Split long text into overlapping chunks for embedding and RAG pipelines. Preview recursive, paragraph, sentence, or fixed strategies with live token counts. Runs 100% in your browser.
Related Tools
Cosine Similarity
Compute cosine similarity, dot product, and Euclidean distance between two vectors online. Perfect for debugging LLM embeddings, semantic search, and RAG pipelines. 100% local — vectors never leave your browser.
AI Cost Calculator
Estimate monthly LLM API cost across GPT-4o, Claude 3.5, Gemini, DeepSeek and 100+ models. Compare providers side-by-side with prompt-caching and batch discounts. Free, no signup — prices refreshed daily from the public LiteLLM catalog.
Token Counter
Count tokens in your prompt for GPT-4, GPT-3.5, Claude, and Gemini and predict API cost before you spend. Free, no signup — all counting runs locally, your prompt stays in your browser.
LLM JSON Extractor
Extract every JSON object or array buried inside an LLM reply — even when it's wrapped in markdown fences, mixed with explanation text, or has trailing commas and single quotes. Auto-repairs each block. 100% local.
Context Window Checker
Check whether your prompt fits a model's context window before you send it. Estimates prompt tokens, reserves room for the response, and shows remaining headroom across GPT-4o, o1, Claude, Gemini, DeepSeek and more. 100% local.
Prompt Token Breakdown
Break a prompt into segments and see how many tokens — and how much cost — each part uses. Find the heaviest section (system, few-shot examples, or user input) so you know exactly what to trim. 100% local.