Text Compare
Compare two texts and see every added, removed and changed line highlighted.
0 lines
0 lines
About Text Compare
Spotting what changed between two versions of a document by reading them side by side is slow and unreliable — the eye skips over a single altered word or a line that moved. A diff does the comparison mechanically and shows only what actually differs.
This tool aligns the two texts, marks each line as added, removed, changed or unchanged, and highlights the individual words that differ within a changed line. Case, whitespace and blank lines can each be ignored, and the result can be copied or downloaded as a standard unified diff.
How Text Compare works in your browser
The comparison uses Myers’ O(ND) difference algorithm — the same approach underneath git diff. It finds the shortest edit script that turns the left text into the right one, which is why it aligns matching blocks correctly instead of declaring everything after a single inserted line to be different.
Identical prefixes and suffixes are trimmed before the algorithm runs, so comparing two large documents that differ in the middle is fast. Within a changed line, a second word-level pass highlights the specific words that moved, unless the line has changed so completely that highlighting every word would add nothing.
The ignore options change equality without rewriting inputs. For example, compare “Status: Open” with “Status: Closed” to isolate a changed word. Disable ignore-case and whitespace options when auditing configuration or code, where those changes can matter. This is a textual diff, not a semantic comparison: equivalent JSON with different key order can still differ.
When to use it
- Finding what changed between two versions of a config file or a contract.
- Checking whether a copied block of code differs from the original in any way beyond formatting.
- Diffing two API responses to isolate the field that changed.
- Comparing documents under NDA, where a hosted diff tool would mean uploading both versions.
Frequently asked questions
What counts as a changed line?
When a removed line and an added line line up, they are shown as one changed row with the differing words highlighted, rather than as two unrelated edits.
Can it handle large files?
Yes. The comparison uses an algorithm whose cost scales with the number of differences, so two nearly identical files of several thousand lines compare in milliseconds.
Is my text uploaded anywhere?
No. The comparison runs entirely in your browser, which is what makes it safe to paste a contract, a config file or production logs into it.