The free online text diff tool compares two versions of text and marks every change, line by line, word by word or character by character. Because it runs in the browser, the text is never uploaded.
Diff and compare tools by OnlinePCApps since 2013
Two versions of a file can look the same at a glance while a line, a word or a single character differs. The free online text diff tool marks every change so nothing slips past.
Reading two long files side by side to spot an edit is slow and easy to get wrong. A diff lines them up and highlights only what moved, so a single altered value or a stray character stands out at once.
A code tweak, a config update or a copy edit is easier to judge as a diff than as two full documents. Line mode suits code and configs, and word mode suits prose, so the review fits the material.
A contract, a log with real data or an internal draft should not be pasted into a server to be compared. The diff runs in the browser, so both versions stay on the device while the change is found.
Paste the original text on one side and the changed text on the other, or drop two files. Code, a config, a log, JSON or plain prose all compare the same way.
Choose line, word or character granularity, then a side-by-side or a unified view. Ignore case, whitespace or blank lines to cut out formatting noise and leave only the real edits.
Read the highlighted diff, or export it as a unified patch to drop into a ticket or a pull request. Both texts stay untouched, so the mode can be switched at any time.
To diff text is to find the smallest set of changes between two versions. The tool does that on the device.
The comparison runs at three levels. Line mode fits code and config files, word mode fits prose and copy edits, while character mode catches a single typo or a whitespace change inside a long line. The mode switches without a re-paste.
A side-by-side view puts the two versions in two columns with the changes aligned, best for a close review. A unified view merges them into one stream with a plus for an addition and a minus for a removal, the shape of a patch.
Options ignore case, all whitespace, trailing spaces or blank lines before the compare, so a reformatting pass does not drown the real edits. When both sides are JSON, a semantic mode sorts the keys so a reorder is not read as a change.
The diff exports as a unified patch, the plus and minus format that git and the patch command read. It drops straight into a ticket or a pull request, and it can be applied with git apply where the change needs to be reused.
To diff text, to compare two files and to check what changed all name the same task. A search for text diff or compare text online reaches this tool, and both versions are left as they are.
A diff finds the smallest set of changes between two texts. These points decide how the result reads.
| The case | Result | What happens and why |
|---|---|---|
| Line mode | code, config | Compares line by line, the right level for source code, a config or a log. |
| Word mode | prose | Compares word by word, which suits a copy edit or a paragraph of text. |
| Character mode | typos | Compares character by character, to catch a single typo or a whitespace change. |
| Side by side | two columns | The versions sit in two aligned columns, best for a close review. |
| Unified view | + and - | One merged stream with a plus for an addition and a minus for a removal. |
| Ignore options | noise off | Ignore case, whitespace or blank lines so a reformat does not read as a change. |
| JSON semantic | key order | Two JSON blocks are sorted first, so a reordered key is not flagged as a change. |
| Export | unified patch | The diff saves as a patch that git and the patch command apply. |
| Where it runs | on the device | The compare runs in the browser, so nothing is uploaded. |
How a Text Diff Works
A text diff works out the smallest set of insertions and deletions that turn one version into the other. At its heart is the longest common subsequence, the longest run of tokens the two texts share. Everything outside that run is what changed. The canonical fast method is Eugene Myers' 1986 paper, the same algorithm behind git, so the result here matches what git diff would show for plain text. A token can be a line, a word or a character, which is what the three modes set. Line mode suits code and configs, word mode suits prose, while character mode catches a typo or a stray space inside a long line. After the lines line up, a second pass at the word level highlights only the parts of a changed line that actually differ. Two honest points sit alongside this. Ignore options for case, whitespace and blank lines strip formatting noise before the compare. A JSON semantic mode sorts the keys first, since a plain text diff would otherwise flag a reordered key as a change. The whole comparison runs in the browser on jsdiff, and the references below define the method.
Both show what changed between two texts. The trade is real, and the text is often confidential.
| Point of comparison | This tool Compared in the browser On the device | A merge tool A desktop merge app |
|---|---|---|
| Where the text goes | Kept on this device | Kept on the machine |
| Price and caps | Free with no file cap | Free tier often capped |
| Diff a whole folder | Two texts at a time | Whole directories |
| Merge three versions | A two-way compare | Three-way merge and edit |
| A quick one-off | Paste and compare at once | An app to install first |
A desktop merge tool wins for a whole folder of changes or a three-way merge with editing, the work of a review across a codebase. This page wins for a quick two-text compare with an export, and it opens with no install. Each keeps the text local.
Both versions are compared inside the browser by jsdiff, so the work is client-side and the text stays on the machine that opened it. Nothing is handed to a server to run the compare.
The two texts in a diff are often a contract, a log with real data or an internal draft not cleared for an outside server. A hosted diff has to send both up to compare them, needless exposure when the browser can do the same work locally.
Each of these compares two texts. They vary in the effort, the cost and whether the text travels.
git diff, a merge app and the diff command all compare text, yet each needs a repo, an install or the terminal. This page compares a paste or two files with a side-by-side view and an export, kept local with nothing to set up.
A little context sets a cleaner diff.
Line mode fits code, configs and logs, where a whole line changes at a time. Word mode fits prose and copy edits. Character mode catches a typo or a whitespace change inside a long line, so pick by the material.
A reformat or a change in line endings can fill a diff with noise that hides the real edits. Ignoring case, whitespace or blank lines strips that out, so only the changes that matter are left highlighted.
A plain diff of two JSON blocks flags a reordered key or a whitespace change as a difference. Semantic JSON mode sorts the keys and pretty-prints both sides first, so only a real content change shows.
The browser compares two texts in memory, which fits an everyday check. A whole folder of changed files, a three-way merge or a review across a codebase belongs on git or a desktop merge tool, which reads from disk and diffs the whole tree.
Point it at two folders and every changed file is listed and diffed in one view, the shape of a real code review.
Merge a base and two edited versions, resolving each conflict in place, which a two-way browser diff cannot do.
A diff step runs inside a build or a hook, so a change is checked automatically, ready for a repeated workflow.
Free and online, with no sign-up and no upload. Compare two texts in the browser, all on the device.