Free Online Text Diff Tool

Compare Two Texts Online

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

No upload Side by side Line or word Free
0
Bytes uploaded
3
Diff modes
0
Files stored
$0
Free, always
Why compare two texts

Three Reasons to Diff Text

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.

See Exactly What Changed

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.

Only the changes, marked clearly.

Review a Change or an Edit

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 review that fits the material.

Compare Sensitive Text Privately

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.

A diff without exposing the text.
How it works

Compare Two Texts in Three Steps

1

Paste Both Versions

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.

A / B DIFF mode
2

Pick the Diff Mode

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.

diff.patch
3

Read or Export

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.

Highlighted diff Added and removed
Export Unified patch
One or a batch Download or ZIP
Need it faster?

Diff Large Files or a Whole Folder

Two blocks of text or a pair of files compare in one step on this page. For very large files, a whole folder of changes or a three-way merge, git diff or a desktop merge tool works straight from disk across the lot.

Get Desktop Version Free trial · Windows 7 to 11
What the free tool does

What the Text Diff Tool Does

To diff text is to find the smallest set of changes between two versions. The tool does that on the device.

Line, Word or Character

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.

Side by Side or Unified

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.

Ignore the Noise

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.

Export a Unified Patch

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.

Reference

What Converts Cleanly and What to Watch

A diff finds the smallest set of changes between two texts. These points decide how the result reads.

The caseResultWhat happens and why
Line modecode, configCompares line by line, the right level for source code, a config or a log.
Word modeproseCompares word by word, which suits a copy edit or a paragraph of text.
Character modetyposCompares character by character, to catch a single typo or a whitespace change.
Side by sidetwo columnsThe 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 optionsnoise offIgnore case, whitespace or blank lines so a reformat does not read as a change.
JSON semantickey orderTwo JSON blocks are sorted first, so a reordered key is not flagged as a change.
Exportunified patchThe diff saves as a patch that git and the patch command apply.
Where it runson the deviceThe 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.

Honest comparison

In the Browser vs a Merge Tool

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.

Why no upload

The Text Never Leaves the Device

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.

1. Open the browser tools at the Network tab
2. Clear the log and let it record
3. Compare two texts with the panel above
Nothing uploads. The diff was computed on the page itself.
0
Bytes uploaded
0
Files stored
0
Accounts required
0
Watermarks added
Alternatives

Other Ways to Compare Text

Each of these compares two texts. They vary in the effort, the cost and whether the text travels.

git diff

git diff shows changes between commits or files in a repo.
It runs offline and drives a code workflow.
It needs a repo and lives in the terminal.

A Merge App

Meld or Beyond Compare diff files, folders and three versions.
They edit and merge, not only compare.
They are desktop apps that have to be installed.

An Editor

VS Code compares two open files with a built-in diff view.
It fits alongside the rest of an edit.
It means opening the files in the editor first.

diff on the Command Line

diff -u prints a unified patch between two files.
It ships with Unix systems and scripts well.
It is plain text output with no side-by-side view.

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.

Before converting

Three Things to Know Before Converting

A little context sets a cleaner diff.

Match the Mode to the Text

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.

Turn On Ignore Options

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.

Use Semantic Mode for JSON

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 desktop edition

When a Whole Codebase Needs Diffing

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.

In a browser tabtwo texts at a time
On the desktopa whole tree in one pass
Folder Diff

Point it at two folders and every changed file is listed and diffed in one view, the shape of a real code review.

Three-Way Merge

Merge a base and two edited versions, resolving each conflict in place, which a two-way browser diff cannot do.

In the Pipeline

A diff step runs inside a build or a hook, so a change is checked automatically, ready for a repeated workflow.

Common questions

Text Diff Questions

