Diff Checker Online
Check the differences between two pieces of text in a unified, git-style diff view. Added lines are marked with +, removed lines with −, and unchanged context lines surround each change. All processing runs in your browser.
How it works
Both inputs, typed or loaded from text files of up to 10 MB, are handed to a Web Worker running in this tab. It normalises line endings, splits each text into lines and finds the longest common subsequence (LCS) of the changed region, so every line is classed as added (+), removed (−) or unchanged. The result is drawn as a single git-style column with line numbers from both versions, three lines of context around each change and folded unchanged stretches.
Processing runs in your browser
All diffing is done locally using browser APIs. Our servers are not involved at any point.
Frequently asked questions
- What is a unified diff?
- A unified diff shows both versions interleaved with + and − markers for added and removed lines. It is the format used by git, patches, and most code review tools.
- Can I check the differences between two files?
- Yes. Use the upload buttons to load two files, or paste the contents into the input fields. The diff appears immediately.
- Does it highlight changes within a line?
- The unified view marks whole lines as added or removed. For word-level highlighting inside changed lines, use the side-by-side or word-diff views.
- Which files can I load?
- Plain-text files up to 10 MB, such as .txt, .md, .json, .js, .ts, .css, .html, .xml, .yml, .yaml and .csv. Each file is read as text in your browser; binary formats such as .docx or .pdf are not supported.
Related operations
For making the same change everywhere in one file, try find and replace. To put both inputs in matching order before comparing, use sort lines. For diffing two JSON payloads after pretty-printing, see the JSON formatter.
Last reviewed September 30, 2026
Other pages for this tool
Related tools
- Background reading: Complete guide to text tools