Text Diff Tool
Usage Guide
Text Diff is a browser-based diff tool that shows you exactly what changed between two versions of any text — code, documents, configuration files, or prose — with a colour-highlighted side-by-side or unified view. Whether you are reviewing a colleague's edits to a document, comparing two versions of a configuration file, or investigating why an API response changed between two calls, this tool makes differences immediately visible. Lines that appear only in the left text are highlighted in red; lines that appear only in the right text are highlighted in green; identical lines are shown in white. Modified lines are broken down to the character level, so even within a long line you can see precisely which words or characters were added or removed. The underlying diff algorithm is the Myers diff algorithm (used by Git), so the output is semantically optimal — it minimises the number of change regions and groups related changes together. You can switch between side-by-side view (two columns) and unified view (single column with +/- prefixes) depending on your preference. The tool also reports a summary: total lines added, removed, and unchanged. For very large inputs (above 50 KB), processing is offloaded to a background Web Worker so the page stays responsive. No content is sent anywhere — your text, your diffs, and your changes stay private.
- Paste the original text — Click the left "Original" panel and paste the first version of your content — this is the baseline you are comparing against.
- Paste the modified text — Click the right "Modified" panel and paste the second version of your content — the version you want to compare to the original.
- Click Compare — Press the "Compare" or "Diff" button. The colour-coded diff view appears: red lines are present only in the original (removed), green lines are present only in the modified version (added), and grey lines are identical in both.
- Read the inline highlights — Within changed lines, the specific characters that were added or removed are highlighted with a darker shade. This character-level diff is especially useful for spotting typos, extra spaces, or punctuation changes in prose.
- Switch view mode — Toggle between "Side by Side" (original and modified in two columns, good for large monitors) and "Unified" (single column with + and - prefixes, like Git diff output). Choose whichever mode is easiest for your content.
- Review the summary — A summary bar above the diff shows the total count of added lines, removed lines, and unchanged lines. Use this to quickly gauge the scope of changes before reading the full diff.
Frequently Asked Questions
What is a text diff?
A text diff (difference) compares two versions of text and highlights what changed: lines that were added (shown in green) and lines that were removed (shown in red). It is the same concept used by version-control systems like Git.
Is my text sent to a server when I compare it?
No. The comparison runs entirely in your browser using the jsdiff library. Neither the original nor the modified text is transmitted to any server.
Does the diff work on large files?
Yes. When the combined input exceeds 50 KB the tool automatically moves the comparison to a Web Worker background thread, so the page stays interactive while the diff is being computed.
Does the tool compare by characters or by lines?
The default view compares line by line, showing entire added or removed lines. This matches the behaviour of tools like `git diff`.
Can I use this tool offline?
2Kit is a Progressive Web App (PWA). After your first visit it is cached and works fully offline.
Technical Implementation
All processing runs entirely in your browser — no data is ever sent to any server. This tool works fully offline as a Progressive Web App (PWA): after the first visit, all pages and assets are cached by a Service Worker and remain available without an internet connection. Your input data never leaves your device, making it safe for sensitive content including API keys, passwords, private configuration, and confidential documents.