Paste two versions of a document, a config file, or a code snippet and see a line-by-line diff with additions and removals highlighted.
How to use this tool
- Paste the original into the left box and the changed version into the right.
- Added lines appear green, removed lines red, unchanged lines grey.
- Toggle Only show changes when the documents are long and mostly identical.
Options
- Ignore case — treats
Helloandhelloas unchanged, useful when comparing text that has been through a case-normalising system. - Ignore whitespace — collapses runs of spaces and trims each line, so re-indentation does not drown the real changes.
- Only show changes — hides matching lines entirely.
Both ignore options affect comparison only. The lines shown are always your original text, so you can copy them back out unmodified.
How it works
The comparison uses the classic longest common subsequence algorithm — the same idea behind diff and git diff. It finds the largest set of lines that appear in both versions in the same order, then marks everything else as added or removed. That is why it correctly handles a block being inserted in the middle rather than reporting everything after it as changed.
Tips
- For prose, ignoring whitespace usually gives a cleaner result, since editors reflow paragraphs.
- For code, leave whitespace comparison on if indentation is meaningful (Python, YAML).
- A moved block shows as one removal plus one addition. That is expected — line diffs do not track moves.
Related tools
- Line sorter & deduplicator — normalise both sides before comparing
- Word counter — measure how much each version grew
- JSON formatter — pretty-print both sides so the diff is meaningful
- Case converter — normalise case permanently
FAQ
Is my text sent to a server?
No. The diff is computed in your browser.
Is there a size limit?
The first 1,500 lines of each side are compared, which keeps the page responsive. Longer files are truncated with a notice — use a desktop diff tool for anything larger.
Can it show character-level changes within a line?
Not currently. A modified line shows as one removal and one addition, which is how most line-based diff tools behave.
Why do two identical-looking lines show as different?
Usually trailing whitespace or a different line-ending style. Turn on Ignore whitespace to confirm.
Can I compare two files?
Open each file, copy its contents, and paste. The tool works on text, not file uploads.
More text tools
- Case ConverterConvert text to UPPERCASE, lowercase, Title Case, camelCase, snake_case, kebab-case, CONSTANT_CASE and more. Instant and private.
- Line Sorter & Duplicate RemoverSort lines alphabetically or by length, remove duplicates, trim spaces and drop blank lines. Perfect for keyword lists, emails and CSV columns.
- Lorem Ipsum GeneratorGenerate placeholder text by paragraph, sentence or word count for mockups and layout tests. Copy in one click.
- URL Slug GeneratorTurn titles into clean, SEO-friendly URL slugs. Handles accents, punctuation, stop words and length limits, and converts a whole list at once.