Compare Two Texts Online

Free Online Text Diff Tool

Free online text diff tool. Paste an original and a modified text, then select Compare to see every added, removed and changed line side by side. The compare runs in the browser, so the text is never uploaded.

Diff and compare tools by OnlinePCApps since 2013

No upload Side by side Line by line Free
0
Bytes uploaded
2
Diff options
0
Files stored
$0
Free, always
Why compare two texts

Online Text Diff for Code, Configs and Copy Edits

Two versions of a file can look alike at a glance while a line differs. The free online text diff marks every changed line so nothing slips past.

See Exactly What Changed

Scanning two long files by eye is slow and easy to get wrong. The online text diff lines both versions up and marks only the lines that moved, so an 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 text diff than as two full documents. Added lines show green, removed lines show rose and changed lines show amber, so a review takes seconds.

A review in one glance.

Compare Sensitive Text Privately

A contract, a log with real data or an internal draft should not go to a server to be compared. The online text 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 Online in Three Steps

1

Paste or Add Both Versions

Paste the original into the Original panel and the changed text into the Modified panel. Select Upload on either panel to add a .txt, .md, .json, .csv, .log, .xml, .html, .css, .js, .jsx, .ts or .tsx file instead.

A / B DIFF options
2

Set the Options

Select Ignore whitespace to skip spacing differences. Case sensitive is on by default, so clear it to treat Hello and hello as the same line. Select Swap to flip the two panels at any time.

result
3

Compare and Check the Rows

Select Compare in the online text diff. The Comparison result shows removed, added and changed counts above a side by side grid. Rose rows are removed, green rows are added and amber rows are changed. Edit either text and select Compare again, or select Clear to start over.

Marked rows Added, removed, changed
Two options Whitespace and case
One pair Two texts per run
Need it faster?

Desktop Text Diff for Large Files and Folders

The online text diff compares one pair of texts per run. A folder or a huge file fits git diff or a merge tool better.

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

What the Online Text Diff Does

A text diff finds the lines that differ between two versions. The online text diff shows them as aligned rows.

Line by Line Rows

The online text diff compares both texts one line at a time. Every row pairs a line from Original with a line from Modified, so a changed line sits across from its new version. A changed line is marked in full, with no word marks inside it.

Side by Side Result

The result is a two column grid headed ORIGINAL and MODIFIED, with row numbers beside both. Removed lines carry a minus on a rose row, added lines carry a plus on a green row and changed lines pair a minus with a plus on an amber row.

Two Options for Less Noise

Ignore whitespace strips all spaces and tabs from a line before the compare, so a reformat does not drown the real edits. Case sensitive is on by default, and clearing it treats upper and lower case alike. CRLF and LF line breaks never count as a change.

Counts, Swap and Clear

A header shows how many lines are removed, added and changed. Select Swap to flip the two panels, which turns additions into removals, and select Clear to empty both. A match message appears when nothing differs.

To diff text, to compare two files and to check what changed all name one task. A search for text diff or compare text online lands on the online text diff above, and both versions are left as they are.

Reference

Online Text Diff Results, Case by Case

A diff finds the smallest set of line changes between two texts. The cases below show what the tool marks and where results can surprise.

The caseResultWhat happens and why
Matching lineno markA line that matches on both sides shows plain, with no color.
Changed lineamber rowA line that differs in place shows as one row with a minus on the left and a plus on the right.
Added linegreen rowA line found only in Modified shows on the right with a plus and an empty left side.
Removed linerose rowA line found only in Original shows on the left with a minus and an empty right side.
Edited blocksplit rowsA run of edited lines often shows as removed rows, then added rows, with only the last pair merged into one amber row.
Countsthree totalsRemoved counts lines gone or edited in Original. Added counts new or edited lines in Modified. A changed row counts in both.
Ignore whitespaceoff by defaultStrips all spaces and tabs from a line before the compare, so a b and ab count as equal.
Case sensitiveon by defaultClear it to treat Hello and hello as the same line.
Line endingsCRLF = LFWindows and Unix line breaks count as the same break. For why they differ, see CRLF vs LF and the two bytes that break things.
Word marksnot shownA changed line is marked in full. The online text diff does not highlight words or characters inside it.
Unified viewnot on this pageThere is no unified view and no patch export. Run git diff or diff -u for a patch file.
JSON key orderplain linesTwo JSON blocks compare as lines, so a reordered key shows as a change. Format both the same way first.
Source file.txt .md .json .csv .logSelect Upload on either panel to add a file. Code files like .js, .ts and .css work too.
Big inputcheck itThe compare table grows with both line counts, so a huge pair can slow the tab. Use git diff for those.
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 line insertions and deletions that turn one version into the other. At its heart is the longest common subsequence, the longest run of lines the two texts share. Everything outside that run is what changed. The online text diff builds that table in the browser and walks it to pair every line. A removed line sitting next to an added line is merged into one changed row. Ignore whitespace and Case sensitive reshape every line before the compare, and CRLF and LF breaks are normalized first. Two honest limits sit alongside this. The compare is line level, so a changed line is marked in full, and there is no unified view or patch export. The references below define the method.

Honest comparison

Online Text Diff 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 Online text diff 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 an entire folder Two texts at a time Entire 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 folder of changes or a three-way merge with editing, the work of a review across a codebase. The online text diff wins for a quick two-text compare that opens with no install. Online file tools and whether yours uploads goes deeper on where a pasted text goes.

Why no upload

Online Text Diff Privacy and Data Handling

Both versions are compared inside the browser, 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

Online Text Diff Alternatives

All of these compare two texts. They vary in effort, in cost and in setup.

git diff

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

A Merge App

Meld or Beyond Compare diff files, folders and three versions.
They edit and merge, not only compare.
Limit: Desktop apps that need an install.

