Text Diff Checker: Compare Two Texts
Paste an original and a modified text, pick Words, Lines or Characters, and click Compare. Removed parts are struck through on the left and added parts are highlighted on the right.
Runs in your browser: your files and text are not uploaded. Free, no account needed.
Last updated: · Reviewed by the QuickTooly Team
How the Diff Works
The Three Diff Modes
The comparison uses the open-source jsdiff library (the npm package diff, version 8). It finds the smallest set of insertions and deletions that turns the original into the modified text. Each mode only changes what counts as one unit:
- Words (default): each word and each punctuation mark is a unit. Changes in whitespace alone are ignored, so it suits prose where line wrapping changed.
- Lines: each line is a unit. Changing one character marks the whole line as removed and re-added. This is the usual choice for code, config files and lists.
- Characters: each character is a unit. Use it to find a single typo, a swapped digit or an extra space in short strings. On long texts the output breaks into many small pieces.
Reading the Results
- Chars Added and Chars Removed add up the length of every changed part, including spaces and line breaks inside it.
- The "Words/Lines/Chars Added" and "Removed" cards count single units inside the changed parts. Two new words next to each other ("big black") count as 2, and three new lines in a row count as 3. In Words mode punctuation is not counted as a word. In Lines mode a line that was edited counts once as removed and once as added.
- In Lines mode, a missing newline at the end of the last line makes that line differ, even if the visible text is the same.
- After you click Compare, the diff updates as you edit either box or switch mode.
- The Copy buttons copy the full original or modified text, not just the changes.
Frequently Asked Questions
Why is a whole line marked as changed when I only edited one word?
You are in Lines mode, where the whole line is the smallest unit. Switch to Words or Characters to see the exact change.
Why does Words mode show no change when I added spaces?
Words mode ignores differences that are only whitespace. Use Characters mode to see added or removed spaces.
Can I compare JSON or code?
Yes, as plain text. Lines mode works best for code. For JSON, key order and formatting count as changes here, so a JSON-aware comparison is better when only the data matters.
Related Tools
- JSON Compare - compares JSON by structure, so reordered keys are not reported as changes.
- PDF Compare - finds text changes between two PDF files without copying the text out first.
- Word Counter - checks the length of the new version.