Download the result as a standard .diff file.
Paste two versions of a text and see every difference marked. Compare code, contracts, essays or data in your browser, free and private.
What this tool does
The diff checker lines up two versions of a text and marks every difference. It works line by line, like the tools programmers use, and then highlights the exact words that changed inside each changed line, so a single edited number in a long contract stands out.
How to compare two texts
- Paste the older text into Original, or press Open file to load it.
- Paste the newer text into Changed, or open a file.
- Press Compare, then read the Differences.
- Switch between Side by side and Unified layouts.
- Use Swap sides if you put them the wrong way round, and Download .diff to save the result.
Try an example loads two short texts so you can see how it looks.
Code, documents and data
Compare source code, JSON, CSV, config files, essays, contracts or any plain text. Open files straight from your computer, up to several megabytes each. Download the result as a standard unified .diff file that git and code review tools understand.
Tips for a clear comparison
- Put the older version in Original, so additions and removals read the right way.
- Make sure both versions use the same line endings and spacing, or many lines may look changed.
- For long documents, compare one section at a time.
- Use side by side for reading, and the unified view when you plan to share the .diff file.
- To tidy code first so only real changes show, try the code formatter.
Common uses
- Checking what changed between two drafts of an essay or report.
- Spotting small changes to prices or dates in a contract revision.
- Comparing two config files or exported data sets.
- Reviewing a code change before sharing it.
Privacy
Both texts are compared inside your browser. Nothing is uploaded, which makes it safe for private documents and unreleased code.
Questions
Can it compare Word or PDF files?
It compares text. To compare documents, convert them first with PDF to text or Word to Markdown, then paste both here. For two PDFs, compare PDF does it directly.
Why does a moved paragraph show as removed and added?
A diff shows the smallest set of line changes. A paragraph moved to a new place counts as removed in one spot and added in another.
What is a unified diff?
It is a standard text format that lists changed lines with plus and minus signs. Git and many review tools use it.