Compare two texts line by line. See added (green), removed (red), and modified (yellow) lines with live counts. Swap or clear inputs instantly. All processing is local.
Paste two texts into the left and right panels, then click Compare. The tool splits both inputs on newlines and walks them line by line. Added lines (present only on the right) are green; removed lines (present only on the left) are red; lines that differ at the same position are marked modified in yellow; unchanged lines have no highlight. A stats bar at the top shows totals for each category so you can gauge change scope at a glance.
Compare code snippets, config files, or documents before and after changes. Useful for code reviews, debugging, and document versioning. All comparison runs in your browser — nothing is uploaded.
A browser-based line diff is fast and private, but it is not the right tool for every job. Reach for something else when:
jd, jsondiffpatch, or git diff --word-diff with a structured differ instead.diff, git diff, or a desktop tool like Meld or Beyond Compare.git mergetool, KDiff3, or Meld.compare, diff-pdf, or a binary-aware tool..env, nginx.conf, or docker-compose.yml files between environments.Yes. The entire comparison runs client-side in your browser using JavaScript. No text is sent to any server, stored, or logged. You can verify this by disconnecting from the internet and running a comparison — it still works.
A line diff (what this tool uses) compares entire lines and marks each one as added, removed, modified, or unchanged. A word diff goes further and highlights individual changed words within a modified line. Line diffs are faster to scan for structural changes; word diffs are better for copy-editing. This tool focuses on line-level diffing for speed and clarity.
Performance depends on your device. For most modern machines, comparing files up to 10,000 lines is nearly instant. For 50,000+ lines, consider splitting them into sections or using a dedicated CLI tool like `diff`, `git diff`, or Meld.
Yes. The tool is format-agnostic — it diffs any text split on newlines. It works well for source code, config files (YAML, JSON, TOML, .env), SQL migrations, API payloads, and prose documents. For binary files or images, use a specialized diff tool.
Not directly. A text diff compares literal lines, so JSON vs YAML always shows every line as different even if the data is identical. Convert both sides to the same format first — use our JSON Formatter or YAML to JSON Converter — then diff.
When a pair of lines at the same position differs only slightly, the tool flags them as modified (yellow) instead of two separate events. This reduces visual noise for small edits. Large restructurings still appear as full add/remove pairs.