Skip to main content

Text Diff / Comparator Online Free — PrivaTools

TL;DR: Paste two pieces of text and see a line-by-line diff with additions in green and deletions in red — pure browser.

Compare text online for free — paste two versions of text or code and get a line-by-line diff with additions in green and deletions in red. Perfect for code review.

Like the rest of the 179-tool PrivaTools suite, Text Diff / Comparator is MIT-licensed and self-hostable. The public demo deletes your file as soon as the response leaves the server — verifiable in the open-source codebase on GitHub.

How to Use Text Diff / Comparator

  1. Enter the two texts — Paste the original text on the left and the modified text on the right, or upload two text files.
  2. View the diff — Differences are highlighted inline: green for additions, red for deletions, and yellow for modifications.
  3. Choose diff mode — Switch between side-by-side and unified views. Line numbers help locate changes in large documents.
  4. Copy or download the diff — Copy the highlighted diff to your clipboard or download it as an HTML file for sharing.

Frequently Asked Questions

What diff algorithm is used?

The tool uses a line-by-line diff algorithm similar to Unix diff, highlighting additions, deletions, and modifications with color coding.

Can I compare files directly?

Yes. Upload two text files instead of pasting. Supported formats include .txt, .csv, .json, .xml, .html, .css, .js, .py, and other plain-text formats.

Is there a file size limit for comparison?

Each file can be up to 500 MB. Very large files may take a few seconds to process the diff.

Can I compare code files?

Yes. The diff viewer works with any plain-text format. It highlights changes line by line, making it useful for comparing code, configs, or data files.

Last reviewed 2026-05-01 by the PrivaTools maintainers. Source code on (MIT-licensed, self-hostable).

Related Tools

Working with PDFs too? Try our Merge PDF, Compress PDF, PDF to Word, or all 175+ tools.