jarvisbox

Text Diff

Compare two texts and highlight line-by-line changes.

100% client-side
Diff output Added Removed

Click Compare to see the diff…

Why use a text diff tool?

Comparing two versions of a document, configuration file, or code snippet by eye is error-prone, especially for longer texts. A diff tool instantly highlights exactly what changed, making it easy to review edits, catch unintended changes, or understand how a document evolved. This browser-based tool keeps your text completely private — useful when the content is sensitive and you cannot paste it into a cloud service.

How to use

Paste the original text into the Before box and the modified version into the After box. Click Compare to see the diff. Lines that were removed appear with a red background and a minus prefix; lines that were added appear with a green background and a plus prefix; unchanged lines have no highlight. Enable "Ignore trailing whitespace" to treat lines that differ only in trailing spaces as identical.

常見問題

How does the diff algorithm work?
The tool uses the Myers diff algorithm (via the diff.js library) to compute the shortest edit script between the two texts. It compares line by line and highlights added lines in green and removed lines in red.
Can I compare large texts?
Yes. The diff runs in your browser using JavaScript and handles texts up to tens of thousands of lines. Very large diffs may take a moment to render, but there are no upload size limits.
Are the texts saved anywhere?
No. Both texts stay entirely in your browser memory. Nothing is sent to a server. Closing or refreshing the page clears everything.
回報這個工具的問題