Text compare (diff checker)
Paste or open two texts to see what changed, side by side or inline, with the changed words marked. Neither text is uploaded or saved.
- Runs in your browser
- Nothing is uploaded
- Free, no sign-up
Paste or open two texts to see what changed. Nothing you add leaves this page.
How it works
The page splits both texts into lines and finds the most lines they share in the same order, with the Myers diff algorithm that git and GNU diff also use. Lines found only in the original are shown as removed and lines found only in the changed text as added. Inside lines that changed, the same comparison runs again on words, or on single characters if you choose, to mark exactly what is different.
Side by side puts each changed line next to its new version; inline lists removed lines above the lines that replaced them, which fits a phone better. Long stretches of unchanged lines are folded away, keeping three lines around each change, and open with a tap. “Copy as unified diff” gives the changes in the format of diff -u and git, which patch can apply.
The comparison runs in a background worker inside this tab, so long files don't freeze the page. Neither text is saved or added to the page address, and spell checking is off in both boxes so the browser doesn't send what you paste off for checking.
Questions
How do I compare two texts for differences?
Paste the original text on the left and the changed version on the right, or open a file on each side. The differences show as you type: removed lines in red with a minus sign, added lines in green with a plus sign, and the words that changed inside a line marked more strongly.
Is it safe to paste confidential text into a diff checker?
Only into one that doesn't upload it. This page compares the texts in your browser: neither is sent to a server, saved, or put in the page address, and there is no share link that could leak. Closing or reloading the page clears both.
Can I compare two files, like code, JSON or CSV?
Yes. Open or drop a text file on each side: code, JSON, CSV, logs, config files or plain text, up to 5 million characters each. The comparison goes line by line, so put minified JSON on separate lines first, or it shows as one changed line. Word documents and PDFs aren't plain text and can't be opened.
What does ignoring whitespace do?
It treats a run of spaces and tabs as one space and ignores spaces at the start and end of lines, so re-indented lines and trailing spaces don't count as changes. Ignoring case makes “Hello” and “hello” the same. Windows line breaks (CR LF) and Mac or Linux ones (LF) always count as the same.
Limits
Each side can hold up to 5,000,000 characters and 200,000 lines. When two long texts are very different, the search for the fewest changes takes a shortcut once it gets costly, as GNU diff does, so the result can then list a few more changes than strictly needed.
Text that moved shows as removed in one place and added in another. Lines that share less than a third of their text are shown as wholly changed, without word marks, and a changed block of more than 200,000 words is marked by line only.
Files are read as UTF-8 text. Word documents, PDFs, images and other binary files can't be compared.
Privacy
This tool runs entirely in your browser. The files you open and what you type are never sent to a server, and nothing is stored after you close the page. See the privacy page.
Related tools
JWT decoder
Paste a JSON Web Token to read its header and claims, see when it expires and check its signature. The token never leaves your browser.
Unix timestamp converter
Turn a Unix timestamp into a date in your time zone, UTC and ISO 8601, or a date into a timestamp. Reads seconds or milliseconds, and makes Discord codes.
Cron expression explainer
Paste a cron expression like */15 9-17 * * MON-FRI to read it in plain English, check each field for mistakes and see the next run times in any time zone.