About this tool
What is a text diff?
A diff compares two versions of a text and reports exactly what changed: which lines were added, which were removed, and which stayed the same. It is the mechanism behind every code review, every 'track changes' view, and every version-control history you have ever scrolled through.
Under the hood, a good diff does not simply compare line 1 to line 1. It solves the longest common subsequence problem — finding the largest set of lines that appear in the same order in both versions — and treats everything outside that set as an insertion or a deletion. That is why inserting a paragraph at the top does not mark the entire rest of the document as changed.
Why compare text side by side?
Eyeballing two documents is unreliable: the human eye is very good at reading and very bad at spotting a single altered digit. A diff turns that into a mechanical check.
- Contracts and legal drafts — find the clause the other side quietly edited.
- Code and configuration — see what changed between two versions of a file before deploying.
- Content editing — compare a draft with a copy-edited version and review every change.
- Data and logs — spot the one differing row in two exported lists.
- Translations and manuscripts — track revisions across drafts without version control.
Side-by-side vs unified view
The side-by-side view places version A on the left and version B on the right with aligned rows, so a removed line on the left sits opposite a blank on the right. It is the easiest way to read substantive edits in prose because you keep the full context of both versions.
The unified view is the patch-style format familiar from git: one column, with removed lines prefixed by a minus and added lines by a plus. It is compact, easy to paste into a ticket or an email, and it is the format tools expect. The Nesake Text Diff offers both, and the unified output can be copied to the clipboard in one click.
Ignore options and what they are for
Real-world comparisons are noisy. Two files may be functionally identical but differ in trailing spaces, indentation or letter case, and a strict diff would flag every one of those lines. The ignore-whitespace option trims each line before comparing, so re-indentation and stray tabs stop drowning out real edits. The ignore-case option treats 'Total' and 'total' as identical, which is useful for prose and for case-insensitive data.
Use them deliberately. When you are reviewing code where indentation is significant — Python, YAML, Markdown — leave whitespace comparison on, because a changed indent is a real change. Swapping A and B is also worth knowing about: reversing the inputs turns 'deleted' into 'added' and can make an edit much easier to read.
Supported input and privacy
Paste text directly, or load local files — .txt, .md, .csv, .json, .js, .ts, .html, .css, .xml, .yml, .log and any other plain-text format. There is no length limit beyond your browser's memory, and comparisons of several thousand lines are effectively instant.
Nothing is uploaded. The comparison runs entirely in your browser, which means you can safely diff contracts, credentials, patient data or unreleased source code without it touching a network. Close the tab and the content is gone.
Tips for best results
- 01Normalise line endings before comparing files that came from both Windows and macOS to avoid every line showing as changed.
- 02Turn on ignore-whitespace when reviewing reformatted text, and turn it off for indentation-sensitive formats like YAML or Python.
- 03Compare the smallest meaningful unit — a single section rather than a whole document — when a change list gets overwhelming.
- 04Use the unified view when you need to paste the result into an email, a ticket or a commit message.
- 05Swap A and B if the direction of the change reads backwards to you.
- 06For prose, split long paragraphs onto separate lines first; line-level diffs are far more readable that way.
- 07Keep both original files — the diff shows what changed but is not a substitute for a backup.
Frequently asked questions
Is my text uploaded anywhere?+
No. The comparison runs entirely in your browser, so confidential documents and source code never leave your device.
What file types can I load?+
Any plain-text file — .txt, .md, .csv, .json, .js, .ts, .html, .css, .xml, .yml, .log and more.
How large a file can it handle?+
There is no fixed limit; several thousand lines compare instantly. Very large files are bounded only by your device's memory.
Does it compare word by word or line by line?+
Comparison is line-level using a longest-common-subsequence algorithm, which keeps unchanged blocks aligned instead of flagging everything after an insertion.
What do the ignore options do?+
Ignore-case treats differing capitalisation as identical; ignore-whitespace trims each line so re-indentation and trailing spaces are not reported as changes.
Can I export the result?+
Yes — the unified patch view can be copied to your clipboard in one click.
Can it compare PDF or Word files?+
Not directly. Copy the text out first, or use Marginal to open the document and extract its text.