An Editor

VS Code compares two open files with a built-in diff view.
It fits alongside the rest of an edit.
Limit: Needs both files opened in the editor.

diff on the Command Line

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

git diff, a merge app and diff -u all compare text, yet every one needs a repo, an install or the terminal. The online text diff above compares a paste or two files side by side with nothing to set up.

Before comparing

Three Things to Know Before Using an Online Text Diff

Keep these in mind for a cleaner result.

Match the Options to the Text

In the online text diff, Ignore whitespace suits code that was reformatted, since indent and spacing changes stop showing as edits. Leave it off for Python or YAML, where spacing is part of the meaning.

Mind Case and Line Endings

Case sensitive is on, so Name and name differ until the option is cleared. CRLF and LF breaks never show as changes, so a file saved on Windows compares clean against the same file saved on Unix.

Expect Line Level Marks

A one word edit in a long line marks the entire line in the online text diff. To spot the word, look across the two sides of the amber row, or break the long line into shorter ones before the compare.

The desktop edition

Desktop Text Diff for a Full Codebase

The online text diff compares two texts in memory, which suits an everyday check. A folder of changed files, a three-way merge or a review across a codebase belongs on git or a desktop merge tool, which work from disk and diff the entire tree.

In a browser tabtwo texts at a time
On the desktopan entire 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 every 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

Online Text Diff Questions

Paste your original into the Original panel and your changed text into the Modified panel, then select Compare. The Comparison result lists every line as a row, with removed, added and changed counts above it. Edit either text and the result hides until you select Compare again. To test a pattern against the same lines, use the online regex tester.
Paste or upload both versions, set Ignore whitespace and Case sensitive if you need them, then select Compare. Select Swap if you pasted the texts in the wrong order, and select Clear to empty both panels and start over.
No. The comparison runs 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.
The online text diff has two. Ignore whitespace is off by default and strips all spaces and tabs from a line before the compare. Case sensitive is on by default, so clear it if you want Hello and hello to match. There is no word mode, character mode or blank line option.
No. It compares line by line, and a line that differs is marked in full. If one word changed in a long line, look across the amber row to find it, or break your long line into shorter ones before you compare.
Side by side only in the online text diff. The result is a two column grid with ORIGINAL and MODIFIED headings, row numbers and a plus or minus mark on every changed side. There is no unified view, so use git diff or diff -u when you need one.
Not on this page. The online text diff has no export or copy button for the result. Copy the rows you need from the screen, or run git diff or diff -u when you need a patch file for a ticket or a pull request.
Not always. It pairs lines with a longest common subsequence table and merges a removed line next to an added line into one changed row, while git groups changes into hunks with context. For plain text you will often see the same lines flagged, but check a critical change in git.
Yes. Select Upload on the Original panel and again on the Modified panel of the online text diff. It accepts .txt, .md, .json, .csv, .log, .xml, .html, .css, .js, .jsx, .ts or .tsx files, and the text lands in the panel so you can edit it before you select Compare. To turn a CSV export into JSON first, use the online CSV to JSON converter.
As plain lines. A reordered key or a changed indent shows as a difference, since there is no JSON mode. Format both blocks the same way first with the online JSON formatter, then compare them.
Removed counts lines from Original that are gone or edited. Added counts lines in Modified that are new or edited. Changed counts rows where a removed line sits right beside an added one, and those lines also count as removed and added. A block of edited lines shows as removed rows then added rows, with only the last pair merged into one amber row.
Yes. In the online text diff, Original is the left side and Modified is the right side, so a line only on the right shows as added and a line only on the left shows as removed. Select Swap to flip the panels, which turns every addition into a removal.
The online text diff turns Windows and Unix line breaks into the same break before it compares, so a file saved on Windows and the same file saved on Unix compare clean. For why the two differ, see CRLF vs LF and the two bytes that break things.
A page or a moderate file compares quickly in the online text diff. The compare table grows with the line count of both texts, so a huge pair can slow your browser tab. For huge files or a folder of changes, use git diff or a desktop merge tool, which work from disk.
No. Track changes lives inside one document with revision marks. The online text diff compares any two separate texts, including code, a log, JSON or two pasted drafts, and neither document holds the marks.
Text saved in the wrong encoding can arrive broken, so the same file looks different on two machines. Fix the encoding first, then compare. Character encoding explained and why text arrives broken explains why it happens. If the text came as Base64, decode it with the online Base64 encoder, and to check two files byte for byte, use the online hash generator.
Yes. It runs in a mobile browser as well as on a desktop, so two texts pasted on your phone compare without an app. Both versions stay 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 October 2026
13
Years on dev tools
0
Texts uploaded
2
Diff options
0
Watermarks

The single most useful thing to know about a diff is the level it works at. The online text diff works line by line. It builds a table of the lines both texts share, then marks everything outside that run as removed, added or changed. A one word edit in a long line marks the entire line, and a block of edited lines can show as removed rows followed by added rows, so the amber rows are not a count of edits. Two options clear away noise. Ignore whitespace strips all spaces and tabs from a line, and Case sensitive can be switched off. Line endings never count, so CRLF and LF compare clean. There is no word mode, no unified view and no patch export, and a huge pair can slow the tab. For those jobs git diff or a desktop merge tool is the better fit. Since the two texts are often a contract or an internal draft, the online text diff runs in the browser and sends nothing to a server.

Standards followed

Diff · Line level Options · Whitespace, case LCS · Algorithm Layout · Side by side
Built on the same shared design system as every OnlinePCApps tool. onlinepcapps.com

Compare Two Texts Online for Free

No sign-up needed and no upload. Paste two texts into the online text diff, then select Compare.

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