What is Text Diff Checker?
This diff checker compares two versions of a text and shows exactly what changed. Paste the original on the left and the modified version on the right: the result lines the two texts up side by side with line numbers, marks removed lines in red and added lines in green, and highlights the individual words that changed inside an edited line.
It uses the same kind of algorithm as git diff, so inserting or deleting a line near the top does not make every following line look different. That makes it a quick way to compare two config files, two API responses, two versions of a paragraph or two copies of a snippet without opening an IDE. Everything is compared in your browser, so private code and documents are never uploaded.
How to use Text Diff Checker
- Paste the original text into the Original box.
- Paste the changed text into the Modified box.
- Read the summary (lines added, removed and unchanged) and the side-by-side view: red lines were removed, green lines were added, and changed words are highlighted.
- Turn on Ignore whitespace or Ignore case to hide formatting-only changes, or Show all lines to expand the collapsed unchanged sections.
Key features
- Side-by-side view with added, removed and changed lines aligned
- Word-level highlighting inside changed lines
- Same minimal-diff algorithm as git diff (Myers)
- Ignore whitespace and ignore case options
- Unchanged sections collapsed to the context around each change
- Runs entirely in your browser for private code and documents
Common use cases
- Comparing two versions of a configuration or .env file
- Checking what changed between two API responses
- Reviewing edits to documentation, translations or legal text
- Spotting accidental whitespace or character changes in copied text
- Comparing generated output before and after a code change
Technical details & standards
Lines are compared with Myers' O(ND) difference algorithm, the default algorithm of git diff, which finds the smallest set of inserted and deleted lines that turns the original into the modified text. A deleted line next to an inserted one is shown as a changed line, and a second, word-level diff of that pair highlights exactly which words differ.
By default every character counts, including trailing spaces and tabs versus spaces. Ignore whitespace compares lines with leading and trailing space removed and runs of spaces collapsed, and Ignore case compares them case-insensitively; the original text is still displayed. Unchanged stretches are collapsed to three lines of context around each change, like a unified diff. CRLF and LF line endings count as the same line break, and the summary notes when only one text ends with a final line break.
Frequently asked questions
How does the diff checker compare the texts?
Line by line, using Myers' diff algorithm, which finds the fewest inserted and deleted lines between the two texts. Lines that were edited rather than added or removed are paired up, and the words that changed inside them are highlighted.
Why is a moved block shown as removed and added?
A diff describes changes as insertions and deletions, so a block that moved appears as deleted in its old place and added in its new one. git diff reports moved code the same way.
Can I compare JSON objects instead of plain text?
Yes. For JSON, use JSON Diff, which compares keys and values rather than lines, so formatting and key order do not create false differences.
Does whitespace count as a difference?
By default, yes: trailing spaces, tabs versus spaces and doubled spaces all count, which helps find invisible problems in config files. Turn on Ignore whitespace to compare lines without leading, trailing and repeated spaces.
Is my data safe?
Processing happens locally in your browser. Tool input is not sent to CodeUnpack servers.
Does it work offline?
Once the page has loaded, this tool can process input without an internet connection.