How to Compare Two Texts
Reading two versions of a document side by side and spotting the differences yourself is slow and unreliable — the eye skims over a changed word or a missing line without registering it. A diff does the comparison properly, and a good one tells you not just which lines changed but what changed within them. Paste two versions, press Compare, and every insertion, deletion and edit is marked.
Add both versions
Paste them, or load a file into either side. Name each side so the output labels make sense.
Set what should count
Ignore case or whitespace if those differences are noise, and keep word-level highlighting on for readable edits.
Read the result
Side-by-side for review, unified for pasting into a ticket. Download it as a .diff patch if you need one.
Why a Naive Comparison Is Useless
Compare two documents line by line in order — line one against line one, line two against line two — and insert a single new line near the top. Everything below it now sits one position out, so every remaining line is reported as changed. The output is technically correct and completely useless.
The fix is to find the longest common subsequence first: the longest run of lines that appear in both versions in the same order, even with other lines interspersed. Everything in that sequence is unchanged; everything else is an insertion or a deletion. That is how git and every serious diff tool works, and it is what isolates a change to where it actually happened.
Then there is the difference between a line changed and what changed in it. When a deletion is immediately followed by an insertion, this tool runs a second diff over the words within those two lines and highlights only the parts that differ. Correcting one word in a long paragraph shows as one highlighted word, not an entire replaced block — which is the difference between a diff you can read and one you have to decode.
Common Situations This Tool Solves
Reviewing edits to a document
Someone returns a contract or an article with changes and no track-changes record. Diffing the two versions shows exactly what they touched.
Finding what broke in a config file
A working config and a broken one, side by side, usually reveals the problem in seconds - often a single changed value.
Comparing API responses
Two JSON responses that should match but do not. Format both first, then diff, and the differing field stands out immediately.
Checking for plagiarism or duplication
The similarity percentage gives a quick numeric answer to how much of two texts genuinely overlaps.
Frequently Asked Questions
How do I compare two texts online for free?
Paste both versions, press Compare, and every difference is highlighted. Free, no signup, and nothing is uploaded.
Is my text uploaded to a server?
No. The comparison runs entirely inside your browser, which matters when diffing contracts, config files or private documents.
What does word-level highlighting do?
When a line has been edited rather than replaced, it highlights only the words that changed instead of marking the whole line.
What is the difference between side-by-side and unified?
Side-by-side shows both versions in parallel columns, which is easier to review. Unified is the compact format git uses and is better for pasting into a ticket.
When should I ignore whitespace?
When comparing code or data where indentation changed but the content did not. It stops reformatting from drowning out real differences.
What does the similarity percentage mean?
The proportion of lines that are unchanged. A useful quick measure of how much two documents overlap.
Can I download the result?
Yes, as a standard unified .diff file, which patch tools and code review systems understand.
Is there a size limit?
Files above 5 MB are rejected because the comparison becomes slow in a browser. For very large files, a command-line diff is better suited.
Does it work on code?
Yes. Any plain text works - code, config, JSON, CSV or prose. For JSON, formatting both sides first makes the diff far more readable.
Why does my diff show everything as changed?
Usually different line endings between the two sources. Turn on Ignore whitespace and the real differences appear.
Can I compare two files rather than pasted text?
Yes. Use the Load file button on either side, and the filename becomes the label in the output.
Is this diff checker really free?
Completely free, with no limits, no signup and no premium wall. Everything runs in your browser.
Last updated: July 21, 2026 · FlipMyFormat Diff Checker
Written and maintained by the FlipMyFormat team