It compares two versions of text and marks every change between them, straight in the browser. The compare runs at the line, word or character level, in a side-by-side or a unified view, and the result can be exported as a patch.
No. The comparison runs on jsdiff in the browser, so both versions stay on the device. This matters, since the text in a diff is often a contract, a log with real data or an internal draft that should not sit on a server.
Line mode compares whole lines, which suits code, a config or a log. Word mode compares word by word, which suits prose and copy edits. Character mode compares each character, to catch a single typo or a whitespace change inside a long line.
Side by side puts the two versions in two aligned columns, best for a close review. Unified merges them into one stream, with a plus for an added line and a minus for a removed one, the shape of a patch file that is easy to paste into a ticket.
Yes. Options ignore case, all whitespace, trailing spaces or blank lines before the compare. This strips out the noise of a reformat or a change in line endings, so only the real edits are left highlighted in the diff.
Yes. The diff exports as a unified patch, the plus and minus format that git and the patch command read. It drops into a ticket or a pull request, and it can be applied to a file with git apply where the change needs to be reused.
Yes. It runs the Myers diff algorithm, the same method behind git, Mercurial and many editors, so the result matches what git diff would show for plain text. A hash of a fixed input is a fixed standard, and so is a diff of two fixed texts.
Yes. Drop two files into the panels rather than pasting, and they are read on the device and compared. Text formats such as code, a config, a log, JSON, CSV or Markdown all work, since a diff treats them all as lines of text.
A plain text diff of two JSON blocks flags a reordered key or a whitespace change as a difference. A JSON semantic mode sorts the keys and pretty-prints both sides first, so only a real content change shows rather than a formatting one.
No. Track changes lives inside one document with revision marks. This tool compares any two separate texts, including code, a log, JSON or two pasted drafts. It shows the difference without either document holding the marks.
It is the method most diffs use, from a 1986 paper by Eugene Myers, that finds the smallest set of insertions and deletions between two texts. Its core is the longest common subsequence, the longest run of tokens the two versions share.
A page or a moderate file compares quickly in the browser. A very large file, or a whole folder of changes, is better handled by git diff or a desktop merge tool, which read from disk and are built for a review across many files at once.
In line mode, a line that differs at all is marked as a whole. Switching to word or character mode, or letting the intra-line highlight run, narrows the mark to the part that actually changed rather than the entire line.
The left side is treated as the original and the right side as the changed version, so a line only on the right shows as an addition and a line only on the left shows as a removal. Swapping the sides flips additions and removals.
Yes. The tool runs in a mobile browser as well as on a desktop, so two texts pasted on a phone compare without an app. Both versions are read on the device and nothing is sent to a server.
The page is cheap to host, and since the work happens on the device nothing is received or kept here. The wider suite of tools is what supports the site. There is no cap, no watermark and no sign-up.

OnlinePCApps Developer Group

Written and reviewed by Dario Bassi, who has worked on diff and developer tools here since 2013

Last reviewed August 2026
13
Years on dev tools
0
Texts uploaded
3
Diff modes
0
Watermarks

A diff looks like magic until the idea behind it clicks, and then it is simple. Underneath, the tool finds the longest run of text the two versions share. Everything outside that run is what changed. That run is the longest common subsequence, and the fast way to find it comes from a 1986 paper by Eugene Myers, the same algorithm that git uses, so the result here matches git diff on plain text. The part people miss is that the level matters. Line mode is right for code and configs, word mode for prose and character mode for a stray space or a typo. Picking the level to match the material is most of getting a clean diff. Ignore options and a semantic JSON mode clear away the formatting noise that would otherwise bury the real edits. Since the two texts are often a contract or an internal draft, the whole compare runs in the browser on jsdiff and sends nothing to a server.

Standards followed

jsdiff · JavaScript Myers · 1986 LCS · Algorithm Unified Diff · Patch
Built on the same shared design system as every OnlinePCApps tool. onlinepcapps.com

Compare Two Texts Online for Free

Free and online, with no sign-up and no upload. Compare two texts in the browser, all on the device.

Compare Two Texts Free, no account Try Desktop Edition For folders and merges
Compare Texts