03 / DEVELOPER
Text Diff
Compare two pieces of text and see additions, removals and unchanged lines in a unified view. Large inputs run in a Web Worker.
Original
Modified
Diff+0 -0
How to use
- 1Paste the original text into the left pane and the modified text into the right pane.
- 2The unified diff updates live below — added lines start with +, removed with -, unchanged lines for context.
- 3Switch between Line and Character mode for granularity that matches your task.
- 4Inputs of 100 KB or more run in a Web Worker with a 5-second watchdog so the UI stays responsive.
Frequently asked questions
Which diff algorithm is used?
We use the JavaScript port of the Myers diff algorithm — the same family used by git, with O(N + D²) behavior.
What does the watchdog do?
If the diff doesn't finish within 5 seconds, the Worker is terminated and you'll see a timeout error instead of a frozen tab.
Can I export the diff?
Yes — the unified-diff text in the output pane is exactly what tools like patch expect, so you can save it as a .patch file.
Is anything stored or uploaded?
No. Both texts and the resulting diff stay in your browser memory.
Why no side-by-side view?
Side-by-side adds a lot of UI complexity for marginal gain. The unified view fits more comparisons on one screen and is easy to copy.