Text, code and data side by side, with merges and an AI explanation
Comparing two lists?Compare Two Lists shows what is only in one, only in the other and in both, whatever the order, with the repeats in each.
In a terminal
diff -u old.txt new.txt
The unified format that patch tools and code review read, built into macOS and Linux. -w ignores whitespace and -i ignores letter case, for the whole file at once.
git diff --no-index --word-diff old.txt new.txt
Marks the changed words inside each line as [-old-]{+new+}, for any two files, inside a repository or not. On this page's sample it prints "owner": "Rahul {+K.+} Sharma",.
What the page does that these do not
Neither labels a change: on this page's sample diff -u shows the comma added after "upiIntent": true and the new updatedAt timestamp as edits like any other, where the page marks them formatting only and noise and leaves five meaningful changes.
What the terminal does better
Both fit in a script or a CI job: diff exits with 0 when the files match and 1 when they differ, so a build step can fail on a change nobody expected.
Text Compare and other online diff tools
We compared the same harmless samples in each tool and recorded what the page sent while it compared. Features, AI and prices come from each product's own pages.
What Text Compare and five other online diff tools do, checked on 30 September 2026
1.Diffchecker: after a comparison the page title becomes the first words of each side, and in our check that title was sent to Google Analytics.
2.text-compare.com says on its own page that the text is sent to its server for comparison and is not stored. In our check both texts left the browser when we pressed Compare.
3.textcompare.org compares in the browser, but in our check the page's Yandex Metrica session recording sent the pasted text to mc.yandex.ru.
4.Revquix: an AI explanation is optional. Up to 4,000 characters of changes are free 3 times a day, or 15 times signed in. Past that, and for larger explanations, it costs 1 to 4 credits with sign-in, and the price shows before you press the button.
Checked . Products change: if a row is out of date, tell us and we will check it again.
How this works
About Text Compare
Compare text, code and data side by side. Cosmetic changes are labelled and dimmed, JSON and YAML can be compared as data, and every change can be copied across with undo. The comparison runs in your browser.
Takes
Two texts, files, code or data - JSON, YAML, XML, CSV and more
Returns
Every change, labelled: meaningful, cosmetic, moved, renamed or noise
Handles
Merges in either direction with undo, and an optional AI explanation
Privacy
Compared on this device. Nothing is sent unless you press Explain
Nothing you type leaves this page
The comparison runs entirely in your browser: nothing is uploaded to compare and no account is needed. The one exception is opt-in and visible. If you press Explain with AI, only the changes you ticked are sent, with secrets, email addresses and phone numbers masked first, and the page shows you the exact text before it goes. The explanation keeps change numbers and its own wording, not your text.
Credits are a licence to use these tools - not money, not transferable. Full detail in our privacy policy and AI policy.
How to compare two texts
Paste the original on the left and the changed version on the right, or drop a file on either side. The comparison starts as you type. Once both sides have text the inputs shrink to one line each, so the result takes the page; press Edit to open them again.
Side by side or unified, with the changed characters marked inside each line
N and P, or F7, move between changes; Alt and an arrow copies the current one across
Unchanged stretches fold away, and open again with one click
Every change gets a label
Before anything is highlighted, each change is classified. Whitespace, letter case, invisible characters such as a no-break space, and formatting-only edits are marked cosmetic and dimmed. Timestamps, UUIDs, hashes and request IDs that differ on every run are marked as noise and counted apart. Blocks that moved are linked to where they came from, and the same identifier renamed in many places becomes one row.
The rules respect the language. Indentation is meaningful in Python and YAML, and letter case is meaningful in code and data, so neither is ever dismissed there as cosmetic.
Options you can change
The Ignore menu decides what counts: whitespace (trailing, leading and trailing, or all), letter case, blank lines, line endings, line order, each kind of noise separately, or a pattern of your own as a regular expression. Format both sides re-indents code or data first, so a file that was only reformatted stops looking rewritten.
Data compared as data
When both sides are JSON, YAML, XML or CSV, the tool offers to compare them as data instead of line by line. Key order, spacing and trailing commas stop counting, array items are matched by an id field when one exists, and each change is shown with its path and its before and after values. The whole difference can be copied as a JSON Patch.
Where it helps
Two drafts of a resume, to see exactly which lines changed. A staging and a production API response, or two Spring profiles, to find the one setting that differs. Two .env files, to spot a key that went missing.
Configuration files hold secrets. Comparing them here is safe because nothing leaves your browser. If you press Explain, keys, tokens and passwords are masked before anything is sent, but the surest choice is to leave those lines unticked.
Explain with AI, on your terms
The AI explains the changes; it does not find them. It receives only the meaningful changes you tick, with secrets, email addresses and phone numbers masked, and you can read the exact text before it is sent. Every claim it makes must cite a change that exists, or it is dropped. Small explanations are free each day, larger ones cost one or two credits, and the price is shown before you press the button.
What it will not do
It will not decide which version is right, and it does not understand a program the way a compiler does: formatting-only is judged on tokens, not on behaviour. Each side can be up to 5 MB, and an AI explanation covers up to 60,000 characters of changes. In our tests, two 1 MB files with about 300 differences compared in under a second on a laptop. When a comparison would take too long, the tool says so and shows an approximate result rather than freezing the page.
FAQ
Questions people actually ask
The ones that come up before somebody pastes anything in.
Is my text uploaded to compare it?
No. Both sides stay in your browser and the comparison runs there, in a background worker. Nothing leaves the page unless you press Explain with AI, and even then only the changes you tick are sent, after you have seen them.
Why are some changes greyed out?
Those are cosmetic or noise: whitespace, letter case, invisible characters, formatting only, or values like timestamps that change on every run. They stay visible so nothing is hidden from you, and one toggle hides them when you only want the changes that matter.
Can it compare JSON regardless of key order?
Yes. When both sides are valid JSON the tool offers to compare them as data. Key order and formatting then stop counting as changes, arrays are matched by an id field where one exists, and every difference is listed by its path.
Can I copy changes from one side to the other?
Yes. Each change has arrows to copy it left or right, you can tick individual lines to copy only those, and Alt keeps both versions instead of replacing. Every merge can be undone, and the edited side can be copied or downloaded.
What does the AI explanation cost?
Small explanations are free each day, with more free ones when you are signed in. Larger selections cost one or two credits. The price is shown before you press the button, you are never charged more than that, and a failed explanation costs nothing.
How large can the two sides be?
Up to 5 MB each, read in your browser. In our tests, two 1 MB files with about 300 differences compared in under a second on a laptop. Very large or very different inputs may be shown as an approximate alignment, which the page labels clearly, rather than locking up the tab while it searches for a perfect one.
Seeing what changed is not the same as knowing whether it should have
A tool can show you three lines moved. It cannot tell you the abstraction is wrong, that the test proves nothing, or that this is the fourth patch on a design that needs replacing. That is a conversation with someone senior enough to say so.