Text Comparer is a free online diff checker for seeing exactly what changed between two pieces of text. Paste or open two versions of a document, a configuration file or some code, and the differences are highlighted line by line, down to the words or characters that changed.
It is built for developers, writers, editors, students and anyone else who needs a quick, reliable answer to “what is different here?” without installing anything or creating an account. It has been running at text-comparer.com since 2024 and is maintained by an independent developer who reads every piece of feedback.
What you can do with it
- Compare in a side-by-side or unified view, with syntax highlighting for 29 languages and plain text.
- See the changed words, or individual characters, marked inside each edited line.
- Ignore whitespace, letter case or blank lines, sort lines before comparing, and choose how much unchanged context to keep.
- Open files up to 10 MB, or drop two files at once to fill both sides. Different line endings (CRLF and LF) are detected and never counted as changes.
- Save comparisons in your browser, back them up to a file, and restore them in another browser.
- Create a share link that expires after a day, a week, a month, a year or never, and revoke it whenever you like.
- Export the result as a
.diffpatch, a standalone HTML page, or a PDF.
How the comparison works
Both texts are split into lines, and the longest run of matching lines is found with the
diff-match-patch
algorithm, the same family of algorithm behind diff and git diff. Lines that
only exist on one side are marked as removed or added. When a line was edited rather than replaced,
a second pass compares its words, so a renamed variable or a reworded phrase is marked precisely.
Syntax colours come from highlight.js,
and the editors are CodeMirror.
Your text stays yours
All of this runs in your browser. The texts you compare are not sent to our server unless you create a share link or send feedback, and saved comparisons live only in your browser’s storage. Nothing replaces your text without asking: opening a sample, a saved comparison or a file over your work either asks first or offers an Undo. The privacy policy lists exactly what is stored when you do share.
Samples
Not sure where to start? Each sample opens the comparer with two versions already filled in, with tips for that kind of file: plain text, JSON, JavaScript, Python, SQL, YAML, XML, HTML, CSS and more.
Contact
Questions, ideas or a bug to report? Write to [email protected], or use Send feedback. Every message is read.