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
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.
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.
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 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.
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.
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.
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.
A text diff finds the lines that differ between two versions. The online text diff shows them as aligned 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.
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.
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.
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.
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 case | Result | What happens and why |
|---|---|---|
| Matching line | no mark | A line that matches on both sides shows plain, with no color. |
| Changed line | amber row | A line that differs in place shows as one row with a minus on the left and a plus on the right. |
| Added line | green row | A line found only in Modified shows on the right with a plus and an empty left side. |
| Removed line | rose row | A line found only in Original shows on the left with a minus and an empty right side. |
| Edited block | split rows | A run of edited lines often shows as removed rows, then added rows, with only the last pair merged into one amber row. |
| Counts | three totals | Removed counts lines gone or edited in Original. Added counts new or edited lines in Modified. A changed row counts in both. |
| Ignore whitespace | off by default | Strips all spaces and tabs from a line before the compare, so a b and ab count as equal. |
| Case sensitive | on by default | Clear it to treat Hello and hello as the same line. |
| Line endings | CRLF = LF | Windows 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 marks | not shown | A changed line is marked in full. The online text diff does not highlight words or characters inside it. |
| Unified view | not on this page | There is no unified view and no patch export. Run git diff or diff -u for a patch file. |
| JSON key order | plain lines | Two 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 .log | Select Upload on either panel to add a file. Code files like .js, .ts and .css work too. |
| Big input | check it | The compare table grows with both line counts, so a huge pair can slow the tab. Use git diff for those. |
| 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 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.
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.
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.
All of these compare two texts. They vary in effort, in cost and in setup.
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.
Keep these in mind for a cleaner result.
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.
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.
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 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.
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 every 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.
No sign-up needed and no upload. Paste two texts into the online text diff, then select Compare.