Browse all 103 browser-based tools (103 currently marked free), or tell us what useful utility we should build next.
Compare two text inputs and review their differences. Use the comparison when checking revisions to writing, configuration, or code.
Differences will appear here after comparison...
A bounded LCS pass marks each line added, removed, or unchanged with real line numbers
Original on the left, modified on the right, with colored change gutters
Counts added, removed, and unchanged lines plus a change percentage
All changes in one stream with classic + and - prefixes, like git diff
Export to a .txt unified diff with --- / +++ headers in one click
Comparisons run in a Worker when available, with byte, line, memory, and time budgets
This comparison workspace computes a line-and-token diff between two text blocks, highlighting insertions, deletions, and unchanged context. Text comparison is sensitive to representation. Whitespace, line breaks, and formatting can create changes even when the underlying data means the same thing. To compare parsed JSON values independently of key order, use JSON Diff instead.
Each side is limited to 256 KB and 12,000 lines, both sides to 512 KB combined, and the LCS table to 4,000,000 cells. Comparison is cancellable and runs in a Worker when supported; large output is paginated.
+ added, - removed, and unchanged lines..txt diff.Toolk splits both inputs into lines, then computes their Longest Common Subsequence (LCS) with a classic dynamic-programming table. The LCS is the longest ordered set of lines the two versions share. Anything in the original but not in that subsequence is marked removed; anything in the modified version but not in it is marked added. This is the same line-matching idea Eugene Myers formalized in his 1986 paper "An O(ND) Difference Algorithm and Its Variations", which unified the shortest-edit-script and LCS problems that drive git diff. The bounded implementation runs this calculation off the main thread when Workers are available, yields between rows in the fallback, and stops before the table exceeds its cell budget.
The export follows the unified diff convention standardized in POSIX.1-2008 (The Open Group diff utility): a --- line for the original, a +++ line for the modified file, then each line prefixed by + (added), - (removed), or a space (context).
Both modes use the same comparison; they only differ in layout. Pick the one that matches your task.
| Aspect | Side-by-Side View | Inline (Unified) View |
|---|---|---|
| Layout | Two parallel columns | Single continuous stream |
| Change marker | Colored left gutter per column | + / - prefix per line |
| Line numbers | Original and modified, separately | Sequential change stream |
| Best for | Reviewing structure and reordering | Patch logs and code review |
The built-in example compares a JavaScript function before and after a refactor. Here is roughly what the inline (unified) output looks like:
--- original
+++ modified
- function greet(name) {
- console.log("Hello, " + name);
- return true;
+ function greet(name, greeting = "Hello") {
+ console.log(greeting + ", " + name + "!");
+ return { success: true };
}
const user = "World";
- greet(user);
+ const result = greet(user, "Hi");Config drift example. Compare two .env files and only the changed keys light up. Input A has PORT=3000; input B has PORT=8080. Because each whole line is matched, the diff reports the old line removed and the new line added, even though only four characters changed.
Failing edge case — trailing whitespace. The line name: api (with one trailing space) does not match name: api. The comparison is exact, so a stray space or a tab-vs-spaces change shows the entire line as removed and re-added. If that is noise, strip whitespace first with Find and Replace.
These are the line markers in the exported toolk-diff-result.txt file.
| Symbol | Meaning | Source |
|---|---|---|
| --- | Header for the original file | Original |
| +++ | Header for the modified file | Modified |
| + | Line added in the modified version | Modified only |
| - | Line removed from the original | Original only |
| (space) | Unchanged context line, in both | Both |
Toolk's comparison uses a typed (m + 1) × (n + 1) dynamic-programming table, where m and n are the line counts of the two sides. That means both time and memory grow as O(m × n), not the near-linear O(ND) of git's optimized Myers implementation. The practical effect: two 50-line inputs build a ~2,600-cell table and stay within the bounded budget, but inputs above the 4,000,000-cell budget would be rejected before allocation instead of stalling the browser tab. For very large files, diff in smaller sections or use a command-line tool. The checker yields between bounded rows in its no-Worker fallback, reports progress, and offers a cancel control.
One more honest note: the export writes +/-/space line prefixes and ---/+++ headers, but it does not emit @@ -l,s +l,s @@ hunk headers. It is a readable change log, not a patch you can feed straight into git apply.
Spot exactly which lines changed between two revisions before you commit. Pair it with the JSON Formatter to normalize payloads first so the diff is meaningful.
Compare a working .env, .yaml, or nginx config against a broken one to find the changed key. For structured data, the dedicated JSON Diff compares by value.
Track changes between two drafts of an article or contract. Run the Word Counter to confirm length targets after editing.
Compare two JSON objects by value
Find and ReplaceStrip whitespace before diffing
Text SorterSort and dedupe lines first
Word CounterCount words and characters
JSON FormatterBeautify JSON before comparing
SQL FormatterNormalize queries before diff
XML FormatterPretty-print XML for comparison
Case ConverterNormalize line casing
CSS BeautifierFormat CSS before diffing
YAML ValidatorValidate config before compare
Toolk BlogGuides on diffing and dev tools
Last updated: September 23, 2026 · Runs 100% in your browser — no uploads, tool input is not sent to Toolk.
It splits both inputs into lines and computes the Longest Common Subsequence with a dynamic-programming table — the same line-matching idea Eugene Myers formalized in 1986 and that underlies git diff. Lines outside the subsequence are reported as added or removed.
The checker validates each side before comparison: keep each input under 256 KB, 12,000 lines, and 512 KB combined. The LCS table is capped at 4,000,000 cells, comparison runs in a Worker when supported, and you can cancel it from the progress row. Compare smaller sections when a request exceeds that memory budget.
The comparison is exact per line, so name: api with one trailing space does not match name: api without it — you get a remove-plus-add pair even when only whitespace moved. Strip stray spaces first with Find and Replace if that noise hides real edits.
No. The export writes ---/+++ headers plus +/- and context prefixes as a readable change log, but it does not emit @@ hunk headers or line numbers, so patch tools will reject it. Use it for review records, not for applying changes.
No. The comparison, unified-diff formatting, and download are processed locally in your browser, and Toolk's page analytics do not receive your text — which is why comparing private configs and unreleased code here is safe.